SLPS Developer Discussion Developer level questions on Code Protection, Licensing, customisation APIs etc
InishTech Support Forums > SLPS Developer Discussion > KB12 in Visual Studio 2010 Login to add this as a favourite.
User avatar
Member
Member
igor@inovativatec.co - 4/29/2010 9:21:22 PM
   
KB12 in Visual Studio 2010

Hello all,

Recently we performed the steps described in KB12 sucessfully while we were still using Visual Studio 2008. This week we migrated our project to Visual Studio 2010 Ultimate and unfortunately the output binaries for my project stopped to been protected.

We have checked the output information also, and we could not see anything comming out from the output window.

We checked if everything came after the migration. Build definitions, configuration files, etc.. and everything is there.

Do you know if this KB applies to VS 2010? If not, do you have any plans for performing this integration? It is a important resource to us...

Kindly Regards,

Igor Kondrasovas


User avatar
InishTech Dev
InishTech Dev
Accepted solutionAccepted solution
RBartelink - 4/30/2010 1:57:12 AM
   
RE:KB12 in Visual Studio 2010

UPDATE/SUMMARY: SLPS_PROTECT Integrated protection as described in KB 12 using Visual Studio 2010 RTM should work out of the box as of Code Protector update 3.0.1908.1027: http://www.inishtech.com/Support/DevNet/Product-Updates/Update-for-Declarative-protect.aspx

Hi Igor,

Thanks for asking this important question on the forum - we understand how important it is to have timely support for current platforms and tools is and aim to prioritise work on this to the maximum degree possible. It'd also be good if any others who have switched to VS2010 can chime in with quick report of success/failures/anomalies and workarounds (if any).

The exec summary is that it should work though it hasnt had a complete test against the RTM bits of VS.

We have done significant testing against VS2010/.NET 4 Beta 2 and RC releases (there are some KB articles covering .NET 4.0 assemblies too - though they dont address your questions directly), though not against the RTM bits as yet. A number of strengthenings/bugfixes were applied[1]

Can you provide (either here or by email), a copy of the Build output from a Rebuild All please? You may be able to get more details by adjusting Toolls Options Build Detail Level to something higher than minimal.

Can you verify you're defining the conditional compilation consgtant SLPS_PROTECT for the appropriate configurations (perhaps they got lost due to a change of Platform Target, e.g., Mixed Platforms vs Platform Neutral?)

Thanks for your assistance and patience.

--Ruben

[1] As part of this work, an enhancement to Code Protector (which was first applied in the 3.0.1908.464 release some months ago) to cope with the fact that the 4.0 CLR's JIT does more agressive inlining was implemented.

Another minor inconsistency is that the MSBuild extensions directories move from the "2.0" / "3.5" directory name to "v4.0"

One possibility if you're not seeing any invocation of ProtectCmd or any SLPS output in the build info is that the automatic inclusion of Slps.Protect.targets into your .[cs/vb]proj file. If this is the case, a straightforward workaround is to put an explicit <Import> into the .csproj. However this should not be necessary and we'd like to root cause this with the aim of getting this issue clarified in the very near future. (Worst case we should have a workaround or temporary private build in advance of a normal scheduled release).

