5

Suddenly after i clicked clean solution i am no longer able either to save, build or do anything to the solution. It appears to be a bug as every time i hit CTRL+S or just Rebuild or Build or even Start button i get this message

enter image description here

  • Also i double checked all the assemblies and they are there nothing is missing. I need to find a solution without losing my unsaved data.
Roman Ratskey
  • 5,101
  • 8
  • 44
  • 67
  • most likely your installation has corrupted or your AV is kicking in. if I were you, I would try with a brand new clean solution and project and see if you can build that without code. For your current project and solution, save it and back it up. If it still fails, then uninstall CLEANLY and then reinstall VS – Ahmed ilyas Feb 12 '14 at 00:04
  • @Ahmedilyas : isn't it clear that i can't save my data ? i can't close VS without saving the hell out of the data. – Roman Ratskey Feb 12 '14 at 00:05
  • you could easily copy and paste the code in notepad or go on disk to the folder where the project is and back that up :) – Ahmed ilyas Feb 12 '14 at 07:18

2 Answers2

16

Well this is strange glitch which I once faced with Visual Studio which results in losing the linkage to it's references or something like that.

A quick fix would be just

  1. Opening the project in a 2nd visual studio instance (without
    closing the existing one to keep your data alive!)
  2. Rebuild your project from the newly opened 2nd instance then close
    and return to your bugged visual studio (1st instance) and it should work be able to save/build/rebuild now.
  3. When switching back to your 1st instance, if you had made changes
    in the 2nd instance to get your project to compile, the 1st instance will detect these and ask if you would like to reload the changed
    files. Select "No to all" otherwise you will lose your unsaved
    changes in the 1st instance.
Brijesh Bhatt
  • 3,810
  • 3
  • 18
  • 34
Erric J Manderin
  • 1,096
  • 3
  • 10
  • 23
  • This answer exemplifies the best of one type of Stack Overflow answer. A simple, effective 'just do it' bandaid to a real WTF issue with a tool. I really don't care why VS/VB gets bolixed this way -- stuff happens. I just needed a way out of the rat hole and you guys gave and saved me hours of work. Thank you! I guess I should mention, FWIW, this fix worked for me with VS 2015 Community Edition. – Anne Gunn Oct 28 '15 at 18:30
  • I wish I could keep upvoting this answer and question. Just ran into this bug for the second time, it still exists in VS2017. – RancidOne Jun 15 '17 at 17:15
-4

Clearly, your project is referencing something that doesn't exist, something that seems to be called 'Project'.

SUGGESTIONS:

1) Look at your project in the MSVS Solution Explorer. Then look at your .sln and .csproj files in Notepad (or your favorite text editor). See if you can figure out what "Project" is missing (or corrupted) and try to fix it.

2) See if you can go back to a "known good" backup of your project, and try rebuilding that.

3) Failing all else, start from scratch with a brand new project, and manually "Add" the source and resources to recreate your corrupted project.

4) Also look at these links:

PS: If you've made a bunch of changes since your last "Save", then:

5) See if "File, Save" works on a file-by-file basis

... OR ...

6) If you can't save ANYTHING ... then kiss your changes goodbye... and remember to save more often the next time ;)

Community
  • 1
  • 1
FoggyDay
  • 11,962
  • 4
  • 34
  • 48