Skip to content

Allow Microsoft.CodeAnalysis.Collections to be updated by source-build so it isn't a prebuilt dependency #6960

@dagood

Description

@dagood

This version is not overridable by source-build:

<PackageReference Update="Microsoft.CodeAnalysis.Collections" Version="4.0.0-4.21379.20" />

The package is source-only, so it could be put into SBRP as a text-only package, but it costs manual maintenance whenever a new version comes along. If we just let source-build upgrade it, msbuild can use the "live" version produced by roslyn.

To make the Microsoft build consistent with upgrades, it seems like it would make sense to also hook this package up to Maestro++ dependency flow, to get updates in the Microsoft build as well. I don't see anything in #6595 pointing out reasons this package shouldn't be auto-updated.

Making this change as a patch makes dotnet/msbuild build without prebuilts, locally.

diff --git a/eng/Packages.props b/eng/Packages.props
index eb0144f9b..0f478634f 100644
--- a/eng/Packages.props
+++ b/eng/Packages.props
@@ -9,7 +9,7 @@
     <PackageReference Update="LargeAddressAware" Version="1.0.5" />
     <PackageReference Update="Microsoft.Build.NuGetSdkResolver" Version="$(NuGetBuildTasksVersion)" />
     <PackageReference Update="Microsoft.CodeAnalysis.Build.Tasks" Version="$(MicrosoftNetCompilersToolsetVersion)" />
-    <PackageReference Update="Microsoft.CodeAnalysis.Collections" Version="4.0.0-4.21379.20" />
+    <PackageReference Update="Microsoft.CodeAnalysis.Collections" Version="$(MicrosoftCodeAnalysisCollectionsPackageVersion)" />
     <PackageReference Update="Microsoft.CodeQuality.Analyzers" Version="3.3.0" PrivateAssets="all" />
     <PackageReference Update="Microsoft.DotNet.GenAPI" Version="2.1.0-prerelease-02404-02" />
     <PackageReference Update="Microsoft.DotNet.XUnitExtensions" Version="$(MicrosoftDotNetXUnitExtensionsVersion)" />
diff --git a/eng/Versions.props b/eng/Versions.props
index 7c66217f4..a356b7df0 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -26,6 +26,7 @@
   <!-- Production Dependencies -->
   <PropertyGroup>
     <SystemResourcesExtensionsPackageVersion>4.6.0</SystemResourcesExtensionsPackageVersion>
+    <MicrosoftCodeAnalysisCollectionsPackageVersion>4.0.0-4.21379.20</MicrosoftCodeAnalysisCollectionsPackageVersion>
   </PropertyGroup>
   <!-- Toolset Dependencies -->
   <PropertyGroup>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions