Visual Studio 2017 - AssemblyInfo.cs not found

Today, building my solutions, this problem appear:

[Error] The file '...\ Projects \ Application \ Application \ obj \ Release \ netcoreapp2.0 \ Application.AssemblyInfo.cs' cannot be found.

I've found solutions for other versions of Visual Studio but not for 2017

Any recommendation on how this can be regenerated?

Upvotes: 13

Views: 35904

Answers (6)

Banphot Nimbus
Banphot Nimbus

Reputation: 1

I found this:

  • Select 'Tools' from the Visual Studio at the top
  • Then select 'Assembly Browser'
  • The AssemblyInfo of the project is in the list, possibly almost at the top of the list

Upvotes: 0

user14246872
user14246872

Reputation: 1

Different versions of vb also make this issue.check out the SVN by removing the existing one.(confirm the changes get effected else it may lose)

Upvotes: 0

sapbucket
sapbucket

Reputation: 7195

In the solution explorer, find your project. Expand the Properties. Find the 'missing' file, and remove it. Then rebuild your project. That's what worked for me.

note that for whatever reason my AssemblyInfo.cs file had been renamed to SolutionAssemblyInfo.cs. For me, removing the Solution... file and rebuilding created a new AssemblyInfo.cs and I was back in business.

Upvotes: 0

Jacquelyn K
Jacquelyn K

Reputation: 11

I had this issue while working on a DLL with a tester project. Somehow my solution lost track of which project to startup and I had to reset the starter project to my test project for the DLL.

Upvotes: 0

Daleman
Daleman

Reputation: 874

I also got this error after I Sync-ed to VS Team Service and I got many others errors. I already tried Greg's suggestion but it didn't work. But I tried in different way:

  1. right click project (not solution)
  2. unload project
  3. re-load project
  4. rebuild solution

and my project run well again.

Upvotes: 3

Gregory Bologna
Gregory Bologna

Reputation: 276

For me, had to create a new assembly file. Steps:

  1. Right-click project properties (not solution).
  2. Choose Application tab.
  3. Click Assembly Information button. Fields will probably be all empty.
  4. Add stuff.
  5. Click OK and exit properties.
  6. Rebuild.

Upvotes: 15

Related Questions