Visual Studio 2015-所有与构建相关的任务(清理,构建,重建)对于所有项目均失败,同一项目在命令行上构建良好. [英] Visual Studio 2015 - all build related tasks (clean, build, rebuild) fail for all projects, same projects build fine on command line.

查看:92
本文介绍了Visual Studio 2015-所有与构建相关的任务(清理,构建,重建)对于所有项目均失败,同一项目在命令行上构建良好.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试擦拭驱动器并在开发计算机上重新安装Windows以外的所有尝试之后,我将获得任何帮助,我将非常感激.

I would very much appreciate any help I can get as I've tried everything short of wiping the drive and reinstalling windows on my development machine.

我尝试删除适用于VS的Python工具,因为在安装该附加组件后发生了该问题.清除没有改变.我尝试了修复安装,但不确定是否可以尝试其他方法.最有可能是某个地方的设置使我的VS2015失败了 每个单独的构建操作.无论它是什么项目或在哪个项目上运行,我都会得到非常相似的输出:

I tried removing Python Tools for VS as the issue occurred after I installed that add-on. The removal changed nothing. I tried a repair install and I'm not sure what else I can try. Most likely there is some setting somewhere that makes my VS2015 to fail every single build operation. Regardless of what it is or on which project it is run I get very similar output:

每个与构建相关的任务都以相同的输出结束:

Every build related task ends with the same output:

1> ------构建开始:项目:ConsoleApplication1,配置:调试任何CPU ------
===========构建:0成功,1失败,0最新,跳过0 ==========

1>------ Build started: Project: ConsoleApplication1, Configuration: Debug Any CPU ------
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

清洁:

这是一个新的控制台应用程序项目(以及我尝试过的任何其他现有项目和解决方案),其中包含用作构建测试的简单hello世界.在命令行上使用MSBuild可以很好地构建相同的项目.

This is for a new console app project (as well as any other existing project and solution I tried) that contains simple hello world acting as a build test. The same project builds fine using MSBuild on the command line.

在Visual Studio 2013中打开的同一项目将生成并正常运行,并显示如下所示的典型输出:

The same project opened in Visual Studio 2013 builds and runs fine with typical output shown below:

在工具"->选项"->项目和解决方案"->"MSBuild"中,我已经从"MSBuild"中选择了诊断"输出,但是除了显示的输出外,我什么也没得到.

In Tools->Options->Projects and Solutions->MSBuild I already have Diagnostic output from MSBuild selected, but I still get nothing else than the output shown.

如果我尝试使用VS2015的MSBuild命令提示符在命令行上构建相同的项目,则可以使用以下命令正常工作:

If I try to build the same project on command line with MSBuild command prompt for VS2015 it works fine with the command below:

MSBuild.exe C:\ shared \ temp \ test2 \ ConsoleApplication1 \ ConsoleApplication1 \ ConsoleApplication1.csproj/verbosity:d

MSBuild.exe C:\shared\temp\test2\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.csproj /verbosity:d

其他信息.如果我在代码中添加了故意的错别字,则生成的输出将完全相同.  没有错误,只是构建失败.

Additional piece of info. If I put intentional typos in the code the build output is exactly the same.  No errors, just build failed.

推荐答案

您好,Luk Ols,

感谢您在MSDN论坛中发帖.

>>>>最有可能是某处设置使我的VS2015在每次构建操作中均失败.

根据您的描述,我同意您的看法,原因是安装了用于加载项的Python工具,它可能会更改某些VS设置,

然后,当VS编译项目命令行时,构建会失败.

由于修复不起作用,您可以尝试重新启动Windows并以安全模式运行,请在Visual Studio 2015命令提示符下运行devenv/safemode.

如果在安全模式下该问题消失了,则原因可能是第三方应用程序,服务或Visual Studio加载项.

也请在命令提示符下尝试devenv/resetsettings或devenv/setup.

最好的问候


这篇关于Visual Studio 2015-所有与构建相关的任务(清理,构建,重建)对于所有项目均失败,同一项目在命令行上构建良好.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