dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
7.08k stars 1.17k forks source link

runtimeconfig.template.json per build configuration #5133

Open okipol88 opened 3 years ago

okipol88 commented 3 years ago

Hello,

Currently we are developing a .NET app using WPF. The requirement is to have a specified folder structure. To achieve this we use runtimeconfig.template.json to specify the additionalProbingPaths.

The problem is that as it works for our release, the designer is complaining:

Error: he XAML Designer has exited unexpectedly. (Exit code: 8000808c)

Description: A .NET Core application failed.

The event log gives us:

Application: WpfSurface.exe Path: Description: A .NET Core application failed. Application: WpfSurface.exe Path: C:\Users\$xxx\AppData\Local\Microsoft\VisualStudio\16.0_be93cc4c\Designer\Cache\11842567455x64DA\WpfSurface.exe Message: Error: An assembly specified in the application dependencies manifest (WpfSurface.deps.json) was not found: package: 'Microsoft.Win32.Registry', version: '5.0.0' path: 'runtimes/win/lib/netstandard2.0/Microsoft.Win32.Registry.dll'

If we remove the additional probing paths everything is ok. I can add an msbuild task to remove/include the file per build. This however is then not reloading when put back to Debug then removal of obj/bin folders needs to be done.

Is there a better way to do this? Are runtimeconfig.template.json files per configuration not supported? Thank you in advance.

dotnet-issue-labeler[bot] commented 3 years ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

dsplaisted commented 3 years ago

@dotnet/wpf-developers I've moved this to the WPF repo, please triage.