Skip to content

Commit c8355ff

Browse files
committed
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"
1 parent 2f0aa43 commit c8355ff

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Compilers/Core/Portable/Microsoft.CodeAnalysis.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
will import everything but content files from Microsoft.CodeAnalysis.Analyzers, specifically, analyzers.
3232
-->
3333
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Condition="'$(DotNetBuildSourceOnly)' != 'true'" PrivateAssets="ContentFiles" />
34-
<PackageReference Include="System.Collections.Immutable" />
34+
<PackageReference Include="System.Collections.Immutable" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
3535
<PackageReference Include="System.Memory" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
36-
<PackageReference Include="System.Reflection.Metadata" />
36+
<PackageReference Include="System.Reflection.Metadata" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
3737
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
3838
<PackageReference Include="System.Threading.Tasks.Extensions" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
3939
<PackageReference Include="System.Text.Encoding.CodePages" Condition="'$(TargetFramework)' == 'netstandard2.0'" />

src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
<PackageReference Include="Microsoft.CodeAnalysis.AnalyzerUtilities" />
140140
<PackageReference Include="Microsoft.CodeAnalysis.Elfie" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />
141141
<PackageReference Include="Microsoft.DiaSymReader" />
142-
<PackageReference Include="System.Text.Json" />
142+
<PackageReference Include="System.Text.Json" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
143143
<PackageReference Include="System.Threading.Tasks.Extensions" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
144144
</ItemGroup>
145145
<Import Project="..\..\..\Analyzers\Core\Analyzers\Analyzers.projitems" Label="Shared" />

src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
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
3030
then source build may only give us a reference assembly would fail if we then try to actually run that output. -->
3131
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
32-
<PackageReference Include="System.IO.Pipelines" />
33-
<PackageReference Include="System.Threading.Channels" />
32+
<PackageReference Include="System.IO.Pipelines" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
33+
<PackageReference Include="System.Threading.Channels" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
3434
</ItemGroup>
3535
<ItemGroup Label="Linked Files">
3636
<Compile Remove="Storage\SQLite\**\*.cs" Condition="'$(DotNetBuildSourceOnly)' == 'true'" />

0 commit comments

Comments
 (0)