Regression for custom AssemblyName in WPF apps
Author: maciej-izakCreated Nov 9, 2021Updated Sep 29, 2026
LabelsBugPriority:1Wave1
Issue Description
The PropertyGroup item AssemblyName cannot use macros for WPF app. This is regression, all was fine for previous MSBuild version (16)
Steps to Reproduce
Add to *.csproj something like :
<MainName>$(MSBuildProjectName.Replace('-NetCore', ''))</MainName>
<AssemblyName>$(MainName)</AssemblyName>Example project attached:
Expected Behavior
Should compile/build
Actual Behavior
Error occurs :
MainWindow.xaml(10, 10): [MC3074] The tag 'DelayTextBox' does not exist in XML namespace 'clr-namespace:WpfApp1'. Line 10 Position 10.When mentioned above part of *.csproj is deleted all compiles/build again...
Analysis
Important note : to reproduce, ensure that bin and obj directories are deleted.
Versions & Configurations
17.0.0.52104
Source: dotnet/wpf