重复的AssemblyVersion属性 [英] Duplicate AssemblyVersion Attribute

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

问题描述

我有一个项目,在编译时会生成以下错误:

I have a project that generates following error on compilation:


错误CS0579:重复的 AssemblyVersion属性

error CS0579: Duplicate 'AssemblyVersion' attribute

我已经检查了文件 AssemblyInfo.cs ,看起来那里没有重复。

I have checked the file AssemblyInfo.cs and it looks like there is no duplication there.

我发现有关MSDN的这篇文章解决了类似的问题,并且按照本文的建议也解决了该问题。

I found this article on MSDN which addresses a similar problem and following the suggestion in this article fixes the problem as well.

有人可以告诉我这是怎么回事吗?仅在具有两个或多个名称相似的类的项目时才发生这种情况吗?还是其他东西?

Can anyone tell me what's going on here? Does it happen only in case of having two or more projects with classes having similar names? Or is it something else?

推荐答案

我过去也遇到过这个问题,所以我假设构建过程与提供版本控制分开提供组装信息。这会导致重复,因为您的项目在 AssemblyInfo.cs 文件中也具有该信息。因此,删除文件,我认为它应该可以工作。

I have also run into this issue in the past, so I am going to assume that your build process provides assembly information separately to providing versioning. And that causes a duplication as your project also has that info in the AssemblyInfo.cs file. So remove the file and I think it should work.

这篇关于重复的AssemblyVersion属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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