-
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Problem
The SDK currently adds an implicit PackageReference for Microsoft.VSSDK.BuildTools with a hardcoded version:
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="$(VssdkBuildToolsVersion)" PrivateAssets="all" />This breaks projects using NuGet Central Package Management (CPM) because CPM requires that PackageReference items do NOT have Version attributes - versions must be defined centrally in Directory.Packages.props.
Proposed Solution
Remove the implicit PackageReference from the SDK entirely. Users will explicitly add the dependency themselves:
<PackageReference Include="Microsoft.VSSDK.BuildTools" PrivateAssets="all" />Rationale
- The SDK's role is to provide MSBuild integration (props/targets), not manage package references
- Explicit dependencies are clearer and more maintainable
- Works naturally with CPM - users define the version in
Directory.Packages.props - Works with non-CPM - users specify the version directly on the
PackageReference
Changes Required
-
Remove from
Sdk.Vsix.props:- Remove the
VssdkBuildToolsVersionproperty (lines 21-23) - Remove the
PackageReferenceforMicrosoft.VSSDK.BuildTools(lines 25-27)
- Remove the
-
Update template (
src/CodingWithCalvin.VsixSdk.Templates/templates/vsix-extension/VsixExtension.csproj):- Ensure template includes the
PackageReferenceexplicitly (already does)
- Ensure template includes the
-
Update documentation:
- Document that users must add
Microsoft.VSSDK.BuildToolspackage reference - Add migration guide for existing users
- Document that users must add
Breaking Change
This is a breaking change for existing users who rely on the implicit package reference. They will need to add the PackageReference explicitly after upgrading.
Metadata
Metadata
Assignees
Labels
No labels