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!

1
  • 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. Mar 29, 2011 at 3:35

1 Answer 1

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++

1
  • 1
    This was the correct answer for me. Thanks for the pre-help! :-) Feb 15, 2012 at 15:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.