-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Regression for custom AssemblyName in WPF apps #5711
Comments
I have the same issue since upgrading to VS2022. |
Team Triage: What msbuild version did this succeed on? We can't reproduce this with 16.11.0. |
@benvillalobos It was 16.9.0, but .NET 5.0 SDK on my CI system was not up to date, so I guess that 16.11.0 is also ok. With msbuild 17.0.0 I am not able to build my WPF projects for |
I can confirm that custom assembly names with macros were still working with 16.11.0, but stopped working with 17.0.0. |
This sounds very similar to an issue (#5576) I've been having with both VS 2019 and VS 2022, it was only affecting .net 5 on 2019 before but it's affecting .net 4x on 2022 now, and somehow having both installed as made the problem spread to 2019. My setup is slightly different, I have a Directory.Build.props file which sets I urgently need a fix for this, because now my software won't compile without adding explicit |
I had to revert back to 16.9.x to get it to compile again, 16.10.x, 16.11.x and 17.x all have the issue. |
I believe I have found a workaround, which might reveal the answer to whomever fixes this. By adding:
It corrects the assembly name from being the Temporary one generated by the WPF compilation. Note: this only works when |
FYI Little repository to reproduce the issue: https://github.com/loicmorvan-ansys/XamlBugReproduction |
@benvillalobos The image that you shared, helps in identifying the root cause.
|
@vishalmsft The issue is in There are 2 methods which handle generating the project in this step, and which one is determined by Ultimately, the properties need to resolve to the same value for this temporary build as they do for the final build. In my example, that is because |
Do you have sort of a planning for the publication of a fix? |
I have a potential fix that I'm experimenting with right now. It's working but I have to do more tests to make sure that I'm not breaking anything. My other comment here gives a bit more explanation. Both issues are caused by the same bug. |
@ThomasGoulet73: Did you have any progress on your experiments? My output directory gets bloated and I cannot see any real output anymore. |
Can we expect a fix soon? This bug completely blocks development. |
Just to clarify - the fix for this has been merged for .NET9. Hence it will be available starting .NET9 Preview1. |
@Kuldeep-MS does this also fix #2930? It was suggested by someone in this thread that both issues have the same cause. |
@HermanEldering - No it dosen't. The fix is intended to solve the problem originally reported in this issue i.e. |
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 :
Example project attached:
WpfApp1.zip
Expected Behavior
Should compile/build
Actual Behavior
Error occurs :
When mentioned above part of *.csproj is deleted all compiles/build again...
Analysis
Important note : to reproduce, ensure that
bin
andobj
directories are deleted.Versions & Configurations
17.0.0.52104
The text was updated successfully, but these errors were encountered: