Skip to content

Commit 5a67ca3

Browse files
Add 'primaryOutputs' to dotnet new template.json files (and reorder JSON properties alphabetically)
1 parent 72dabb3 commit 5a67ca3

File tree

1 file changed

+4
-3
lines changed
  • templates/package-builder/src/build

1 file changed

+4
-3
lines changed

templates/package-builder/src/build/build.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,12 @@ function buildDotNetNewNuGetPackage() {
145145
fs.writeFileSync(path.join(templateConfigDir, 'template.json'), JSON.stringify({
146146
author: 'Microsoft',
147147
classifications: ["Web", "MVC", "SPA"],
148-
name: `MVC ASP.NET Core with ${templateConfig.displayName}`,
149148
groupIdentity: `Microsoft.AspNetCore.SpaTemplates.${templateConfig.dotNetNewId}`,
150149
identity: `Microsoft.AspNetCore.SpaTemplates.${templateConfig.dotNetNewId}.CSharp`,
150+
name: `MVC ASP.NET Core with ${templateConfig.displayName}`,
151+
preferNameDirectory: true,
152+
primaryOutputs: [{ path: `${sourceProjectName}.csproj` }],
151153
shortName: `${templateConfig.dotNetNewId.toLowerCase()}`,
152-
tags: { language: 'C#', type: 'project' },
153154
sourceName: sourceProjectName,
154155
sources: [{
155156
source: './',
@@ -168,7 +169,7 @@ function buildDotNetNewNuGetPackage() {
168169
defaultValue: 'microsoft/dotnet:1.1.0-sdk-msbuild'
169170
}
170171
},
171-
preferNameDirectory: true
172+
tags: { language: 'C#', type: 'project' },
172173
}, null, 2));
173174

174175
fs.writeFileSync(path.join(templateConfigDir, 'dotnetcli.host.json'), JSON.stringify({

0 commit comments

Comments
 (0)