简体   繁体   中英

VS2015 Community, can't build new solution

I ran into some issues yesterday. All of a sudden I couldn't build my C# solution. At first I thought it was related to us recently mixing project.json files with csproj/package.config files which resulted in some issues with resolving references, but the steps I have taken seem to rule this out.

The build is failing (all 23 projects) with no error messages at all. The build is successful for all other members of my team. The steps I have taken include:

  • Clean solution
  • Delete packages folder for solution
  • Delete bin/obj folders
  • Delete all temporary/non-mandatory files (.user, .DotSetting, etc)
  • Delete ASP temporary files (in windows/.net folder)
  • Delete temporary files in AppData/(Local/Roaming)
  • Delete temporary files in ~/.nuget
  • Check out an older guaranteed working branch
  • Uninstall all VS extensions
  • Reinstall VS2015
  • Delete and re-clone the git repo

After all this I tried to create a new solution with an empty class library project. This also fails to build with no error messages.

At this point I am getting more than a little frustrated. It seems like the only thing I haven't tried is to find and delete some obscure registry keys or just reformat the hard drive.

EDIT: I have managed to build a C# project using MSBuild from the command line, although this really doesn't seem to be that significant since the problem obviously isn't in the code since even a new empty project won't build.

I got it working now, and while I am not sure exactly what step did it, the most recent steps I took were:

  • Reboot
  • Run a repair on VS2015
  • Reboot again
  • Delete all temp files again
  • Clean solution
  • Delete packages
  • Open solution and restore packages via nuget package manager console
  • Build

All steps were probably not necessary, but I have no idea what the minimal steps required are since I still don't know exactly what broke. I hope the list I established can be of some use to people with similar issues, since at least some of the steps should help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM