Multi-targeting build does not surface inner errors when tasks fail
See original GitHub issueIn the attached project, I’m trying to build it with msbuild /t:restore;build
on Windows (with all of the Xamarin stuff installed). The problem is that the Xamarin targets are reporting warnings (for some reason?) and while they appear to build ok and produce output dll’s, the Sdk build reports it as failed and thus fails the build.
Done Building Project "C:\dev\msal\src\Microsoft.Identity.Client\Microsoft.Identity.Client.csproj" (Build target(s)) --
FAILED.
Done Building Project "C:\dev\msal\src\Microsoft.Identity.Client\Microsoft.Identity.Client.csproj" (build target(s)) --
FAILED.
Build FAILED.
"C:\dev\msal\src\Microsoft.Identity.Client\Microsoft.Identity.Client.csproj" (build target) (1) ->
"C:\dev\msal\src\Microsoft.Identity.Client\Microsoft.Identity.Client.csproj" (Build target) (1:8) ->
(_GetPrimaryCpuAbi target) ->
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.Debugging.targets(308,2): warning : One or more
errors occurred. [C:\dev\msal\src\Microsoft.Identity.Client\Microsoft.Identity.Client.csproj]
"C:\dev\msal\src\Microsoft.Identity.Client\Microsoft.Identity.Client.csproj" (build target) (1) ->
"C:\dev\msal\src\Microsoft.Identity.Client\Microsoft.Identity.Client.csproj" (Build target) (1:9) ->
(_SayHello target) ->
C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Windows.After.targets(63,5): warning VSX1000: The project Micr
osoft.Identity.Client was built while disconnected from a Mac agent, so only the main assembly was compiled. Connect to
a Xamarin Mac build agent to build the full application. [C:\dev\msal\src\Microsoft.Identity.Client\Microsoft.Identity
.Client.csproj]
2 Warning(s)
0 Error(s)
Time Elapsed 00:00:04.01
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Using build tasks with multitarget solutions
the error when multitarget is enabled: MyProject.csproj(71,3): error MSB4036: The "MyTask" task was not found. Check the following: 1.) The ...
Read more >Nuget Restore fails when project has multiple target ...
The error I receive in the output window of Visual Studio is: C:\Program Files\dotnet\sdk\2.1.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.
Read more >Error Task - MSBuild
Use the MSBuild Error task to stop a build and log an error based on an evaluated conditional statement.
Read more >Troubleshoot .NET Framework targeting errors
This article provides resolutions for MSBuild errors that might occur because of reference issues.
Read more >Visual Studio Build task fails in Azure DevOps - my .Net ...
I am seeing an issue when building in Azure DevOps on my own build VM. Same error occurs on a VS2017 hosted agent....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@onovotny can you file a separate bug for allowing restore;build?
I think the issue here was that the inner build was getting an out of memory exception, which wasn’t being reported cleanly. I believe “normal” errors from the inner builds should be reported correctly.