Visual Studio 2013 Can't save, build, or rebui

2019-06-22 06:59发布

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.

2条回答
看我几分像从前
2楼-- · 2019-06-22 07:33

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.
查看更多
地球回转人心会变
3楼-- · 2019-06-22 07:40

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 ;)

查看更多
登录 后发表回答