自定义属性不一致??? [英] Custom attributes are not consistent???

查看:119
本文介绍了自定义属性不一致???的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经将一个非平凡的C ++库转换为托管,并获得以下

无用的链接器错误:


Assignment.obj:error LNK2022:元数据操作失败(80131195):自定义

属性不一致:(0x0c0001a5)。

Display.obj:错误LNK2022:元数据操作失败(80131195):自定义

属性不一致:(0x0c000108)。

LNK2022的帮助完全没用:

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 not consistent: (0x0c0001a5).
Display.obj : error LNK2022: metadata operation failed (80131195) : Custom
attributes are not consistent: (0x0c000108).
The help for LNK2022 is completely useless:



元数据操作失败(HRESULT):error_message


链接器在合并元数据时检测到错误。元数据错误必须解决才能成功链接。


LNK2022的一个原因是当一个结构存在于多个模块中时

相同名称,但定义冲突,以及使用/ clr编译时。

<<


搜索自定义属性是不一致的在MS出现* NO *

结果,谷歌/谷歌组只返回几个 - 没有一个真的

讨论问题或它(最终?)解决方案。


在这种情况下,我已经查看了源文件,并且没有任何神秘的东西漂浮在周围,虽然我的搜索距离很远确定为

项目由数百个相互关联的文件/标题组成。


有*任何人*想出来或者MS会关心详细说明什么Custom

属性不一致错误意味着什么是最终的十六进制数

是什么意思?显然它有一些动态价值,因为类似的错误有不同的价值。


-

Bret Pehrson

mailto:br ** @ infowest.com

NOSPAM - 在所有电子邮件通信中包含此密钥<< 38952rglkwdsl>>


metadata operation failed (HRESULT) : error_message

The linker detected an error while merging metadata. The metadata errors must
be resolved to link successfully.

One reason for LNK2022 is when a struct exists in multiple modules with the
same name, but with conflicting definitions, and when you compile with /clr.
<<

A search for "Custom attributes are not consistent" at MS turns up *NO*
results, and google/google groups only returns a few -- none of which really
discuss the problem or it (eventual?) solution.

In this case, I''ve looked over the source file, and there are no mystery
structs floating around, although my searches are far from definitive as the
project is composed of hundreds of inter-related files/headers.

Has *ANYONE* figured out or would MS care to elaborate on what the "Custom
attributes are not consistent" error means and what the final hex number
means? Apparently it has some dynamic value, as similar errors have different
values.

--
Bret Pehrson
mailto:br**@infowest.com
NOSPAM - Include this key in all e-mail correspondence <<38952rglkwdsl>>

推荐答案

Hello Bret,


感谢您在小组中发帖。


根据我的理解,问题是:您正在将旧的C ++

库项目迁移到托管C ++项目。但是,当你构建

项目时,你得到了几个错误LNK2022:元数据操作失败

(80131195)链接错误。如果我误解了

问题,请告诉我。


我在看到你的帖子后立即在我们的数据库中搜索。不幸的是,

点击量很小。似乎之前没有类似的报道。所以

我们现在无法准确判断出问题的确切位置。


为了解决问题,请你给我们一个小的

repro样品?我们将调查并回复详细信息

。你可以通过我的电子邮件地址在线删除来联系我。


我明白C ++库并不简单。或许你很难将b $ b隔离问题或创建一个repro样本。如果是这样,我建议您联系

我们的PSS(产品支持服务)专门有一位支持工程师

帮助您。如果您在联系PSS方面需要帮助,请随时在这里发布

,我会回复详细信息。


如果您有任何疑虑它,请随时在这里发布。非常感谢

,期待您的回复。


祝你好运,

Yanhong Huang

Microsoft社区支持


安全! - www.microsoft.com/security

发布是按原样提供的。没有保证,也没有权利。

Hello Bret,

Thanks for posting in the group.

Based on my understanding, the problem is: You are migrating an old C++
library project to managed C++ project. However, when you build the
project, you got several error LNK2022: metadata operation failed
(80131195) link error. Please let me know if I have misunderstood the
problem.

I searched in our database immediately when I saw your post. Unluckily, the
hits are small. And it seems that there were no similar report before. So
we can''t tell exactly where the problem may reside now.

In order to troubleshoot the problem, could you please provide us a small
repro sample? We will look into it and reply with detailed information
here. You can reach me by removing online from my email address here.

I understand that C++ library is not trivial. Perhaps it is hard for you to
isolate the problem or create a repro sample. If so, I suggest you contact
our PSS (product support service) to have one support engineer specially
help you on it. If you need help on contacting PSS, please feel free to
post here and I will post back with detailed information.

If you have any more concerns on it, please feel free to post here. Thanks
very much and look forward to your response.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.


嗯...


(我在假设您在/为Microsoft工作,或者与MS有内部联系。)


您能否联系编译器组并让他们记录元数据

" ;自定义

属性不一致错误?


谢谢


Yan-Hong Huang [MSFT]"写道:
Hmmm...

(I''m presuming that you work for/at Microsoft, or have internal contact w/ MS.)

Could you contact the compiler group and have them document the metadata
"Custom
attributes are not consistent" error?

Thanks

"Yan-Hong Huang[MSFT]" wrote:

Hello Bret,

感谢您在小组中发帖。

根据我的理解,问题是:你正在将旧的C ++库项目迁移到托管C ++项目。但是,当您构建
项目时,您会收到几个错误LNK2022:元数据操作失败
(80131195)链接错误。如果我误解了
问题,请告诉我。

我在看到你的帖子时立即搜索了我们的数据库。不幸的是,
点击量很小。似乎之前没有类似的报道。所以
我们现在无法确切地知道问题的确切位置。

