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

查看:21
本文介绍了重复的 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天全站免登陆