Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Source file 'Properties\AssemblyInfo.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 'Properties\AssemblyInfo.cs' could not be found".

I have created Windows applications, but in different solutions.

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

Any help is appreciated.

like image 426
larryr Avatar asked Jun 27 '11 14:06

larryr


People also ask

How do I add AssemblyInfo file to 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.

Where can I find AssemblyInfo CS?

AssemblyInfo. cs is in the properties folder of the Project.

What is AssemblyInfo CS file?

AssemblyInfo. cs contains information about your assembly, like name, description, version, etc. You can find more details about its content reading the comments that are included in it.


1 Answers

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

  • if you expand Properties folder of the project can you see 'AssemblyInfo.cs' if not that is where the problem is. An assembly info file consists of all of the build options for the project, including version, company name, GUID, compilers options....etc

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.

Cheers, Tarun

Update 2016-07-08:

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

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.

like image 186
Tarun Arora Avatar answered Sep 20 '22 17:09

Tarun Arora