From 5d23244216fc741d68444fa1cd2c70c2071b0e83 Mon Sep 17 00:00:00 2001 From: "Calvin A. Allen" Date: Thu, 8 Jan 2026 10:58:14 -0500 Subject: [PATCH] feat(sdk): support NuGet Central Package Management Remove implicit PackageReference for Microsoft.VSSDK.BuildTools from the SDK. This allows projects using NuGet Central Package Management (CPM) to work correctly, as CPM requires PackageReference items to not have a Version attribute when versions are centrally managed. Users must now explicitly add the PackageReference in their project: This is a breaking change but aligns with CPM compatibility requirements. Closes #27 --- README.md | 5 +++-- samples/SampleExtension/SampleExtension.csproj | 1 + src/CodingWithCalvin.VsixSdk/Sdk/Sdk.Vsix.props | 12 ------------ tests/e2e/E2E.AllFeatures/E2E.AllFeatures.csproj | 1 + tests/e2e/E2E.AutoIncludes/E2E.AutoIncludes.csproj | 1 + tests/e2e/E2E.CustomPkgDef/E2E.CustomPkgDef.csproj | 1 + .../E2E.ImageAndContentManifest.csproj | 1 + tests/e2e/E2E.ManualPkgDef/E2E.ManualPkgDef.csproj | 1 + tests/e2e/E2E.Minimal/E2E.Minimal.csproj | 1 + .../E2E.SourceGenerators/E2E.SourceGenerators.csproj | 1 + .../E2E.Templates.AutoDiscovery.csproj | 1 + .../E2E.Templates.AutoInject.csproj | 1 + .../E2E.Templates.ManualWithSubPath.csproj | 1 + .../E2E.Templates.Reference.csproj | 1 + .../E2E.Templates.ReferenceManual.csproj | 1 + tests/e2e/E2E.Validation/E2E.Validation.csproj | 1 + .../E2E.ValidationNoManifest.csproj | 5 +++++ .../E2E.VersionOverride/E2E.VersionOverride.csproj | 1 + 18 files changed, 23 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 38bd11f..0569595 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,7 @@ Replace your entire `.csproj` file with the SDK-style format: + ``` @@ -135,12 +136,11 @@ Convert from `packages.config` to `PackageReference` format in your `.csproj`: ```xml + ``` -> **Note:** `Microsoft.VSSDK.BuildTools` is automatically included by the SDK. - #### Step 6: Handle VSCT Files If you have `.vsct` files, they're automatically included. Remove any explicit `` items unless you need custom metadata. @@ -179,6 +179,7 @@ If you prefer to set up manually, create a `.csproj` file: + ``` diff --git a/samples/SampleExtension/SampleExtension.csproj b/samples/SampleExtension/SampleExtension.csproj index b10d44c..697dbe4 100644 --- a/samples/SampleExtension/SampleExtension.csproj +++ b/samples/SampleExtension/SampleExtension.csproj @@ -16,6 +16,7 @@ + diff --git a/src/CodingWithCalvin.VsixSdk/Sdk/Sdk.Vsix.props b/src/CodingWithCalvin.VsixSdk/Sdk/Sdk.Vsix.props index 0b6b31b..687bbbb 100644 --- a/src/CodingWithCalvin.VsixSdk/Sdk/Sdk.Vsix.props +++ b/src/CodingWithCalvin.VsixSdk/Sdk/Sdk.Vsix.props @@ -17,18 +17,6 @@ Condition="Exists('$(MSBuildThisFileDirectory)..\analyzers\dotnet\cs\CodingWithCalvin.VsixSdk.Generators.dll')" /> - - - 17.* - - - - - - true diff --git a/tests/e2e/E2E.AllFeatures/E2E.AllFeatures.csproj b/tests/e2e/E2E.AllFeatures/E2E.AllFeatures.csproj index f87baeb..7a62995 100644 --- a/tests/e2e/E2E.AllFeatures/E2E.AllFeatures.csproj +++ b/tests/e2e/E2E.AllFeatures/E2E.AllFeatures.csproj @@ -16,6 +16,7 @@ + diff --git a/tests/e2e/E2E.AutoIncludes/E2E.AutoIncludes.csproj b/tests/e2e/E2E.AutoIncludes/E2E.AutoIncludes.csproj index fdb9932..03c33f1 100644 --- a/tests/e2e/E2E.AutoIncludes/E2E.AutoIncludes.csproj +++ b/tests/e2e/E2E.AutoIncludes/E2E.AutoIncludes.csproj @@ -15,6 +15,7 @@ + diff --git a/tests/e2e/E2E.CustomPkgDef/E2E.CustomPkgDef.csproj b/tests/e2e/E2E.CustomPkgDef/E2E.CustomPkgDef.csproj index 44a805c..f5ed8eb 100644 --- a/tests/e2e/E2E.CustomPkgDef/E2E.CustomPkgDef.csproj +++ b/tests/e2e/E2E.CustomPkgDef/E2E.CustomPkgDef.csproj @@ -14,6 +14,7 @@ + diff --git a/tests/e2e/E2E.ImageAndContentManifest/E2E.ImageAndContentManifest.csproj b/tests/e2e/E2E.ImageAndContentManifest/E2E.ImageAndContentManifest.csproj index 7261e70..f4baadf 100644 --- a/tests/e2e/E2E.ImageAndContentManifest/E2E.ImageAndContentManifest.csproj +++ b/tests/e2e/E2E.ImageAndContentManifest/E2E.ImageAndContentManifest.csproj @@ -14,6 +14,7 @@ + diff --git a/tests/e2e/E2E.ManualPkgDef/E2E.ManualPkgDef.csproj b/tests/e2e/E2E.ManualPkgDef/E2E.ManualPkgDef.csproj index 49aa027..cde623a 100644 --- a/tests/e2e/E2E.ManualPkgDef/E2E.ManualPkgDef.csproj +++ b/tests/e2e/E2E.ManualPkgDef/E2E.ManualPkgDef.csproj @@ -16,6 +16,7 @@ + diff --git a/tests/e2e/E2E.Minimal/E2E.Minimal.csproj b/tests/e2e/E2E.Minimal/E2E.Minimal.csproj index 58de8dc..3466cde 100644 --- a/tests/e2e/E2E.Minimal/E2E.Minimal.csproj +++ b/tests/e2e/E2E.Minimal/E2E.Minimal.csproj @@ -15,6 +15,7 @@ + diff --git a/tests/e2e/E2E.SourceGenerators/E2E.SourceGenerators.csproj b/tests/e2e/E2E.SourceGenerators/E2E.SourceGenerators.csproj index 21f0bd8..da0bfe1 100644 --- a/tests/e2e/E2E.SourceGenerators/E2E.SourceGenerators.csproj +++ b/tests/e2e/E2E.SourceGenerators/E2E.SourceGenerators.csproj @@ -16,6 +16,7 @@ + diff --git a/tests/e2e/E2E.Templates.AutoDiscovery/E2E.Templates.AutoDiscovery.csproj b/tests/e2e/E2E.Templates.AutoDiscovery/E2E.Templates.AutoDiscovery.csproj index fbb79ea..0289e2b 100644 --- a/tests/e2e/E2E.Templates.AutoDiscovery/E2E.Templates.AutoDiscovery.csproj +++ b/tests/e2e/E2E.Templates.AutoDiscovery/E2E.Templates.AutoDiscovery.csproj @@ -15,6 +15,7 @@ + diff --git a/tests/e2e/E2E.Templates.AutoInject/E2E.Templates.AutoInject.csproj b/tests/e2e/E2E.Templates.AutoInject/E2E.Templates.AutoInject.csproj index 3da6fa0..2f6ea43 100644 --- a/tests/e2e/E2E.Templates.AutoInject/E2E.Templates.AutoInject.csproj +++ b/tests/e2e/E2E.Templates.AutoInject/E2E.Templates.AutoInject.csproj @@ -15,6 +15,7 @@ + diff --git a/tests/e2e/E2E.Templates.ManualWithSubPath/E2E.Templates.ManualWithSubPath.csproj b/tests/e2e/E2E.Templates.ManualWithSubPath/E2E.Templates.ManualWithSubPath.csproj index 0c9566c..d6a7775 100644 --- a/tests/e2e/E2E.Templates.ManualWithSubPath/E2E.Templates.ManualWithSubPath.csproj +++ b/tests/e2e/E2E.Templates.ManualWithSubPath/E2E.Templates.ManualWithSubPath.csproj @@ -18,6 +18,7 @@ + diff --git a/tests/e2e/E2E.Templates.Reference/E2E.Templates.Reference.csproj b/tests/e2e/E2E.Templates.Reference/E2E.Templates.Reference.csproj index c5fe1b2..7dc131a 100644 --- a/tests/e2e/E2E.Templates.Reference/E2E.Templates.Reference.csproj +++ b/tests/e2e/E2E.Templates.Reference/E2E.Templates.Reference.csproj @@ -17,6 +17,7 @@ + diff --git a/tests/e2e/E2E.Templates.ReferenceManual/E2E.Templates.ReferenceManual.csproj b/tests/e2e/E2E.Templates.ReferenceManual/E2E.Templates.ReferenceManual.csproj index e4fcbdb..cf3e3d4 100644 --- a/tests/e2e/E2E.Templates.ReferenceManual/E2E.Templates.ReferenceManual.csproj +++ b/tests/e2e/E2E.Templates.ReferenceManual/E2E.Templates.ReferenceManual.csproj @@ -16,6 +16,7 @@ + diff --git a/tests/e2e/E2E.Validation/E2E.Validation.csproj b/tests/e2e/E2E.Validation/E2E.Validation.csproj index ea67b92..3d0d1f9 100644 --- a/tests/e2e/E2E.Validation/E2E.Validation.csproj +++ b/tests/e2e/E2E.Validation/E2E.Validation.csproj @@ -18,6 +18,7 @@ + diff --git a/tests/e2e/E2E.ValidationNoManifest/E2E.ValidationNoManifest.csproj b/tests/e2e/E2E.ValidationNoManifest/E2E.ValidationNoManifest.csproj index f411c3a..b70bbfd 100644 --- a/tests/e2e/E2E.ValidationNoManifest/E2E.ValidationNoManifest.csproj +++ b/tests/e2e/E2E.ValidationNoManifest/E2E.ValidationNoManifest.csproj @@ -17,4 +17,9 @@ false + + + + + diff --git a/tests/e2e/E2E.VersionOverride/E2E.VersionOverride.csproj b/tests/e2e/E2E.VersionOverride/E2E.VersionOverride.csproj index 22551be..48a3efa 100644 --- a/tests/e2e/E2E.VersionOverride/E2E.VersionOverride.csproj +++ b/tests/e2e/E2E.VersionOverride/E2E.VersionOverride.csproj @@ -14,6 +14,7 @@ +