找不到源文件“PropertiesAssemblyInfo.cs" [英] Source file 'PropertiesAssemblyInfo.cs' could not be found

查看:55
本文介绍了找不到源文件“PropertiesAssemblyInfo.cs"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行 VS2010.当我打开我的网络解决方案 &尝试构建,构建失败并显示错误CSC(0,0): error CS2001: Source file 'PropertiesAssemblyInfo.cs' could not be found".

I'm running VS2010. When I open my web solution & attempt to build, the build fails with the error "CSC(0,0): error CS2001: Source file 'PropertiesAssemblyInfo.cs' could not be found".

我已经创建了 Windows 应用程序,但使用了不同的解决方案.

I have created Windows applications, but in different solutions.

我在网络解决方案/项目中找不到任何对此文件的引用.

I cannot find any reference to this file in the web solution/project.

感谢任何帮助.

推荐答案

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

This rings a bell. I came across a similar problem in the past,

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

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

You can generate an assemblyInfo.cs by right clicking the project and chosing properties. In the application tab fill in the details and press save, this will generate the assemblyInfo.cs file for you. If you build your project after that, it should work.

干杯,塔伦

2016-07-08 更新:

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

For Visual Studio 2010 through the most recent version (2015 at time of writing), LandedGently's comment still applies:

在您选择@Tarun 提到的项目属性和应用程序选项卡后,有一个按钮程序集信息..."可打开另一个对话框.您至少需要在此处填写标题.VS 会添加 GUID 和版本,但如果标题为空,则不会创建 AssemblyInfo.cs 文件.

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.

这篇关于找不到源文件“PropertiesAssemblyInfo.cs"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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