You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When run the 3rd party application with the latest .NET 9 build "dotnet-sdk-9.0.100-preview.7.24352.8", it failed to launch with exception: 'Value cannot be null. (Parameter 'key')'.
Reproduction Steps
App Repro steps:
Open C:\ReproApps\wpfui\Wpf.Ui.Gallery.runtimeconfig.json file (Please refer to the App location and repro machine info fromdevdiv bug).
Change the "Wpf.Ui.Gallery.runtimeconfig.json" file to let the app run against with dotnet-sdk-dotnet-sdk-9.0.100-preview.7.24352.8.
Launch failed.
Open Event Viewer, we can see below detailed stack trace message:
Application: Wpf.Ui.Gallery.exe
CoreCLR Version: 9.0.24.35201
.NET Version: 9.0.0-preview.7.24352.1
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Windows.Markup.XamlParseException: Set property 'Wpf.Ui.Markup.ThemesDictionary.Theme' threw an exception.
---> System.ArgumentNullException: Value cannot be null. (Parameter 'key')
at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
at System.Windows.DeferredResourceReferenceList.Get(Object resourceKey)
at System.Windows.ResourceDictionary.ClearWithoutLock()
at System.Windows.ResourceDictionary.Clear()
at System.Windows.ResourceDictionary.set_Source(Uri value)
at Wpf.Ui.Markup.ThemesDictionary.SetSourceBasedOnSelectedTheme(Nullable`1 selectedApplicationTheme)
at Wpf.Ui.Markup.ThemesDictionary.set_Theme(ApplicationTheme value)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
--- End of inner exception stack trace ---
at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at Wpf.Ui.Gallery.App.InitializeComponent() in C:\Users\v-gwei\Downloads\wpfui-main\wpfui-main\src\Wpf.Ui.Gallery\App.xaml:line 1
at Wpf.Ui.Gallery.App.Main()
Regression?
Yes Verify Scenarios:
1). Windows 10 21H2 AMD64 + dotnet-sdk-9.0.100-preview.6.24328.19: Pass
2). Windows 10 21H2 AMD64 + dotnet-sdk-9.0.100-preview.7.24352.8: Fail
3). Windows 10 21H2 AMD64 + dotnet-sdk-9.0.100-preview.7.24353.17: Fail
.NET SDK:
Version: 9.0.100-preview.7.24352.8
Commit: 707091200d
Workload version: 9.0.100-manifests.82c210e1
MSBuild version: 17.12.0-preview-24352-02+47393a047
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.100-preview.7.24352.8\
Host:
Version: 9.0.0-preview.7.24352.1
Architecture: x64
Commit: static
.NET SDKs installed:
9.0.100-preview.7.24352.8 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 9.0.0-preview.7.24329.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 9.0.0-preview.7.24352.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 9.0.0-preview.7.24352.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other information
Debug Repro steps:
1.Open "C:\ReproAppSource\wpfui\Wpf.Ui.sln" with Visual Studio.
2. Build the solution.
3. Update bin\Debug\net8.0-windows10.0.22621.0\Wpf.Ui.Gallery.runtimeconfig.json to run against with dotnet-sdk-9.0.100-preview.7.24352.8:
Expected Result:
App launch successful in Visual Studio.
Actual Result:
App launch failed with exception thrown in Visual Studio.
Findings:
1.The issue occurs when loading resource xaml file. In below repro app, we tried remove all content in Light.xaml file and only keep below 1 StaticResource, the problem still occurs.
Description
When run the 3rd party application with the latest .NET 9 build "dotnet-sdk-9.0.100-preview.7.24352.8", it failed to launch with exception: 'Value cannot be null. (Parameter 'key')'.
Reproduction Steps
App Repro steps:
Expected behavior
Launch successfully.
Actual behavior
Launch failed.
Open Event Viewer, we can see below detailed stack trace message:
Regression?
Yes
Verify Scenarios:
1). Windows 10 21H2 AMD64 + dotnet-sdk-9.0.100-preview.6.24328.19: Pass
2). Windows 10 21H2 AMD64 + dotnet-sdk-9.0.100-preview.7.24352.8: Fail
3). Windows 10 21H2 AMD64 + dotnet-sdk-9.0.100-preview.7.24353.17: Fail
Known Workarounds
No response
Impact
No response
Configuration
Application Name: wpfui, Open-SD-WebUI-Launcher, Text-Grab
OS: Windows 10 21H2
CPU: X64
.NET Build Number: dotnet-sdk-9.0.100-preview.7.24352.8
App or App installer checking at: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2114834
Github Link:
https://github.com/lepoco/wpfui
https://github.com/Ray-Source-X/Open-SD-WebUI-Launcher
https://github.com/TheJoeFin/Text-Grab
Dotnet Info:
Other information
Debug Repro steps:
1.Open "C:\ReproAppSource\wpfui\Wpf.Ui.sln" with Visual Studio.
2. Build the solution.
3. Update bin\Debug\net8.0-windows10.0.22621.0\Wpf.Ui.Gallery.runtimeconfig.json to run against with dotnet-sdk-9.0.100-preview.7.24352.8:
Expected Result:
App launch successful in Visual Studio.
Actual Result:
![image](https://private-user-images.githubusercontent.com/83067197/345989341-13e6b394-23eb-4f42-a9dc-1b1a79277be6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3Mzg2MzEsIm5iZiI6MTcyMTczODMzMSwicGF0aCI6Ii84MzA2NzE5Ny8zNDU5ODkzNDEtMTNlNmIzOTQtMjNlYi00ZjQyLWE5ZGMtMWIxYTc5Mjc3YmU2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIzVDEyMzg1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTExNjc4NGZjYjg5ZGEyMWU1ZmYyNWU1OTNjYTg3ZWVkZDc1M2MzZmU2NGIyNDE5MGY1MjFiOTM4ZmFlMDEzYjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0._RWnao5uy6PLwa4xU7KVzFUqfY6qaydmEhgdi0GyzNU)
App launch failed with exception thrown in Visual Studio.
Findings:
1.The issue occurs when loading resource xaml file. In below repro app, we tried remove all content in Light.xaml file and only keep below 1 StaticResource, the problem still occurs.
@dotnet-actwx-bot @dotnet/compat
The text was updated successfully, but these errors were encountered: