question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multi-targeting build does not surface inner errors when tasks fail

See original GitHub issue

In 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.

Microsoft.Identity.Client.zip

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:closed
  • Created 7 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
srivatsncommented, Dec 21, 2016

@onovotny can you file a separate bug for allowing restore;build?

0reactions
dsplaistedcommented, May 22, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found