-1

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.Runtimethat 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?

QHarr
  • 83,427
  • 12
  • 54
  • 101
budahead
  • 185
  • 1
  • 9
  • Have you changed Target Platform to .Net 2.0 in properties of project? – MarioZG Feb 05 '15 at 12:13
  • When it converted it maintained the .net 2.0 target. And like I said, I changed it to .net 4.0 and then again to .net 2.0 to see if that would solve anything but with no avail. – budahead Feb 05 '15 at 12:45
  • I don't suppose the downvoter would care to explain what's wrong with this question? – budahead Mar 05 '15 at 18:00

1 Answers1

1

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.

source

MarioZG
  • 2,087
  • 11
  • 19
  • Although it doesn't answer my question completely I am going to accept it. If in VS 2005 I target .net 2.0, when I change to other VS version it should be ok if I am targeting at least to the same .net framework. I don't know why but I was convinced that I had to target .net 2.0. I think that is in CRM 3.0. There's already to many CRM versions in my head :) – budahead Feb 17 '15 at 10:08