Visual Studio 2015 project builds failed but no er

2019-01-21 05:28发布

My project builds all fail but I'm not shown any errors. I tried cleaning and rebuilding, that didn't work.

I changed the MSBuild output verbosity to 'Diagnostic' hoping it would help me identify the problem and now I'm stuck. Here's what the output looks like:

1>Project 'ProjectMM.Data.Models' is not up to date. Input file 'C:\Projects\ProjectMM\ProjectMM.Data.Models\ProjectMM.Data.Models.csproj' is modified after output file 'C:\Projects\ProjectMM\ProjectMM.Data.Models\bin\Debug\ProjectMM.Data.Models.pdb'.
All packages are already installed and there is nothing to restore.
1>------ Build started: Project: ProjectMM.Data.Models, Configuration: Debug Any CPU ------
2>Project 'ProjectMM.Data' is not up to date. Input file 'C:\Projects\ProjectMM\ProjectMM.Data\ProjectMM.Data.csproj' is modified after output file 'C:\Projects\ProjectMM\ProjectMM.Data\bin\Debug\ProjectMM.Data.pdb'.
2>------ Build started: Project: ProjectMM.Data, Configuration: Debug Any CPU ------
3>Project 'ProjectMM' is not up to date. Input file 'c:\projects\projectmm\projectmm\app_start\bundleconfig.cs' is modified after output file 'C:\Projects\ProjectMM\ProjectMM\bin\ProjectMM.pdb'.
3>------ Build started: Project: ProjectMM, Configuration: Debug Any CPU ------
========== Build: 0 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========

24条回答
成全新的幸福
2楼-- · 2019-01-21 05:46

You should set the combobox at right side under error list, on 'Entire Solution' to see all errors.enter image description here

查看更多
老娘就宠你
3楼-- · 2019-01-21 05:47

Please check warnings. Sometimes build failed because of some kind of warnings too.

查看更多
姐就是有狂的资本
4楼-- · 2019-01-21 05:49

I've been seeing regular instances of VS2015 reporting "build failed" but not showing any errors in the error window. Coming from an ancient command line background, I finally went looking at the output window. The output window showed the compiler reporting errors but those errors were not being captured to the error window. I never saw this problem under VS2013.

The usual closing of VS and reopening of it hasn't cleared this condition. (In VS2013 this was a common way to kick XAML intellisense in the rear and make it stop fixating on an "error" that had been fixed.)

So far this has always been related to compilation errors in a XAML page CS file. I can't remember seeing it in a non-page CS file.

Until one figures out to go check the output window, things like intellisense reporting in the error window invalid references to objects in the XAML, but no compiler errors being shown in the error window can get VERY confusion since it "appears" like the errors are the intellisense reporting XAML errors. But they actually aren't. The XAML errors are just symptoms of CS files failing to compile but not having their errors reporting in the error window.

查看更多
Animai°情兽
5楼-- · 2019-01-21 05:49

What worked for me:

Closing all documents solved the issue for me. (Same solution if intelliSense stops working)

(right click tab - Close All Documents)

查看更多
你好瞎i
6楼-- · 2019-01-21 05:52

I had this problem with VS2015 Update 3 RC and Xamarin (.Forms shared project).
Compiler don't stop, errors were only showed in the output window.
This only for Xamarin projects (with VB.NET projects all has worked as expected)...
To try find the reason for the problem, I have changed the Build Output in VS:
- menu "Tools - Options"
- from the left panel: "Projects And Solutions: Build And Run":
- change "MSBuild Output Verbosity" from "Minimal" to "Diagnostic"

After doing that, the compiler has stopped and the error was showed..
After that, I have set the option back from "Diagnostic" to "Minimal" (like it was before) and... it has worked also with "Minimal" (to be sure, I also have restarted VS)...

So.. it seems (at least im my case) that only to change (touch) the setting (MSBuild Output Verbosity") has solved the problem and that this is a bug in VS and/or the Xamarin integration Software...

查看更多
够拽才男人
7楼-- · 2019-01-21 05:52

What happened by me was, changing the timezone on the computer to +5:30 and then changing it back -5:00 is what confused VS. When I restarted VS, it worked fine again.

查看更多
登录 后发表回答