Open ye4241 opened 1 year ago
@ye4241 - I attempted to recreate the problem using the sample application you provided, but I encountered different errors as shown in the image here:
Would you be able to verify if the sample application is functioning as intended while I continue my investigation?
@Kuldeep-MS You may need to remove the default Custom Tool for .resx files in .csproj file, as it might have been accidentally added when reopening the project.
Or just delete below codes to make sure there is no generator of resx file.
Errors:
Description
Cannot use generated code from analyzers in xaml file, it reported missing assembly or reference.
Reproduction Steps
Steps
<IncludePackageReferencesDuringMarkupCompilation>true</IncludePackageReferencesDuringMarkupCompilation>
in csprojCustom Tool
of it, addHelloWorld
key into resx.<TextBlock Text="{x:Static res:Resources.HelloWorld}" />
Error
Sample SamleApplication.zip
Expected behavior
IncludePackageReferencesDuringMarkupCompilation
should works for xaml file. Please include sources from analyzers in CoreCompile target.Actual behavior
IncludePackageReferencesDuringMarkupCompilation
not works in xaml file.Regression?
No response
Known Workarounds
https://github.com/dotnet/wpf/issues/3404
Impact
No response
Configuration
No response
Other information
No response