Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AssemblyInfo.cs could not be opened - Unspecified Error [closed]

Tags:

asp.net-mvc

I was working offline from TFS for a while in my solution. I went back online (TFS) and when I tried to compile my solution I get this for a project I had added to this solution.

AssemblyInfo.cs could not be opened - Unspecified Error

I checked and that file is there so not sure why it can't utilize/read it.

This is an ASP.NET Web Application and the project it's complaining about here is just a regular C# class library project.

like image 715
PositiveGuy Avatar asked Nov 28 '11 06:11

PositiveGuy


People also ask

How do I open AssemblyInfo in CS?

Goto your project properties, Application tab, click on the Assembly Information button.

What is AssemblyInfo CS?

AssemblyInfo.cs contains general information about the application you are building, some of these information includes the title of your application, copyright etc, for instance if the title of your application is "MyApplication" you should see something like this: [assembly: AssemblyTitle("MyApplication")]

How do I get assembly information in Visual Studio?

To access this dialog box, select a project node in Solution Explorer, and then, on the Project menu, select Properties. On the Application page, select the Assembly Information button.


2 Answers

I have had this happened to me in the past. This can be more of a Visual Studio problem more than anything else.

What this means is that the AssemblyInfo.cs file is either missing from the Properties folder in the project or there is a permissions issue. If there is a permissions issue, update the ACL (File > Properties > Security), close and re-open the project. If missing altogether, you just need to recreate it taking the following steps:

  1. Within Visual Studio 2010, select Tools > Create GUID
  2. Click Copy (or New GUID then Copy)
  3. Click Exit
  4. Expand the Properties folder in the Solution Explorer (Control+W+S to open)
  5. Delete the AssemblyInfo.cs file shown with the exclaimation point
  6. Double click on the Properties folder - this should open the Properties window
  7. On the Application Tab, click the Application Information... button
  8. Fill in the application information, paste the GUID you copied into the GUID field - when done click OK

Source: Visual Studio 2010 Project Error AssemblyInfo.cs could not be opened

like image 180
Hanlet Escaño Avatar answered Sep 20 '22 10:09

Hanlet Escaño


This error is usually thrown when the file doesn't exist locally (not on the server). Probably it was deleted by some mistake. If the file exists on the server you could obtain it from there and if it was deleted you could manually recreate and add it to the project.

like image 26
Darin Dimitrov Avatar answered Sep 19 '22 10:09

Darin Dimitrov