diff --git a/src/dotnet/commands/dotnet-new/CSharp_Lib/Library.cs b/src/dotnet/commands/dotnet-new/CSharp_Lib/Library.cs new file mode 100644 index 000000000..4f54b3889 --- /dev/null +++ b/src/dotnet/commands/dotnet-new/CSharp_Lib/Library.cs @@ -0,0 +1,11 @@ +using System; + +namespace ClassLibrary +{ + public class Class1 + { + public void Method1() + { + } + } +} diff --git a/src/dotnet/commands/dotnet-new/CSharp_Lib/project.json.template b/src/dotnet/commands/dotnet-new/CSharp_Lib/project.json.template new file mode 100644 index 000000000..883071de1 --- /dev/null +++ b/src/dotnet/commands/dotnet-new/CSharp_Lib/project.json.template @@ -0,0 +1,10 @@ +{ + "version": "1.0.0-*", + "dependencies": { + }, + "frameworks": { + "netstandard1.6": { + "NETStandard.Library": "1.5.0-rc3-24126-00" + } + } +} diff --git a/src/dotnet/commands/dotnet-new/CSharp_xunittest/Tests.cs b/src/dotnet/commands/dotnet-new/CSharp_xunittest/Tests.cs new file mode 100644 index 000000000..1bd5ced4f --- /dev/null +++ b/src/dotnet/commands/dotnet-new/CSharp_xunittest/Tests.cs @@ -0,0 +1,14 @@ +using System; +using Xunit; + +namespace Tests +{ + public class Tests + { + [Fact] + public void Test1() + { + Assert.True(true); + } + } +} diff --git a/src/dotnet/commands/dotnet-new/CSharp_xunittest/project.json.template b/src/dotnet/commands/dotnet-new/CSharp_xunittest/project.json.template new file mode 100644 index 000000000..c44728483 --- /dev/null +++ b/src/dotnet/commands/dotnet-new/CSharp_xunittest/project.json.template @@ -0,0 +1,26 @@ +{ + "version": "1.0.0-*", + + "dependencies": { + "System.Runtime.Serialization.Primitives": "4.1.1-rc3-24127-01", + "xunit": "2.1.0", + "dotnet-test-xunit": "1.0.0-rc2-192208-24" + }, + + "testRunner": "xunit", + + "frameworks": { + "netcoreapp1.0": { + "dependencies": { + "Microsoft.NETCore.App": { + "type": "platform", + "version": "1.0.0-rc3-004312" + } + }, + "imports": [ + "dotnet5.4", + "portable-net451+win8" + ] + } + } +} diff --git a/src/dotnet/commands/dotnet-new/FSharp_Console/project.json.template b/src/dotnet/commands/dotnet-new/FSharp_Console/project.json.template index 1c5cc6181..c2f8fb633 100644 --- a/src/dotnet/commands/dotnet-new/FSharp_Console/project.json.template +++ b/src/dotnet/commands/dotnet-new/FSharp_Console/project.json.template @@ -10,7 +10,7 @@ } }, "dependencies": { - "Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160316" + "Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160509" }, "tools": { "dotnet-compile-fsc": { @@ -23,7 +23,7 @@ } }, "frameworks": { - "netstandard1.5": { + "netcoreapp1.0": { "dependencies": { "Microsoft.NETCore.App": { "type": "platform", diff --git a/src/dotnet/commands/dotnet-new/Program.cs b/src/dotnet/commands/dotnet-new/Program.cs index ff7f30916..4e971e51a 100644 --- a/src/dotnet/commands/dotnet-new/Program.cs +++ b/src/dotnet/commands/dotnet-new/Program.cs @@ -84,9 +84,9 @@ namespace Microsoft.DotNet.Tools.New var dotnetNew = new NewCommand(); app.OnExecute(() => { - var csharp = new { Name = "C#", Alias = new[] { "c#", "cs", "csharp" }, TemplatePrefix = "CSharp", Templates = new[] { "Console", "Web" } }; + var csharp = new { Name = "C#", Alias = new[] { "c#", "cs", "csharp" }, TemplatePrefix = "CSharp", Templates = new[] { "Console", "Web", "Lib", "xunittest" } }; var fsharp = new { Name = "F#", Alias = new[] { "f#", "fs", "fsharp" }, TemplatePrefix = "FSharp", Templates = new[] { "Console" } }; - + string languageValue = lang.Value() ?? csharp.Name; var language = new[] { csharp, fsharp } diff --git a/src/dotnet/project.json b/src/dotnet/project.json index 87307d7fc..8ed9d9b86 100644 --- a/src/dotnet/project.json +++ b/src/dotnet/project.json @@ -5,6 +5,8 @@ "embed": { "include": [ "commands/dotnet-new/CSharp_Console.zip", + "commands/dotnet-new/CSharp_Lib.zip", + "commands/dotnet-new/CSharp_xunittest.zip", "commands/dotnet-new/FSharp_Console.zip", "commands/dotnet-new/CSharp_Web.zip" ] @@ -13,7 +15,9 @@ "exclude": [ "commands/dotnet-new/CSharp_Console/**", "commands/dotnet-new/FSharp_Console/**", - "commands/dotnet-new/CSharp_Web/**" + "commands/dotnet-new/CSharp_Web/**", + "commands/dotnet-new/CSharp_Lib/**", + "commands/dotnet-new/CSharp_xunittest/**" ] } },