I have a visual studio 2005 class library project with the plugins for a microsoft crm 4 installation. I want to upgrade the project to visual studio 2010 but I still have to use the .net 2.0
platform.
I tried to convert using the VS2010 wizard and the project is successfully converted but when I try to build I get several errors related to the references.
One is related to the System.Serialization.Runtime
that in VS2010 I can't find using the .net 2.0
framework.
Another problem is related to the assemblymicrosoft.crm.sdk
. I'm getting the following message:
The primary reference "microsoft.crm.sdk, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=x86" could not be resolved because it has an indirect dependency on the framework assembly "System.Workflow.Activities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "microsoft.crm.sdk, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=x86" or retarget your application to a framework version which contains "System.Workflow.Activities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
The message refers that microsoft.crm.sdk
version is 4.0.0.0 which is not correct, it should be 2.0.0.0. Maybe there is something that is confusing VS2010 here.
I tried to remove the assemblies and put them back again (System.Serialization.Runtime
I couldn't even put it back again because it doesn't show on the list of the .Net references), it didn't work.
Also, tried changing the .net
framework to version 4.0 and back again to .net 2.0
. Didn't work also, although while in 4.0 it successfully built.
I even tried going to VS2008 and then to VS2010. Converting to VS2008 I had no problem but when I got to VS2010 again I had the same problems.
Does anyone know how I can overcome this?
You need to target .NET framework 3.0
Any .NET assembly that is created with Visual Studio .NET 2005 or 2008 and the .NET Framework version 3.0 for use in Microsoft Dynamics CRM as a Microsoft Dynamics CRM plug-in assembly or as a Microsoft Dynamics CRM custom workflow activity is supported.