Use correct docker base image for csproj projects. Fixes #574.

This commit is contained in:
SteveSandersonMS
2017-01-16 15:25:41 +00:00
parent f8714e9653
commit 1a49a27344
3 changed files with 14 additions and 4 deletions

View File

@@ -50,11 +50,13 @@ const templates = [
const sdkChoices = [{
value: '1.0.0-preview2-1-003177', // Current released version
name: 'project.json' + chalk.gray(' (compatible with .NET Core tooling preview 2 and Visual Studio 2015)'),
includeFiles: [/^project.json$/, /\.xproj$/, /_placeholder.txt$/, /\.deployment$/]
includeFiles: [/^project.json$/, /\.xproj$/, /_placeholder.txt$/, /\.deployment$/],
dockerBaseImage: 'microsoft/dotnet:1.1.0-sdk-projectjson'
}, {
value: '1.0.0-preview3-004056', // Version that ships with VS2017RC
name: '.csproj' + chalk.gray(' (compatible with .NET Core tooling preview 3 and Visual Studio 2017)'),
includeFiles: [/\.csproj$/]
includeFiles: [/\.csproj$/],
dockerBaseImage: 'microsoft/dotnet:1.1.0-sdk-msbuild'
}];
class MyGenerator extends yeoman.Base {
@@ -110,6 +112,10 @@ class MyGenerator extends yeoman.Base {
this._answers.sdkVersion = firstAnswers.sdkVersion;
this._answers.namePascalCase = toPascalCase(answers.name);
this._answers.projectGuid = this.options['projectguid'] || uuid.v4();
const chosenSdk = sdkChoices.filter(sdk => sdk.value === this._answers.sdkVersion)[0];
this._answers.dockerBaseImage = chosenSdk.dockerBaseImage;
done();
});
});