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.

error MSB4181: The "CompileXaml" task returned false but did not log

See original GitHub issue

This issue has been moved from a ticket on Developer Community.


[severity:I’m frustrated, but able to complete my work] [regression] “worked-in:actual on July 9, 2020” The studio breaks its teeth on this fragment:

<Button.Content>
    <StackPanel Orientation="Horizontal">
        <TextBlock FontSize="20" Text="⏱" />
        <ProgressRing Name="StopwatchIndic" Margin="5,0,0,0" IsActive="True" Visibility="Visible" />
    </StackPanel>

When you try to assemble a project in any of the modes (debug/release-x86/x64) everything goes well, but when you build a package for the store immediately for x86 x64 I receive an error message. It is often accompanied by reports that StopwatchIndic has not been included in the xaml.cs file. This ugliness occurs on two computers and two Studios - 16.6.5 and 16.7.0 Preview 5. “Recovery” Studio does not help to solve the problem.


Original Comments

Feedback Bot on 7/26/2020, 11:14 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

(no solutions)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:32 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
stevenbrixcommented, Sep 15, 2020

@AnriaruDoragon I put the text of the error into Google Translate, and it said something about the configurations being incorrect (trying to build arm, but you should choose x64 or x86) - this might be a red herring based off what properties you pass into msbuild. Can you please get logs in English next time? There isn’t much I can do with logs that are in Russian.

@Gavin-Williams can you follow the steps here for collecting binlogs through VS? https://github.com/microsoft/microsoft-ui-xaml/blob/master/docs/debugging_buildfailures.md#collecting-binlogs-through-visual-studio

1reaction
AnriaruDoragoncommented, Aug 18, 2020

@chungweileong94 and @AnriaruDoragon if you could share either repro project or binlog that would be incredibly helpful.

To get an appropriate binlog that simulates building for the store, you can build your project from a Developer Command prompt with this command: msbuild /p:AppxBundlePlatforms=x86 /p:Platform=x86 /p:Configuration=Release /p:BuildAppxUploadPackageForUap=true /bl

If you do this, does the issue reproduce ? If so, please upload the msbuild.binlog file that is created.

@stevenbrix I tried to build a project using this command, no errors occurred, the project was built and works, but when I try to pack it again from menu, it gives the same error, deleting the /obj still solves this problem. For some reason, the studio does not update the generated code after changes during packaging.

Here is the repository, in the readme I described the versions and how to get this error. AnriaruDoragon/UWP-MSB4181-CompileXaml

The first time the error occurred was in another project, I created a new one to specifically cause this error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The "CompileXaml" task returned false but did not log an ...
Starting from a clean repository fixed it for me. Close visual studio, delete all files generated by visual studio, bin folder, obj folder,...
Read more >
MSB4181: The 'task' task returned false but did not log an ...
This error occurs when a task returned false without logging an error. This indicates a failure from a task that did not report...
Read more >
"CompileXaml" task failed unexpectedly in Visual Studio ...
I upgrade my Visual Studio from Update 2 to Update 4. When you Build your project it gives and error about Hyper -...
Read more >
ASP.Net: The task task returned false but did not log an error
This error occurs when a task returned false without logging an error. This indicates a failed task that did not report enough information...
Read more >
The "CompileXaml" task returned false but did not log
error MSB4181 : The "CompileXaml" task returned false but did not logClosed ... [severity:I'm frustrated, but able to complete my work] ...
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