为了解决这个问题,请你给我们一个小的
repro样本吗?我们将调查并回复详细信息
。您可以通过我的电子邮件地址在线删除来与我联系。

我理解C ++库并非易事。也许你很难分离问题或创建一个repro样本。如果是这样,我建议您联系我们的PSS(产品支持服务),让一位支持工程师专门为您提供帮助。如果您在联系PSS方面需要帮助,请随时在此处发布,我将回复详细信息。

如果您有任何疑问,请随时在此处发布。非常感谢,并期待您的回复。

致以最诚挚的问候,
Yanhong Huang
微软社区支持

获得安全! - www.microsoft.com/security
此帖子提供 ;按原样没有保证,也没有授予任何权利。

Hello Bret,

Thanks for posting in the group.

Based on my understanding, the problem is: You are migrating an old C++
library project to managed C++ project. However, when you build the
project, you got several error LNK2022: metadata operation failed
(80131195) link error. Please let me know if I have misunderstood the
problem.

I searched in our database immediately when I saw your post. Unluckily, the
hits are small. And it seems that there were no similar report before. So
we can''t tell exactly where the problem may reside now.

In order to troubleshoot the problem, could you please provide us a small
repro sample? We will look into it and reply with detailed information
here. You can reach me by removing online from my email address here.

I understand that C++ library is not trivial. Perhaps it is hard for you to
isolate the problem or create a repro sample. If so, I suggest you contact
our PSS (product support service) to have one support engineer specially
help you on it. If you need help on contacting PSS, please feel free to
post here and I will post back with detailed information.

If you have any more concerns on it, please feel free to post here. Thanks
very much and look forward to your response.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.




-

Bret Pehrson

mailto:br ** @ infowest.com

NOSPAM - 在所有电子邮件通信中包含此密钥<< 38952rglkwdsl>>



--
Bret Pehrson
mailto:br**@infowest.com
NOSPAM - Include this key in all e-mail correspondence <<38952rglkwdsl>>


在Whidbey发行版中链接器将提供更好的诊断。


现在诊断它的方法是使用ildasm将

..obj文件的元数据转储到文本和然后搜索令牌(错误消息中提到的十六进制数字

)。通常这是一个源错误,其中2个翻译

单位以不同的方式定义类型。


Ronald Laeremans

Visual C ++团队


" Bret Pehrson" <峰; br ** @ infowest.com>在消息中写道

新闻:40 *************** @ infowest.com ...
In the Whidbey release the linker will give better diagnostics.

For now the way to diagnose this is using ildasm to dump the metadata of the
..obj files to text and then search for the tokens (the hex numbers mentioned
in the error messages). Usually this is a source error where 2 translation
units define a type in a different way.

Ronald Laeremans
Visual C++ team

"Bret Pehrson" <br**@infowest.com> wrote in message
news:40***************@infowest.com...
嗯...

(我假设您在/工作/在Microsoft工作,或者有内部联系w /
MS。)
您能否联系编译器组并让他们记录元数据
自定义
属性不一致错误?

谢谢黄炎红[MSFT]写道:
Hmmm...

(I''m presuming that you work for/at Microsoft, or have internal contact w/ MS.)
Could you contact the compiler group and have them document the metadata
"Custom
attributes are not consistent" error?

Thanks

"Yan-Hong Huang[MSFT]" wrote:

Hello Bret,

感谢您在小组中发帖。

根据我的理解,问题是:你正在将旧的C ++库项目迁移到托管C ++项目。但是,当您构建
项目时,您会收到几个错误LNK2022:元数据操作失败
(80131195)链接错误。如果我误解了
问题,请告诉我。

我在看到你的帖子时立即搜索了我们的数据库。不幸的是,
点击量很小。似乎之前没有类似的报道。
所以我们现在无法确切地知道问题的确切位置。

为了解决这个问题,请你给我们一个
小的repro样本?我们将调查并回复详细信息
。您可以通过我的电子邮件地址在线删除来与我联系。

我理解C ++库并非易事。也许你很难为
隔离问题或创建一个repro样本。如果是这样,我建议您
联系我们的PSS(产品支持服务),让一位支持工程师特别为您提供帮助。如果您在联系PSS方面需要帮助,请随时在此处发布,我将回复详细信息。

如果您有任何疑问,请随时在此处发布。
非常感谢,期待您的回复。

致以最诚挚的问候,
Yanhong Huang
微软社区支持

安全! - www.microsoft.com/security
此帖子提供 ;按原样没有保证,并且不授予

Hello Bret,

Thanks for posting in the group.

Based on my understanding, the problem is: You are migrating an old C++
library project to managed C++ project. However, when you build the
project, you got several error LNK2022: metadata operation failed
(80131195) link error. Please let me know if I have misunderstood the
problem.

I searched in our database immediately when I saw your post. Unluckily, the hits are small. And it seems that there were no similar report before. So we can''t tell exactly where the problem may reside now.

In order to troubleshoot the problem, could you please provide us a small repro sample? We will look into it and reply with detailed information
here. You can reach me by removing online from my email address here.

I understand that C++ library is not trivial. Perhaps it is hard for you to isolate the problem or create a repro sample. If so, I suggest you contact our PSS (product support service) to have one support engineer specially
help you on it. If you need help on contacting PSS, please feel free to
post here and I will post back with detailed information.

If you have any more concerns on it, please feel free to post here. Thanks very much and look forward to your response.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no


权利。
-
Bret Pehrson
mailto:br ** @ infowest.com
NOSPAM - 包括这个所有电子邮件通信中的密钥<< 38952rglkwdsl>>

rights.
--
Bret Pehrson
mailto:br**@infowest.com
NOSPAM - Include this key in all e-mail correspondence <<38952rglkwdsl>>



这篇关于自定义属性不一致???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