Recompiling a DLL for the 3.x runtime from VS2010

Hi,

We have a project which is converted to VS2010. The 3x SDK has been uninstalled and the 4.1 SDK is installed.

Now we need to recompile a DLL to the 3.x runtime.

Is this possible to do from VS2010 or do we need do uninstall the 4.1 SDK and install the 3.x SDK and compile from VS2008 ?

// Ronny

NETMF SDK4.1 supports 3.0 (there is option in project settings) but mixing versions can get you in a lot of trouble.

Hmmm… strangly there is no such choice.
What is the requirements for this to be active ?

Microsoft NETMF SDK 4.1

It is a “Target framework” drop down inside Application tab of the project properties dialog.

My “Target Framework” combobox is grayed out.

Do you guys have any information why that is and how to fix it?

Visual Studio 2010 with .net mf 4.1 and 3, GHI sdk 4.1, previously uninstalled the GHI 3.0 sdk.

Also, the project was originally made with the 3.0 sdk. As far as I remember, I simply reopened the project and tried to build after installing the 4 sdk, and it just automagically compiled for 4. But as you can see, I can not choose target framework.

Thank you.

I think I have managed to rebuild for the 3.0 version by manually editing the following line in the csproject file.

v3.0

When i then reloaded the project, it seemed all build settings and even the conditional compilation symbols were changed to 3.0 equivalents.

I would still like to know how I “fix” my project or installation to give me the choice through Visual studio, instead of manually editing my project files.

Thank you.

Here is somebody with the same issue and a way to solve it:

Hi,

When we now take the DLL compiled for v3.0 - compiled in VS2010,
and copy it to the PC with VS2008 and only the 3.x runtime we get an error during compile.

The error from the MetaDataProcessor is:
MMP: error MMP0000: CLR_E_PARSER_UNSUPPORTED_GENERICS

This is when the parameters to the MetaDataProcessor is -loadHints (Load a specific file as a dependency)

Anyone having an idea what this might be ?

Strangly enought VS2010 will compile source code for the 3.x runtime even if it contains Generics. The problem will be identified at link time, but there is no help in the error message to pinpoint the problem.

I found this blog explaining the problem - http://www.christec.co.nz/blog/archives/86

So now the solution seems to be to back port the project to VS2008 and hopefulle let the “old” compiler detect the generics…