473,396 Members | 1,849 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Custom attributes are not consistent?

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
1 4161
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Doug Holland | last post by:
Often you see code where an empty interface is used to indicate something about the class that realizes it. In the .NET world this can be done with custom attributes too, so which is better: ...
3
by: xAvailx | last post by:
I apologize ahead of time for the long post... Background: Working on a CRM type custom application. The application is for an event management company. The company will provide the application...
8
by: nicolas.sanguinetti | last post by:
Hi, I want to add custom attributes to my xhtml documents to use with my DOM scripts. For example, I want to have some tags -say, the <h1>- have an attribute and a . The thing is that I also...
1
by: Bret Pehrson | last post by:
I've converted a non-trivial C++ library to managed, and get the following unhelpful linker error: Assignment.obj : error LNK2022: metadata operation failed (80131195) : Custom attributes are...
3
by: Edward Diener | last post by:
I understand the syntax of custom attributes, but I have no idea what they are supposed to do. Anyone care to give me a clue as to their functionality ?
3
by: Mark R. Dawson | last post by:
Hi all, I am trying to get custom attributes from a property. I can do this if I pass in the name of the property i.e. "Name" to the reflection methods, but if I pass in set_Name which is what...
2
by: prabhupr | last post by:
Hi Folks I was reading this article (http://www.dotnetbips.com/articles/displayarticle.aspx?id=32) on "Custom Attribute", written by Bipin. The only thing I did not understand in this article...
5
by: =?Utf-8?B?cGFnYXRlcw==?= | last post by:
Hello All, I am sure that I am just overlooking something, but here's something I can't quite get right... I want to be able to get the value of a parameter of an unknown custom attribute at...
1
camel
by: camel | last post by:
Apologies if foolish question, but I somewhat expected Custom Attributes (i.e. inheriting from System.Attribute) decorating class properties to come through via WSDL to the proxy the same as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.