Final testing will commence shortly, though the ship vehicle for any resulting changes should they be required (we're hopeful this should not be the case) is not clear at this point.

UPDATE: Shipped now.


User avatar
Member
Member
igor@inovativatec.co - 4/30/2010 2:38:12 AM
   
RE:KB12 in Visual Studio 2010

Hello Ruben,

Thank you for the reply back.

I will be glad to help you performing the testings to make things work in VS2010 RTM.

Please let me know what e-mail address I can send you the detailed build all output result.

We have checked all steps in KB12 after migrating to VS2010 to make sure things are still there, but everything seems to be fine.

Please note that we did not upgraded our solution projects to .NET 4. We are still on .NET 3.5 SP1

To workaround this issue, we are using the good and old post-build command line (as suggested sometime ago somewhere in the docs).

I will post a new thread to this forum regarding a new issue we just found. I'm really worried about that, since we were supposed to deliver the product tomorrow and we could not find a workaround so far. I would be glad if you cold give me a hand on this. Not sure if it is related to VS2010

Kindly Regards,

Igor. 


User avatar
InishTech Dev
InishTech Dev
RBartelink - 4/30/2010 3:22:32 AM
   
RE:KB12 in Visual Studio 2010

Hi Igor,

Keeping the solutions as targetting 3.5 is good (Code Protector doesnt presently protect assemblies marked for the 4.0 CLR, but as the 4.0 CLR can load 2.0 (/3.0/3.5) assemblies that's OK). If your .csproj's still have a ToolsVersion of  3.5 (on the root node), then it should be running the same version of MSBuild and the exact same scripts.

By post build, I assume you mean invoking ProtectCmd as in KB2. If you're not using something like clickonce or VS Installer projects this is fine - otherwise you'll have to do manual steps which is never good...

Replied to other post (exec summary: update perm should resolve).

You can send the build log to the standard support email alias [on this site].

If you're not seeing any mention of SLPS in the build log, an explicit import of Slps.Protect.Targets may be the solution. (Wild guess re SLPS_PROTECT not working.. Did you perhaps rename your csproj (without renaming your SLMCfg files)?


User avatar
Member
Member
igor@inovativatec.co - 4/30/2010 1:11:58 PM
   
RE:KB12 in Visual Studio 2010

Hello,

I have checked the .csproj file and found the following tags:

<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

and also

<OldToolsVersion>3.5</OldToolsVersion>

I double checked and we are really using .NET 3.5 in all solution projects.

During migration to VS2010, we had a problem that is already documented at Microsoft Connect (https://connect.microsoft.com/VisualStudio/feedback/details/455702/project-fails-to-open-claiming-net-framework-3-5-is-non-existent). We performed the workaround (only removing a tag form the .csproj file) and that it worked. I think this has nothing to do with the issue we are discussing....

As a workaround for not been able to apply KB12 on VS2010 we are using KB2 to automated code protection. We are actually deploying our application using a Setup and Deployment project (msi intaller) and this makes us performing manual steps on the setup project...

Should I wait until KB12 works in VS2010 or use some another alternative better than KB2? If so, what should I do?

Kindly Regards,

Igor.

 

 


User avatar
InishTech Dev
InishTech Dev
RBartelink - 4/30/2010 5:32:49 PM
   
RE:KB12 in Visual Studio 2010

 Hi Igor,

We're pretty confident there shouldnt be major complexity in resolving the issue, whatever it is. The chances are it's a minor config issue which can be resolved with a tweak to your project file.

Can you send a build log along to assist us in diagnosing the issue please?

Unfortunately it'll be at least Tuesday before we get a look at it as Monday is a public holiday here.

--Ruben


User avatar
Member
Member
igor@inovativatec.co - 5/4/2010 9:13:45 PM
   
RE:KB12 in Visual Studio 2010

Hello Ruben,

I could not find any e-mail address so I can send the build output. Could you please inform?

I will send the build output straight away.

Thank you,

Igor.

 


User avatar
InishTech Dev
InishTech Dev
RBartelink - 5/4/2010 9:31:22 PM
   
RE:KB12 in Visual Studio 2010

Hi Igor,

Sorry, wasnt trying to send you on a wild goose chase. It's support@inishtech.com 

(It's linked from the home page at http://support.inishtech.com/Support/DevNet.aspx though we really appreciate people asking questions here as others can benefit from the information too - and in you'll generally get quicker responses on the forum)

--Ruben


User avatar
Member
Member
igor@inovativatec.co - 5/4/2010 10:09:40 PM
   
RE:KB12 in Visual Studio 2010

Thank you Ruben,

After looking in the web for the meaning  of "wild goose chase", I sent the output for your analisys. I like these expressions...

If you need aditional information, please let me know.

Igor.


User avatar
InishTech Dev
InishTech Dev
RBartelink - 5/5/2010 11:07:53 AM
   
RE:KB12 in Visual Studio 2010

 Hi Igor,

Thanks for submitting.

Turns out that a change was made in VS2010 RTM to remove an inconsistency that had been present in Beta 2. IIRC it was also present in the RC.

The problem is that the MSBuild customisations directory for MSBuild 4.0 has been changed (it had been 4.0 instead of v4.0) which is where the Code Protector installer puts it.

In order to work around this issue, it will be necessary to run the following command from an Administrator command prompt:

"%SystemDrive%\Program Files (x86)\InishTech SLP Code Protector\Slps.Runtime.Configuration.exe /msbuildtargets installAuto;platform=x86;platform=x64;Version=v4.0

(On a 32 bit machine: "%SystemDrive%\Program Files\InishTech SLP Code Protector\Slps.Runtime.Configuration.exe /msbuildtargets installAuto;platform=x86;Version=v4.0 )


after installing SLPS Code Protector in order to enable integrated protection via the SLPS_PROTECT setting in VS2010.

As covered in http://www.inishtech.com/KB12 the alternate approach is to explicitly import the protection integration by adding the following:

  <Import Project="$(MSBuildExtensionsPath)\InishTech\Slps.Protect\Slps.Protect.targets" />

to your .vb/.csproj file:

We'll post here if an installer for Code Protector that does not require this workaround gets released. UPDATE: This has been released and is version 3.0.1908.1027, see the answer above.

Thanks for your assistance in bringing this to light and isolating the issue.

Let us know if you have any further issues.

--Ruben


1 2

19 user(s) on-line: 0 registered and 19 guest(s)

  • Sticky
  • Locked sticky
  • Hot sticky
  • Hot locked sticky
  • Thread
  • Hot thread
  • Locked thread