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条回答
Summer. ? 凉城
2楼-- · 2019-01-21 05:35

I have had the same problem and closing and re-opening Visual Studio clears it up.

I had also tried Cleaning the solution and the Clean Failed as well.

There may be other scenarios where this does not do the trick, but in my case restarting has resolved this for me.

查看更多
一夜七次
3楼-- · 2019-01-21 05:36

After updating a dll file, it turned out that the new file was targeting a higher verion of .NET Framework. The solution was to go to Project Properties and change the Target framework to the appropriate version.

查看更多
Lonely孤独者°
4楼-- · 2019-01-21 05:37

Taken from this answer

Compilation failed, no errors were showed in the output window.

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, I found the real reason which was in fact a mistake with dependency projects. I project that I was depending on was built for different framework (newer) than mine. Thus creating the issue. The errors was only outputed when I put the Output Verbosity to Diagnostic

查看更多
Fickle 薄情
5楼-- · 2019-01-21 05:38

Deleting the hidden .vs folder for worked for me for VS2015.

(Note that this is where the SUO files live now)

查看更多
贪生不怕死
6楼-- · 2019-01-21 05:39

Check all your project Framework versions, and make sure they're all the same, or at least that project A doesn't reference project B when project B's .NET Framework version is higher.

查看更多
来,给爷笑一个
7楼-- · 2019-01-21 05:39

What I did (after all the above, and it still wasn't working) was go through all the bin folders and clear them all out (ie the referenced projects too).

This worked for me, hope it does for you too.

查看更多
登录 后发表回答