Skip to content

Commit 1bf2838

Browse files
More updates to "dotnet new" template to produce correct template.json values
1 parent 1115a0a commit 1bf2838

File tree

1 file changed

+18
-2
lines changed
  • templates/package-builder/src/build

1 file changed

+18
-2
lines changed

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

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,24 @@ function buildDotNetNewNuGetPackage(){
149149
shortName: `${templateConfig.dotNetNewId.toLowerCase()}`,
150150
tags: {language: 'C#',type: 'project'},
151151
sourceName: sourceProjectName,
152-
preferNameDirectory: true,
153-
symbols: {}
152+
sources: [{
153+
source: './',
154+
target: './',
155+
exclude: ['.deployment','.template.config/**','project.json','*.xproj']
156+
}],
157+
symbols: {
158+
sdkVersion: {
159+
type: 'bind',
160+
binding: 'dotnet-cli-version',
161+
replaces: '1.0.0-preview2-1-003177'
162+
},
163+
dockerBaseImage: {
164+
type: 'parameter',
165+
replaces: 'microsoft/dotnet:1.1.0-sdk-projectjson',
166+
defaultValue: 'microsoft/dotnet:1.1.0-sdk-msbuild'
167+
}
168+
},
169+
preferNameDirectory: true
154170
},null,2));
155171

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

0 commit comments

Comments
(0)