Closed voroninp closed 3 months ago
@voroninp We derive a number of properties from the value of AssemblyName
. Because stuff in Directory.Build.targets
runs after basically everything else this simply isn't a scenario that can be reasonably supported. My recommendation would be that you take the logic you currently have in Directory.Build.targets
and place it into some common .targets
file that each .csproj
manually imports at the bottom. I know this isn't as elegant as you would like but it's just how MSBuild works.
Are not SDK targets run the last?
Windows App SDK is a Nuget package, not a .NET SDK, so its .targets
runs before Directory.Build.targets
.
Describe the bug
I define a prefix for assemblies in
Directory.Build.props
:And set names in
Directory.Build.targets
:If I do not set
<AddPrefixToAssembly>false</AddPrefixToAssembly>
in my MAUI project, I get this error:Steps to reproduce the bug
See this repo https://github.com/voroninp/BadWindows
Expected behavior
No response
Screenshots
No response
NuGet package version
None
Packaging type
Unpackaged
Windows version
No response
IDE
Visual Studio 2022-preview
Additional context
Advised here to create issue.