By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,874 Members | 1,028 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,874 IT Pros & Developers. It's quick & easy.

Custom attributes are not consistent?

P: n/a
I started to experiment with VC++ 2005 Beta1. So far everything went
fine, and already have a working project, but soon I realized that the
compiler was ancient (not supporting half of the C++/CLI standard). So I
downloaded the VC++ 2005 Tools Refresh (http://tinyurl.com/5mdq2). After
that I tried to do a full rebuild, but my project wouldn't link anymore.
I get the following errors:

MSVCMRTD.lib(mstartup.obj) : error LNK2022: metadata operation failed
(80131195) : Custom attributes are not consistent: (0x0c000002).
MSVCMRTD.lib(mstartup.obj) : error LNK2022: metadata operation failed
(80131195) : Custom attributes are not consistent: (0x0c000005).
MSVCMRTD.lib(mstartup.obj) : error LNK2022: metadata operation failed
(80131195) : Custom attributes are not consistent: (0x0c000008).
MSVCMRTD.lib(mstartup.obj) : error LNK2022: metadata operation failed
(80131195) : Custom attributes are not consistent: (0x0c00000a).
MSVCMRTD.lib(mstartup.obj) : error LNK2022: metadata operation failed
(80131195) : Custom attributes are not consistent: (0x0c00000d).
[... lots of errors ...]

I did a quick reality check:
ildasm "C:\Program Files\Microsoft Visual Studio 8\VC\lib\MSVCMRTD.lib"
/text /out=output.txt

Searching for those hex atrribute codes from the error messages I could
find some actual references, but I'm completely clueless about them.
It's not something that I can read:

// TypeDef #1 (02000002)
// -------------------------------------------------------
// TypDefName: _EXCEPTION_DISPOSITION (02000002)
// Flags : [NotPublic] [AutoLayout] [Class] [Sealed] [AnsiClass]
(00000100)
// Extends : 01000006 [TypeRef] System.Enum
// CustomAttribute #2 (0c000002)
// -------------------------------------------------------
// CustomAttribute Type: 0a000002
// CustomAttributeName: Microsoft.VisualC.NativeEnumAttribute ::
instance void .ctor()
// Length: 4
// Value : 01 00 00 00 >
<
// ctor args: ()

This mstartup.obj file is not even mine, whatever errors it may have,
they're not related to my code. Besides, the entire project linked
perfectly prior to updating to the VC++ 2004 Tools Refresh. I understand
that it's still a beta product, but what am I doing wrong? I'll keep
trying with much simpler projects, because a trivial empty-form
application links fine.

Thanks,
Tom
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Silly me, I mistakenly installed the old Tools Update
(vcpp_40809_install.exe) from August. After downloading and installing
the latest one from the Microsoft site, everything links perfectly.

Tom

Tamas Demjen wrote:
I started to experiment with VC++ 2005 Beta1. So far everything went
fine, and already have a working project, but soon I realized that the
compiler was ancient (not supporting half of the C++/CLI standard). So I
downloaded the VC++ 2005 Tools Refresh (http://tinyurl.com/5mdq2). After
that I tried to do a full rebuild, but my project wouldn't link anymore.
I get the following errors:

MSVCMRTD.lib(mstartup.obj) : error LNK2022: metadata operation failed
(80131195) : Custom attributes are not consistent: (0x0c000002).
MSVCMRTD.lib(mstartup.obj) : error LNK2022: metadata operation failed
(80131195) : Custom attributes are not consistent: (0x0c000005).
MSVCMRTD.lib(mstartup.obj) : error LNK2022: metadata operation failed
(80131195) : Custom attributes are not consistent: (0x0c000008).
MSVCMRTD.lib(mstartup.obj) : error LNK2022: metadata operation failed
(80131195) : Custom attributes are not consistent: (0x0c00000a).
MSVCMRTD.lib(mstartup.obj) : error LNK2022: metadata operation failed
(80131195) : Custom attributes are not consistent: (0x0c00000d).
[... lots of errors ...]

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.