msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

A cancelled build in VS can show up as "0 warning 0 errors build FAILED"

Open rainersigwald opened this issue 4 years ago • 4 comments

While investigating a problem that turned out to be unrelated @jonathanpeppers discovered that some design-time builds were failing, with no information as to why:

085f8d42-511a-4d58-b8be-4d3a06b1545a

 15:43:19.857     1>Done Building Project "C:\Users\jopepper\source\repos\MauiApp40\MauiApp40\MauiApp40.csproj" (ResolveFrameworkReferencesDesignTime;ResolveProjectReferencesDesignTime2;CollectResolvedSDKReferencesDesignTime;CollectPackageReferences;ResolveComReferencesDesignTime;BuiltProjectOutputGroup;CollectFrameworkReferences;CollectUpToDateCheckBuiltDesignTime;CollectPackageDownloads;ResolveAssemblyReferencesDesignTime;GenerateSupportedTargetFrameworkAlias;CollectAnalyzersDesignTime;CollectUpToDateCheckInputDesignTime;CollectUpToDateCheckOutputDesignTime;ResolvePackageDependenciesDesignTime;CollectSuggestedWorkloads;CollectCentralPackageVersions;CompileDesignTime;CollectResolvedCompilationReferencesDesignTime target(s)) -- FAILED.

 
Project Performance Summary:
        1 ms  C:\Users\jopepper\source\repos\MauiApp40\MauiApp40\MauiApp40.csproj   1 calls
                  1 ms  ResolveFrameworkReferencesDesignTime;ResolveProjectReferencesDesignTime2;CollectResolvedSDKReferencesDesignTime;CollectPackageReferences;ResolveComReferencesDesignTime;BuiltProjectOutputGroup;CollectFrameworkReferences;CollectUpToDateCheckBuiltDesignTime;CollectPackageDownloads;ResolveAssemblyReferencesDesignTime;GenerateSupportedTargetFrameworkAlias;CollectAnalyzersDesignTime;CollectUpToDateCheckInputDesignTime;CollectUpToDateCheckOutputDesignTime;ResolvePackageDependenciesDesignTime;CollectSuggestedWorkloads;CollectCentralPackageVersions;CompileDesignTime;CollectResolvedCompilationReferencesDesignTime   1 calls
 
Build FAILED.
    0 Warning(s)
    0 Error(s)

Eventually, he set enough breakpoint to see a message mentioning cancellation

8962e2c4-9833-4ad0-b7b1-da50729c3a5e

and we were able to see some project system code calling BuildManager.CancelAllSubmissions().

. . . but that MSB4188 log message was nowhere to be found in the binlog, which wasted a ton of debugging time. We should try to fix that.

rainersigwald avatar Jan 13 '22 16:01 rainersigwald

Do we have any more information like a repro?

Forgind avatar Apr 22 '22 21:04 Forgind

I think you can create a new .NET MAUI project and just watch the design-time builds appear in Project System Tools. Frequently, one of them will fail with this problem.

Use 17.2 Preview or VS main to see it.

jonathanpeppers avatar Apr 22 '22 21:04 jonathanpeppers

Was this fixed at some point? I made a new Maui app in the internal preview version of VS and saw lots of successful builds: image

Forgind avatar Jun 03 '22 21:06 Forgind

@Forgind yes, it's possible that some of the work @tmeschter did recently fixed this. Related to: https://github.com/dotnet/maui/pull/6681

So maybe we don't have a repro for this problem anymore?

jonathanpeppers avatar Jun 03 '22 22:06 jonathanpeppers

@jonathanpeppers It has been a quite for a while. I assume, it has been resolved. Please reopen it, if you still experience this issue.

rokonec avatar Oct 26 '22 07:10 rokonec