原创  VS2005为什么会有两个AssemblyInfo 收藏

为了迁移VS2003的Web Application到VS2005的Web Application,我在VS2005新创建一个Web Application,删除其中的页面,然后将我在VS2003下面的页面以及代码移动到新的应用程序目录下面,并将它们都添加到工程里面。结果编译的时候发现出现这个编译错误。
The item "Properties\AssemblyInfo.cs" was specified more than once in the "Sources" parameter.  Duplicate items are not supported by the "Sources" parameter.
根据错误提示,用文本编辑器打开.csproj文件,找<Compile Include="Properties\AssemblyInfo.cs" />节,会发现有两个,删除其中一个就没有问题了。
估计这是微软的一个bug,我无意中将另一个应用程序中的Assembly添加到当前的应用程序里,VS2005会自动在.csproj文件中自动添加该节,但是删除该文件的时候VS2005并不会自动删除这个节,导致了这个编译错误。

发表于 @ 2006年06月20日 13:00:00 | 评论( loading... ) | 编辑| 举报| 收藏

旧一篇:如何在ASP.NET2.0下面使用基于数据库(SqlServer2000)的Cache | 新一篇:如何在ASP.NET2.0下面使用基于数据库(SqlServer2000)的Cache

  • 发表评论
  • 评论内容:
  •  
Copyright © cuike519
Powered by CSDN Blog