Skip to content

Commit f5ac15e

Browse files
authored
Add known issue for RC1 incompatibility with 17.11 (#9489)
1 parent a83ab06 commit f5ac15e

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

release-notes/9.0/known-issues.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,27 @@ You may encounter the following known issues, which may include workarounds, mit
44

55
## .NET WPF
66

7-
#### 1. Usage of incorrect types as DynamicResource
8-
In earlier previews (or .NET 8 and before), applications that attempted to use a `DynamicResource` with incorrect types, and referenced the same from a library, would silently fail by swallowing the exception. However, with the introduction of DynamicResource optimization [here](https://github.com/dotnet/wpf/pull/5610), this behavior has changed. The same implementation will now result in a `XamlParseException` being thrown, potentially causing the application to crash.
7+
### 1. Usage of incorrect types as DynamicResource
8+
In earlier previews (or .NET 8 and before), applications that attempted to use a `DynamicResource` with incorrect types, and referenced the same from a library, would silently fail by swallowing the exception. However, with the introduction of DynamicResource optimization [here](https://github.com/dotnet/wpf/pull/5610), this behavior has changed.
9+
The same implementation will now result in a `XamlParseException` being thrown, potentially causing the application to crash.
910

1011
The crash might look something like this:
11-
```
12+
```cs
1213
PresentationFramework.dll!System.Windows.Markup.XamlReader.RewrapException(System.Exception e, System.Xaml.IXamlLineInfo lineInfo, System.Uri baseUri)
1314
PresentationFramework.dll!System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader xamlReader, System.Xaml.IXamlObjectWriterFactory writerFactory, bool skipJournaledProperties, object rootObject, System.Xaml.XamlObjectWriterSettings settings, System.Uri baseUri)
1415
PresentationFramework.dll!System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader xamlReader, bool skipJournaledProperties, object rootObject, System.Xaml.Permissions.XamlAccessLevel accessLevel, System.Uri baseUri)
1516
PresentationFramework.dll!System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream stream, System.Windows.Markup.ParserContext parserContext, object parent, bool closeStream)
1617
PresentationFramework.dll!System.Windows.Application.LoadComponent(object component, System.Uri resourceLocator)
1718
```
1819

19-
#### Mitigation:
20+
### Mitigation
2021
Developers can prevent this crash by updating the resource with the correct value types. However, for those who need to maintain the previous behavior, an **opt-out switch** is being provided in the .NET 9 RC1 release. This switch allows applications to revert to the unoptimized `DynamicResource` usage.
2122

2223

23-
#### 2. Incorrect rendering of applications launched with dark theme
24+
### 2. Incorrect rendering of applications launched with dark theme
2425
Applications using library-based themes might encounter incorrect rendering of the dark theme due to the implementation of the `Fluent` theme. This could result in incorrect resource settings for windows, such as background and accent colors, which may appear transparent.
2526

26-
#### Available Workaround:
27+
### Available Workaround
2728
This issue occurs only when starting the application with the dark theme enabled. To ensure correct rendering, the resources can be reloaded. This reloading process can be implemented by hooking into a window event, such as `ContentRendered`.
2829

2930
The implementation for the same would look something like this -
@@ -39,3 +40,15 @@ private void ReactiveWindow_ContentRendered(object sender, System.EventArgs e)
3940
```
4041

4142
The behavior will be **fixed in .NET 9 RC1** release.
43+
44+
## .NET SDK
45+
46+
### .NET 9.0.100-RC.1 will fail when used with 17.11
47+
48+
There is an incompatible dependency between a file loaded from the SDK and the dependencies that Visual Studio includes.
49+
50+
`
51+
NETSDK1060 Error reading assets file: Error loading lock file '...\obj\project.assets.json' : Could not load file or assembly 'System.Text.Json, Version=8.0.0.4, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
52+
`
53+
54+
This behavior will be **fixed in an upcoming Visual Studio 17.11.x** release

0 commit comments

Comments
 (0)