visual-studio-2010 - 找不到源文件 'Properties\AssemblyInfo.cs'

标签 visual-studio-2010 tfs

运行 Visual Studio 2010 时,我尝试构建,但构建失败并出现以下错误:

error CS2001: Source file 'Properties\AssemblyInfo.cs' could not be found

我已经创建了 Windows 应用程序,但在不同的解决方案中,我无法在解决方案/项目中找到对此文件的引用。

最佳答案

这敲响了警钟。我以前也遇到过类似的问题,

  • 如果展开项目的 Properties 文件夹,您可以看到“AssemblyInfo.cs”,如果看不到,那就是问题所在。程序集信息文件包含项目的所有构建选项,包括版本、公司名称、GUID、编译器选项......等

您可以通过右键单击项目并选择属性来生成 assemblyInfo.cs。在应用程序选项卡中填写详细信息并按保存,这将为您生成 assemblyInfo.cs 文件。如果您在此之后构建项目,它应该可以工作。

2016-07-08更新:

对于 Visual Studio 2010 到最新版本(撰写本文时为 2015 年),LandedGently 的评论仍然适用:

After you select project Properties and the Application tab as @Tarun mentioned, there is a button "Assembly Information..." which opens another dialog. You need to at least fill in the Title here. VS will add the GUID and versions, but if the title is empty, it will not create the AssemblyInfo.cs file.

关于visual-studio-2010 - 找不到源文件 'Properties\AssemblyInfo.cs',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6494691/

相关文章:

visual-studio - 如何在 team Foundation Server 2017 中自定义流程模板?

tfs - Microsoft.TeamFoundation.WorkItemTracking.Client 中的 InteropServices.COMException

tfs - Jenkins 要求接受 TFS EULA

visual-studio-2010 - VS2010中TFS查看历史解决方案下所有文件

c++ - Visual Studio 项目中的 ipch 文件

c# - 极坐标图 x 轴 0 位置

c# - 如何在计算机启动时运行我的 winform 应用程序

git - TFVS 上的 TFS merge 冲突

tfs - 我可以在 tfs 2008 中取消搁置到其他分支吗?

eclipse - 如何在运行时制作用户定义代码的控制流图