2

I'm trying to move my VS 2008 solution to VS 2010. Everything works perfectly (compile and link) if I keep the target framework at 4.0.

When I change the framework 2.0 and change the platform framework v100 (to get past compile errors) only to run into metadata linking errors, like this one:

error LNK2022: metadata operation failed (80131195) : Custom attributes are not consistent: (0x0c0000f7). C:\Development\Main\Filemaster\SoxService\MSVCMRTD.lib(managdeh.obj)

I've read that I'm supposed to use ILDAsm but it doesn't like my obj file and since the link didn't complete I don't have an exe to load.

Can anyone please provide some advice on how to find the sorts of errors?

I hate nothing worse than fighting the tool!

valiano
  • 16,433
  • 7
  • 64
  • 79
Iunknown
  • 347
  • 1
  • 2
  • 16
  • 2
    Targeting anything other than .NET 4 when you use C++/CLI is troublesome in VS2010. The VS2008 build tools are required and imported projects need to be edited by hand. You need to explain "platform framework v100" better, it doesn't make much sense. – Hans Passant Mar 29 '11 at 03:35

1 Answers1

3

I was able to get around this problem by going into the project XML file itself and changing the TargetFramework to be 4.0 After that everything compiled and linked fine.

Hans he is referring to C++ Native Multi-Targeting which can be found at this location Platform Framework can be changed under project Properties > General and is advised by the article - however this does not work due to apparent bugs in VC++