Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/core.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDipesh Kumar <dipeshkumar@microsoft.com>2022-07-15 17:42:21 +0300
committerDipesh Kumar <dipeshkumar@microsoft.com>2022-07-15 17:42:21 +0300
commit8efba8ffcc21518ca28fb7e9a33a721aa53826ea (patch)
tree0bf519330ba89f0947e62c1293f58c3616a520c1
parent1449d021c280cb20a542172cab2df74c8e0284ea (diff)
Added the doc for known WPF failure in .NET 6.0.7
-rw-r--r--release-notes/6.0/known-issues.md33
1 files changed, 33 insertions, 0 deletions
diff --git a/release-notes/6.0/known-issues.md b/release-notes/6.0/known-issues.md
index 21301e18..91126cab 100644
--- a/release-notes/6.0/known-issues.md
+++ b/release-notes/6.0/known-issues.md
@@ -125,3 +125,36 @@ The team appreciates that the fix is less than ideal, however it was chosen for
```
* Additionally 6.0.1 and 6.0.2 are security releases, and customers are encouraged to update to the latest version.
+### Issues building WPF application with Windows Desktop 6.0.7 and 6.0.8
+
+Some customers are unable to build WPF applications with Windows Desktop 6.0.7 and 6.0.8, if they are including source generators coming from NuGet Packages, and receive errors similar to :
+```
+Rebuild started...
+1>------ Rebuild All started: Project: ObservablePropertyTest, Configuration: Debug Any CPU ------
+Restored C:\git\ObservablePropertyTest\ObservablePropertyTest.csproj (in 2 ms).
+1>C:\git\ObservablePropertyTest\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator\__KnownINotifyPropertyChangedOrChangingArgs.cs(12,27,12,70): error CS0101: The namespace 'CommunityToolkit.Mvvm.ComponentModel.__Internals' already contains a definition for '__KnownINotifyPropertyChangedOrChangingArgs'
+1>C:\git\ObservablePropertyTest\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator\__KnownINotifyPropertyChangedOrChangingArgs.cs(7,6,7,51): error CS0579: Duplicate 'global::System.CodeDom.Compiler.GeneratedCode' attribute
+1>C:\git\ObservablePropertyTest\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator\__KnownINotifyPropertyChangedOrChangingArgs.cs(8,6,8,52): error CS0579: Duplicate 'global::System.Diagnostics.DebuggerNonUserCode' attribute
+1>C:\git\ObservablePropertyTest\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator\__KnownINotifyPropertyChangedOrChangingArgs.cs(9,6,9,69): error CS0579: Duplicate 'global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage' attribute
+1>C:\git\ObservablePropertyTest\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator\__KnownINotifyPropertyChangedOrChangingArgs.cs(10,6,10,51): error CS0579: Duplicate 'global::System.ComponentModel.EditorBrowsable' attribute
+1>C:\git\ObservablePropertyTest\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator\__KnownINotifyPropertyChangedOrChangingArgs.cs(11,6,11,29): error CS0579: Duplicate 'global::System.Obsolete' attribute
+1>C:\git\ObservablePropertyTest\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator\ObservablePropertyTest.TestVM.cs(12,23,12,33): error CS0102: The type 'TestVM' already contains a definition for 'TestString'
+1>Done building project "ObservablePropertyTest_yynlzhol_wpftmp.csproj" -- FAILED.
+========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
+```
+
+This happened because WPF builds in 6.0.7 onwards, only considered source generators that were coming from nuget references. This caused an issue when there were source generators that were essentially coming via FrameworkReference. This issue has already been addressed in next release (6.0.9). However, the following workaround would unblock WPF builds.
+
+**Fix:**
+* To enable build in Windows Desktop 6.0.7, navigate to the directory containing the `Microsoft.WinFx.targets` file ( `C:\Program Files\dotnet\sdk\6.0.302\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets` )
+* Add the following target in the file :
+ ```xml
+
+ <Target Name="RemoveDuplicateAnalyzers" BeforeTargets="CoreCompile">
+ <ItemGroup>
+ <FilteredAnalyzer Include="@(Analyzer->Distinct())" />
+ <Analyzer Remove="@(Analyzer)" />
+ <Analyzer Include="@(FilteredAnalyzer)" />
+ </ItemGroup>
+ </Target>
+ ``` \ No newline at end of file