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
PresentationUI ref-assembly missing: Build fails because cannot find type PresentationUIStyleResources #1423
Comments
Well this is strange. PresentationUI.dll is NOT part of the reference set of .NET Framework. So this shouldn't build in .NET Framework at all. However, looking at the binlog from the build, I see it picks this up from the GAC using the full library DLL.
In Preview7, we removed PresentationUI from our reference set to match .NET Framework's reference set. I don't really get why this is allowed. If you built against a GAC containing assemblies from version X that has public API not available in runtime assemblies X-1, you'd have a runtime break on systems with X-1, even if you were targeting that framework. This just seems unintended. @vatsan-madhavan @SamBent What do you think about this? If picking up references from the GAC is a scenario in .NET Framework I am worried that matching the reference set isn't enough. Even if this is unintended, it seems like something that is relied on. The binlog is attached here: |
Picking up references from GAC has always been a thing in VS/msbuild and as a user you don't really see a difference in the experience if you aren't using the VS UI to add references. We have been using this in the past a few times, but I don't think for framework assemblies. |
Additional Info: The XAML line that produces this build error comes from the original control template of the I believe adding the reference to |
@rladuca, If we have a public type, then we are probably going to have to keep it .NET Core 3.0 and also include it in ref-assembly surface given the fact that there is no GAC or easy discovery mechanisms for runtime-assemblies in .NET Core 3.0. As far as I can remember, this is likely the only type that's missing. We should probably bring back PresentationUI ref assembly (easily done in the builds - need to ask shiproom permission first), and update our APICompat targets to incorporate what we've learned here. /cc @ericstj |
Yeah that makes sense. I was completely unaware of this GAC reference scenario, but bringing back the assembly is quick enough. We can bring it up in shiproom and if they approve it I can go about resurrecting it. |
@rladuca As much as |
Adding PUI to RefAssembly list in props.
* Helps with addressing #1423 - adding back PresentationUI ref-assembly. - Adding PUI to RefAssembly list in props. - Add PUI to RefApiCompatNeededProjects
The following PR's in DncEng\dotnet-wpf-int bring back the ref-assemblies fully: |
Add PresentationUI.dll to WPF profile
Add PresentationUI.dll to WPF profile
Add PresentationUI.dll to WPF profile
Add PresentationUI.dll to WPF profile
* Fixes dotnet/wpf#1423 Add PresentationUI.dll to WPF profile * Update WPF Dependencies
This is now completed - we should start seeing new core-sdk builds shortly that contains PresentationUI ref assemblies again. |
* Fixes dotnet/wpf#1423 Add PresentationUI.dll to WPF profile * Update WPF Dependencies Commit migrated from dotnet/core-setup@0588e55
Now I get a build error for a solution which already build with an older .NET Core 3 version.
It worked with:
Reproduce:
System.Waf.sln
in VS 2019.Samples/Writer/Writer.Presentation
Build error:
Code line that produces this build error:
https://github.com/jbe2277/waf/blob/c7773460a1d58256b201df15c197c2b4263ec88e/src/System.Waf/Samples/Writer/Writer.Presentation/Views/PrintPreviewView.xaml#L15
Workaround:
Comment this line and it builds.
The text was updated successfully, but these errors were encountered: