Skip to content

Commit afdf0ae

Browse files
authored
refactor(sdk): remove publish manifest generation (#8)
Remove automatic generation of publish.manifest.json as this feature needs more thought before implementation.
1 parent 2a0c7c3 commit afdf0ae

File tree

5 files changed

+0
-142
lines changed

5 files changed

+0
-142
lines changed

README.md

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -310,43 +310,6 @@ Press F5 to launch the Visual Studio Experimental Instance with your extension l
310310

311311
Extensions are only deployed to the Experimental Instance when building inside Visual Studio. This prevents errors when building from the command line.
312312

313-
### 📋 Publish Manifest Generation
314-
315-
The SDK automatically generates a `publish.manifest.json` file for publishing to the VS Marketplace. All values are extracted from your VSIX manifest:
316-
317-
```json
318-
{
319-
"$schema": "http://json.schemastore.org/vsix-publish",
320-
"categories": [
321-
"your", "tags", "here"
322-
],
323-
"identity": {
324-
"internalName": "MyExtension"
325-
},
326-
"overview": "README.md",
327-
"publisher": "Your Name",
328-
"qna": true,
329-
"repo": "https://github.com/you/your-repo"
330-
}
331-
```
332-
333-
| JSON Field | Source |
334-
|------------|--------|
335-
| `publisher` | `Identity/@Publisher` in VSIX manifest |
336-
| `categories` | `Tags` element in VSIX manifest |
337-
| `repo` | `MoreInfo` element in VSIX manifest |
338-
| `internalName` | Project name |
339-
| `overview` | Configurable via `VsixPublishOverview` property (default: `README.md`) |
340-
| `qna` | Configurable via `VsixPublishQnA` property (default: `true`) |
341-
342-
To disable publish manifest generation:
343-
344-
```xml
345-
<PropertyGroup>
346-
<GeneratePublishManifest>false</GeneratePublishManifest>
347-
</PropertyGroup>
348-
```
349-
350313
## ⚙️ Configuration
351314

352315
### Properties
@@ -360,9 +323,6 @@ To disable publish manifest generation:
360323
| `EnableDefaultVsixItems` | `true` | Auto-include VSIX-related files |
361324
| `EmitCompilerGeneratedFiles` | `true` | Write generated source files to disk |
362325
| `CompilerGeneratedFilesOutputPath` | `Generated/` | Location for generated source files |
363-
| `GeneratePublishManifest` | `true` | Generate `publish.manifest.json` for VS Marketplace |
364-
| `VsixPublishOverview` | `README.md` | Path to README for marketplace overview |
365-
| `VsixPublishQnA` | `true` | Enable Q&A on marketplace listing |
366326

367327
> \* Only when `Configuration=Debug` AND building inside Visual Studio
368328

samples/SampleExtension/SampleExtension.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
<ItemGroup>
1818
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.*" />
19-
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.*" PrivateAssets="all" />
2019
</ItemGroup>
2120

2221
</Project>

samples/SampleExtension/publish.manifest.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

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

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -99,25 +99,6 @@
9999
<VsixVersion Condition="'$(VsixVersion)' == ''">1.0.0</VsixVersion>
100100
</PropertyGroup>
101101

102-
<!--
103-
Publish Manifest Configuration (publish.manifest.json)
104-
Used for publishing to VS Marketplace
105-
Most values are extracted from the VSIX manifest automatically:
106-
- publisher: from Identity/@Publisher
107-
- categories: from Tags element
108-
- repo: from MoreInfo element
109-
-->
110-
<PropertyGroup>
111-
<!-- Enable/disable publish manifest generation -->
112-
<GeneratePublishManifest Condition="'$(GeneratePublishManifest)' == ''">true</GeneratePublishManifest>
113-
114-
<!-- Path to README for marketplace overview (relative to manifest) -->
115-
<VsixPublishOverview Condition="'$(VsixPublishOverview)' == ''">README.md</VsixPublishOverview>
116-
117-
<!-- Enable Q&A on marketplace listing -->
118-
<VsixPublishQnA Condition="'$(VsixPublishQnA)' == ''">true</VsixPublishQnA>
119-
</PropertyGroup>
120-
121102
<!--
122103
Deploy extension to experimental instance during build (for development)
123104
Only deploy when building inside Visual Studio (not with dotnet build)

src/CodingWithCalvin.VsixSdk/Sdk/Sdk.Vsix.targets

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -122,75 +122,6 @@
122122
<Delete Files="$(_VsixVersionSentinel)" />
123123
</Target>
124124

125-
<!--
126-
Generate Publish Manifest (publish.manifest.json)
127-
Creates a VS Marketplace publish manifest from project properties and VSIX manifest
128-
-->
129-
<Target Name="GeneratePublishManifest"
130-
AfterTargets="Build"
131-
Condition="'$(GeneratePublishManifest)' == 'true' and '$(_SourceVsixManifestPath)' != '' and Exists('$(_SourceVsixManifestPath)')">
132-
133-
<PropertyGroup>
134-
<_VsixNsForPeek>&lt;Namespace Prefix='vsix' Uri='http://schemas.microsoft.com/developer/vsx-schema/2011'/&gt;</_VsixNsForPeek>
135-
</PropertyGroup>
136-
137-
<!-- Read Publisher from VSIX manifest -->
138-
<XmlPeek XmlInputPath="$(_SourceVsixManifestPath)"
139-
Query="/vsix:PackageManifest/vsix:Metadata/vsix:Identity/@Publisher"
140-
Namespaces="$(_VsixNsForPeek)">
141-
<Output TaskParameter="Result" PropertyName="_VsixPublisher" />
142-
</XmlPeek>
143-
144-
<!-- Read MoreInfo (repo URL) from VSIX manifest -->
145-
<XmlPeek XmlInputPath="$(_SourceVsixManifestPath)"
146-
Query="/vsix:PackageManifest/vsix:Metadata/vsix:MoreInfo/text()"
147-
Namespaces="$(_VsixNsForPeek)">
148-
<Output TaskParameter="Result" PropertyName="_VsixMoreInfo" />
149-
</XmlPeek>
150-
151-
<!-- Read Tags (categories) from VSIX manifest -->
152-
<XmlPeek XmlInputPath="$(_SourceVsixManifestPath)"
153-
Query="/vsix:PackageManifest/vsix:Metadata/vsix:Tags/text()"
154-
Namespaces="$(_VsixNsForPeek)">
155-
<Output TaskParameter="Result" PropertyName="_VsixTags" />
156-
</XmlPeek>
157-
158-
<!-- Convert comma-separated tags to JSON array format -->
159-
<PropertyGroup>
160-
<!-- First trim spaces after commas, then replace commas with JSON array separators -->
161-
<_VsixTagsNormalized>$(_VsixTags.Replace(', ', ','))</_VsixTagsNormalized>
162-
<_CategoriesJson>$(_VsixTagsNormalized.Replace(',', '", "'))</_CategoriesJson>
163-
<_CategoriesJson>"$(_CategoriesJson)"</_CategoriesJson>
164-
<_QnAValue Condition="'$(VsixPublishQnA)' == 'true'">true</_QnAValue>
165-
<_QnAValue Condition="'$(VsixPublishQnA)' != 'true'">false</_QnAValue>
166-
<_RepoLine Condition="'$(_VsixMoreInfo)' != ''">,
167-
"repo": "$(_VsixMoreInfo)"</_RepoLine>
168-
<_RepoLine Condition="'$(_VsixMoreInfo)' == ''"></_RepoLine>
169-
</PropertyGroup>
170-
171-
<!-- Write the publish manifest JSON -->
172-
<PropertyGroup>
173-
<_PublishManifestContent><![CDATA[{
174-
"$schema": "http://json.schemastore.org/vsix-publish",
175-
"categories": [
176-
$(_CategoriesJson)
177-
],
178-
"identity": {
179-
"internalName": "$(MSBuildProjectName)"
180-
},
181-
"overview": "$(VsixPublishOverview)",
182-
"publisher": "$(_VsixPublisher)",
183-
"qna": $(_QnAValue)$(_RepoLine)
184-
}]]></_PublishManifestContent>
185-
</PropertyGroup>
186-
187-
<WriteLinesToFile File="$(MSBuildProjectDirectory)\publish.manifest.json"
188-
Lines="$(_PublishManifestContent)"
189-
Overwrite="true" />
190-
191-
<Message Importance="high" Text="Generated publish manifest: $(MSBuildProjectDirectory)\publish.manifest.json" />
192-
</Target>
193-
194125
<!--
195126
Target to validate VSIX project configuration
196127
Runs early in the build to catch common mistakes

0 commit comments

Comments
 (0)