Merge pull request #2851 from dasMulli/bugfix/schema-upgrade-new-project-template
Update dotnet-new templates to new project.json schema
This commit is contained in:
commit
ece4ae52b2
3 changed files with 27 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"version": "1.0.0-*",
|
"version": "1.0.0-*",
|
||||||
"compilationOptions": {
|
"buildOptions": {
|
||||||
"emitEntryPoint": true
|
"emitEntryPoint": true
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
{
|
{
|
||||||
"version": "1.0.0-*",
|
"version": "1.0.0-*",
|
||||||
"compilationOptions": {
|
"buildOptions": {
|
||||||
"emitEntryPoint": true
|
"emitEntryPoint": true,
|
||||||
|
"compilerName": "fsc",
|
||||||
|
"compile": {
|
||||||
|
"includeFiles": [
|
||||||
|
"Program.fs"
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"compilerName": "fsc",
|
|
||||||
"compileFiles": [
|
|
||||||
"Program.fs"
|
|
||||||
],
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160316",
|
"Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160316",
|
||||||
"Microsoft.NETCore.App": {
|
"Microsoft.NETCore.App": {
|
||||||
|
|
|
@ -35,6 +35,24 @@ namespace Microsoft.DotNet.Tests
|
||||||
.Should().Pass();
|
.Should().Pass();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void When_dotnet_build_is_invoked_Then_project_builds_without_warnings()
|
||||||
|
{
|
||||||
|
var rootPath = Temp.CreateDirectory().Path;
|
||||||
|
|
||||||
|
new TestCommand("dotnet") { WorkingDirectory = rootPath }
|
||||||
|
.Execute("new");
|
||||||
|
|
||||||
|
new TestCommand("dotnet") { WorkingDirectory = rootPath }
|
||||||
|
.Execute("restore");
|
||||||
|
|
||||||
|
var buildResult = new TestCommand("dotnet") { WorkingDirectory = rootPath }
|
||||||
|
.ExecuteWithCapturedOutput("build");
|
||||||
|
|
||||||
|
buildResult.Should().Pass();
|
||||||
|
buildResult.Should().NotHaveStdErr();
|
||||||
|
}
|
||||||
|
|
||||||
private static void AddProjectJsonDependency(string projectJsonPath, string dependencyId, string dependencyVersion)
|
private static void AddProjectJsonDependency(string projectJsonPath, string dependencyId, string dependencyVersion)
|
||||||
{
|
{
|
||||||
var projectJsonRoot = ReadProject(projectJsonPath);
|
var projectJsonRoot = ReadProject(projectJsonPath);
|
||||||
|
|
Loading…
Reference in a new issue