Closed AchimStuy closed 11 months ago
Since this is an issue with WPF and how it determines properties for it's inner builds, I am going to move it to that repo for troage.
Hi @AchimStuy, it seems that this problem is duplicate of the one described in https://github.com/dotnet/wpf/issues/5711. Could you please attempt the solution provided there and inform us if it resolves the issue?
Hi @Kuldeep-MS, yes, this workaround is working. But I want to state, that it's only a workaround and not a solution.
Hello @AchimStuy, I'm pleased to hear that the solution I provided is working for you. However, could you please explain why you consider it a workaround rather than a permanent fix? Additionally, what do you believe would be the optimal solution to resolve the issue?
Hi @Kuldeep-MS,
thanks for asking!
I am expecting WPF build to work out of the box without adding
<AssemblyName Condition="$(_TargetAssemblyProjectName) != ''">$(_TargetAssemblyProjectName).$(Version)</AssemblyName>
to every project. (Though I don't know how, but you're the expert.) Because I am managing the $(Version)
inside the .csproj file, I can't just add the line to a global .props file.
The line above is an additional line, which must be documented and all the stuff is cluttering my project files, that I could also hard code the assembly name, but would lose the dynamic AssemblyName functionality.
Hi @achimStuy, sorry for the confusion earlier. I was actually referring to the fix that I submitted three months ago, not the workaround that was shared on the issue. Link To Fix - https://github.com/dotnet/wpf/pull/7557
Could you please take a look at the fix? I am hopeful that it will work. You can find instructions for checking the fix in the documentation provided here.
Hi @AchimStuy, could you kindly review my previous comment and inform us if the solution provided has resolved your issue? This will allow us to close the issue.
Sorry, @Kuldeep-MS, I'm on a business trip this week, so I don't have time to look into it. You will hear from me next week.
Just that I am doing the right things: I must clone the repo, build and replace the files at C:\Program Files\dotnet\Sdk\ with my built files and then try again to build?
@Kuldeep-MS, yes, I can confirm, that your PR fixes the issue.
@AchimStuy - Thanks for your confirmation. Closing this Issue.
Describe the bug
I am overriding the
<AssemblyName>
in my project properties, in order to have a manually strong named assembly.Setting
works just as expected. But setting
as it is done by Microsoft.NET.Sdk.props, raises MC3050 in the Generic.xaml file: "Cannot find the type 'local:CustomControl1'."
To Reproduce
I've created a minimalistic repro at https://github.com/AchimStuy/wpf-assemblyname-from-projectname.
Exceptions (if any)
none
Further technical details
dotnet --info:
VS Info: