简体   繁体   English

VS2015社区,无法构建新解决方案

[英]VS2015 Community, can't build new solution

I ran into some issues yesterday. 昨天我遇到了一些问题。 All of a sudden I couldn't build my C# solution. 突然之间,我无法构建C#解决方案。 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. 起初我以为这与我们最近将project.json文件与csproj / package.config文件混合在一起有关,这导致解析引用时出现了一些问题,但是我采取的步骤似乎可以将其排除在外。

The build is failing (all 23 projects) with no error messages at all. 生成失败(所有23个项目),完全没有错误消息。 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 删除bin / obj文件夹
  • Delete all temporary/non-mandatory files (.user, .DotSetting, etc) 删除所有临时/非强制性文件(.user,.DotSetting等)
  • Delete ASP temporary files (in windows/.net folder) 删除ASP临时文件(在Windows / .net文件夹中)
  • Delete temporary files in AppData/(Local/Roaming) 删除AppData /(本地/漫游)中的临时文件
  • Delete temporary files in ~/.nuget 删除〜/ .nuget中的临时文件
  • Check out an older guaranteed working branch 查看较旧的有保证的工作分支
  • Uninstall all VS extensions 卸载所有VS扩展
  • Reinstall VS2015 重新安装VS2015
  • Delete and re-clone the git repo 删除并重新克隆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. 编辑:我已经设法从命令行使用MSBuild来构建C#项目,尽管这似乎似乎并不那么重要,因为问题显然不在代码中,因为即使新的空项目也无法构建。

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 在VS2015上运行修复
  • Reboot again 再次重启
  • Delete all temp files again 再次删除所有临时文件
  • Clean solution 清洁溶液
  • Delete packages 删除包裹
  • Open solution and restore packages via nuget package manager console 通过nuget软件包管理器控制台打开解决方案并还原软件包
  • 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. 我希望我建立的清单可以对遇到类似问题的人有所帮助,因为至少某些步骤应该有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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