Skip to content

CompileAvaloniaXamlTask - handle no-pdb compilations #15509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 2, 2024

Conversation

ltetak
Copy link
Contributor

@ltetak ltetak commented Apr 25, 2024

What does the pull request do?

Fix build of C# projects with no PDB.

What is the current behavior?

Error is thrown by msbuild

***\.nuget\packages\avalonia\11.1.0-beta2\buildTransitive\AvaloniaBuildTasks.targets(138,5): error MSB
4018: The "CompileAvaloniaXamlTask" task failed unexpectedly. [***]
***\.nuget\packages\avalonia\11.1.0-beta2\buildTransitive\AvaloniaBuildTasks.targets(138,5): error MSB
4018: System.IO.FileNotFoundException: Could not find file '***/net7.0-windows\win-x64\Application.pdb'. 

This was caused by this optimization 223cfab
The original code checked for the existence of the PDB file but the new code does not.

To test this add this to any csproj file in the project with XAML files.

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
   <DebugType>none</DebugType>
 </PropertyGroup>

What is the updated/expected behavior with this PR?

If there is no PDB then there is nothing to copy. Just ignore it.

@maxkatz6 maxkatz6 added backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch backport-candidate-11.1.x Consider this PR for backporting to 11.1 branch bug labels Apr 25, 2024
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0047731-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@jmacato
Copy link
Member

jmacato commented Apr 25, 2024

@cla-avalonia recheck

@cla-avalonia
Copy link
Collaborator

cla-avalonia commented Apr 25, 2024

  • All contributors have signed the CLA.

@ltetak
Copy link
Contributor Author

ltetak commented Apr 26, 2024

@cla-avalonia agree

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0047966-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 added this pull request to the merge queue May 2, 2024
Merged via the queue into AvaloniaUI:master with commit d1d6e4f May 2, 2024
maxkatz6 pushed a commit that referenced this pull request May 8, 2024
* CompileAvaloniaXamlTask - handle no-pdb compilations

* handle PDBs separately
@maxkatz6 maxkatz6 added backported-11.1.x and removed backport-candidate-11.1.x Consider this PR for backporting to 11.1 branch labels May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch backported-11.1.x bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants