Merge pull request #3458 from blackdwarf/prev2templates
Add new templates for C# to dotnet new
This commit is contained in:
commit
cbf5f1ef65
7 changed files with 70 additions and 5 deletions
11
src/dotnet/commands/dotnet-new/CSharp_Lib/Library.cs
Normal file
11
src/dotnet/commands/dotnet-new/CSharp_Lib/Library.cs
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace ClassLibrary
|
||||||
|
{
|
||||||
|
public class Class1
|
||||||
|
{
|
||||||
|
public void Method1()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"version": "1.0.0-*",
|
||||||
|
"dependencies": {
|
||||||
|
},
|
||||||
|
"frameworks": {
|
||||||
|
"netstandard1.6": {
|
||||||
|
"NETStandard.Library": "1.5.0-rc3-24126-00"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
14
src/dotnet/commands/dotnet-new/CSharp_xunittest/Tests.cs
Normal file
14
src/dotnet/commands/dotnet-new/CSharp_xunittest/Tests.cs
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
using System;
|
||||||
|
using Xunit;
|
||||||
|
|
||||||
|
namespace Tests
|
||||||
|
{
|
||||||
|
public class Tests
|
||||||
|
{
|
||||||
|
[Fact]
|
||||||
|
public void Test1()
|
||||||
|
{
|
||||||
|
Assert.True(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -10,7 +10,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160316"
|
"Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160509"
|
||||||
},
|
},
|
||||||
"tools": {
|
"tools": {
|
||||||
"dotnet-compile-fsc": {
|
"dotnet-compile-fsc": {
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"netstandard1.5": {
|
"netcoreapp1.0": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.NETCore.App": {
|
"Microsoft.NETCore.App": {
|
||||||
"type": "platform",
|
"type": "platform",
|
||||||
|
|
|
@ -84,9 +84,9 @@ namespace Microsoft.DotNet.Tools.New
|
||||||
var dotnetNew = new NewCommand();
|
var dotnetNew = new NewCommand();
|
||||||
app.OnExecute(() => {
|
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" } };
|
var fsharp = new { Name = "F#", Alias = new[] { "f#", "fs", "fsharp" }, TemplatePrefix = "FSharp", Templates = new[] { "Console" } };
|
||||||
|
|
||||||
string languageValue = lang.Value() ?? csharp.Name;
|
string languageValue = lang.Value() ?? csharp.Name;
|
||||||
|
|
||||||
var language = new[] { csharp, fsharp }
|
var language = new[] { csharp, fsharp }
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
"embed": {
|
"embed": {
|
||||||
"include": [
|
"include": [
|
||||||
"commands/dotnet-new/CSharp_Console.zip",
|
"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/FSharp_Console.zip",
|
||||||
"commands/dotnet-new/CSharp_Web.zip"
|
"commands/dotnet-new/CSharp_Web.zip"
|
||||||
]
|
]
|
||||||
|
@ -13,7 +15,9 @@
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"commands/dotnet-new/CSharp_Console/**",
|
"commands/dotnet-new/CSharp_Console/**",
|
||||||
"commands/dotnet-new/FSharp_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/**"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue