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:
Eric Erhardt 2016-05-04 15:51:17 -05:00
commit ece4ae52b2
3 changed files with 27 additions and 7 deletions

View file

@ -1,6 +1,6 @@
{
"version": "1.0.0-*",
"compilationOptions": {
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {

View file

@ -1,12 +1,14 @@
{
"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": true
"buildOptions": {
"emitEntryPoint": true,
"compilerName": "fsc",
"compile": {
"includeFiles": [
"Program.fs"
]
}
},
"compilerName": "fsc",
"compileFiles": [
"Program.fs"
],
"dependencies": {
"Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160316",
"Microsoft.NETCore.App": {

View file

@ -35,6 +35,24 @@ namespace Microsoft.DotNet.Tests
.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)
{
var projectJsonRoot = ReadProject(projectJsonPath);