Skip to content

Commit f1c4a69

Browse files
committed
feat(sdk): add implicit Microsoft.VSSDK.BuildTools package reference
- SDK now automatically includes VSSDK.BuildTools (version 17.* by default) - Users can override version with VssdkBuildToolsVersion property - Update README to remove explicit BuildTools references from examples
1 parent 97b7677 commit f1c4a69

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ Replace your entire `.csproj` file with the SDK-style format:
105105

106106
<ItemGroup>
107107
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.*" />
108-
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.*" PrivateAssets="all" />
109108
</ItemGroup>
110109

111110
</Project>
@@ -138,11 +137,12 @@ Convert from `packages.config` to `PackageReference` format in your `.csproj`:
138137
```xml
139138
<ItemGroup>
140139
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.*" />
141-
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.*" PrivateAssets="all" />
142140
<!-- Add other packages your extension uses -->
143141
</ItemGroup>
144142
```
145143

144+
> **Note:** `Microsoft.VSSDK.BuildTools` is automatically included by the SDK.
145+
146146
#### Step 6: Handle VSCT Files
147147

148148
If you have `.vsct` files, they're automatically included. Remove any explicit `<VSCTCompile>` items unless you need custom metadata.
@@ -182,7 +182,6 @@ If you prefer to set up manually, create a `.csproj` file:
182182

183183
<ItemGroup>
184184
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.*" />
185-
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.*" PrivateAssets="all" />
186185
</ItemGroup>
187186

188187
</Project>

src/CodingWithCalvin.VsixSdk/Sdk/Sdk.Vsix.props

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@
1414
Condition="Exists('$(MSBuildThisFileDirectory)..\analyzers\dotnet\cs\CodingWithCalvin.VsixSdk.Generators.dll')" />
1515
</ItemGroup>
1616

17+
<!--
18+
Implicit package references for VSIX development.
19+
Users can override the version by setting VssdkBuildToolsVersion before SDK import.
20+
-->
21+
<PropertyGroup>
22+
<VssdkBuildToolsVersion Condition="'$(VssdkBuildToolsVersion)' == ''">17.*</VssdkBuildToolsVersion>
23+
</PropertyGroup>
24+
25+
<ItemGroup>
26+
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="$(VssdkBuildToolsVersion)" PrivateAssets="all" />
27+
</ItemGroup>
28+
1729
<PropertyGroup>
1830
<!-- Identify that this SDK is in use -->
1931
<UsingCodingWithCalvinVsixSdk>true</UsingCodingWithCalvinVsixSdk>

0 commit comments

Comments
 (0)