Skip to content

Commit

Permalink
update roslyn patch againnnn
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorHofer authored Dec 18, 2024
1 parent 74a830d commit e1729a6
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
From c8355ffa159872e061789a62e02768c8f52e7c53 Mon Sep 17 00:00:00 2001
From: Viktor Hofer <viktor.hofer@microsoft.com>
Date: Wed, 18 Dec 2024 14:38:02 +0100
Subject: [PATCH] FIx build errors with newer toolset and dependencies

Fixes the following two errors:
- src/Features/Core/Portable/ExternalAccess/Watch/Api/WatchHotReloadService.cs(217,13): error CS1503: Argument 4: cannot convert from 'System.Collections.Immutable.ImmutableHashSet<Microsoft.CodeAnalysis.Project>' to 'System.Collections.Generic.IReadOnlySet<Microsoft.CodeAnalysis.Project>' [src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj::TargetFramework=net9.0]
- src/roslyn/src/Features/Core/Portable/ExternalAccess/Watch/Api/WatchHotReloadService.cs(218,13): error CS1503: Argument 5: cannot convert from 'System.Collections.Immutable.ImmutableHashSet<Microsoft.CodeAnalysis.Project>' to 'System.Collections.Generic.IReadOnlySet<Microsoft.CodeAnalysis.Project>' [src/roslyn/src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj::TargetFramework=net9.0]

The underlying SDK being used is "10.0.100-alpha.1.24555.54"

Backport: https://github.com/dotnet/roslyn/pull/76486

---
src/Compilers/Core/Portable/Microsoft.CodeAnalysis.csproj | 4 ++--
.../Core/Portable/Microsoft.CodeAnalysis.Features.csproj | 2 +-
.../Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/Compilers/Core/Portable/Microsoft.CodeAnalysis.csproj b/src/Compilers/Core/Portable/Microsoft.CodeAnalysis.csproj
index 94c47e9a01e..e946b3ad490 100644
--- a/src/Compilers/Core/Portable/Microsoft.CodeAnalysis.csproj
+++ b/src/Compilers/Core/Portable/Microsoft.CodeAnalysis.csproj
@@ -31,9 +31,9 @@
will import everything but content files from Microsoft.CodeAnalysis.Analyzers, specifically, analyzers.
-->
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Condition="'$(DotNetBuildSourceOnly)' != 'true'" PrivateAssets="ContentFiles" />
- <PackageReference Include="System.Collections.Immutable" />
+ <PackageReference Include="System.Collections.Immutable" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
<PackageReference Include="System.Memory" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
- <PackageReference Include="System.Reflection.Metadata" />
+ <PackageReference Include="System.Reflection.Metadata" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
<PackageReference Include="System.Threading.Tasks.Extensions" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
<PackageReference Include="System.Text.Encoding.CodePages" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
diff --git a/src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj b/src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj
index c3729dd7244..48a5d9c53a7 100644
--- a/src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj
+++ b/src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj
@@ -139,7 +139,7 @@
<PackageReference Include="Microsoft.CodeAnalysis.AnalyzerUtilities" />
<PackageReference Include="Microsoft.CodeAnalysis.Elfie" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />
<PackageReference Include="Microsoft.DiaSymReader" />
- <PackageReference Include="System.Text.Json" />
+ <PackageReference Include="System.Text.Json" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
<PackageReference Include="System.Threading.Tasks.Extensions" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
</ItemGroup>
<Import Project="..\..\..\Analyzers\Core\Analyzers\Analyzers.projitems" Label="Shared" />
diff --git a/src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj b/src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj
index 7ddf1ce681c..877356417e5 100644
--- a/src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj
+++ b/src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj
@@ -29,8 +29,8 @@
since it's now automatic, and Source Build will ensure we get a proper one automatically if we do nothing; if we reference the older version
then source build may only give us a reference assembly would fail if we then try to actually run that output. -->
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
- <PackageReference Include="System.IO.Pipelines" />
- <PackageReference Include="System.Threading.Channels" />
+ <PackageReference Include="System.IO.Pipelines" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
+ <PackageReference Include="System.Threading.Channels" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
</ItemGroup>
<ItemGroup Label="Linked Files">
<Compile Remove="Storage\SQLite\**\*.cs" Condition="'$(DotNetBuildSourceOnly)' == 'true'" />

This file was deleted.

0 comments on commit e1729a6

Please sign in to comment.