diff --git a/src/dotnet/commands/dotnet-new/FSharp_Console/NuGet.Config b/src/dotnet/commands/dotnet-new/FSharp_Console/NuGet.Config deleted file mode 100644 index c9fe7428b..000000000 --- a/src/dotnet/commands/dotnet-new/FSharp_Console/NuGet.Config +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - 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 f2c366a2a..dcbeed714 100644 --- a/src/dotnet/commands/dotnet-new/FSharp_Console/project.json.template +++ b/src/dotnet/commands/dotnet-new/FSharp_Console/project.json.template @@ -1,6 +1,7 @@ { "version": "1.0.0-*", "buildOptions": { + "debugType": "portable", "emitEntryPoint": true, "compilerName": "fsc", "compile": { @@ -9,18 +10,8 @@ ] } }, - "dependencies": { - "Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160509" - }, "tools": { - "dotnet-compile-fsc": { - "version": "1.0.0-preview2-*", - "imports": [ - "dnxcore50", - "portable-net45+win81", - "netstandard1.3" - ] - } + "dotnet-compile-fsc":"1.0.0-preview2-*" }, "frameworks": { "netcoreapp1.0": { @@ -28,12 +19,9 @@ "Microsoft.NETCore.App": { "type": "platform", "version": "1.0.0" - } - }, - "imports": [ - "portable-net45+win8", - "dnxcore50" - ] + }, + "Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160629" + } } } -} +} \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-new/FSharp_Lib/Library.fs b/src/dotnet/commands/dotnet-new/FSharp_Lib/Library.fs new file mode 100644 index 000000000..ae53d091e --- /dev/null +++ b/src/dotnet/commands/dotnet-new/FSharp_Lib/Library.fs @@ -0,0 +1,5 @@ +namespace Library + +module Say = + let hello name = + printfn "Hello %s" name \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-new/FSharp_Lib/project.json.template b/src/dotnet/commands/dotnet-new/FSharp_Lib/project.json.template new file mode 100644 index 000000000..52746e87e --- /dev/null +++ b/src/dotnet/commands/dotnet-new/FSharp_Lib/project.json.template @@ -0,0 +1,23 @@ +{ + "version": "1.0.0-*", + "buildOptions": { + "debugType": "portable" + "compilerName": "fsc", + "compile": { + "includeFiles": [ + "Library.fs" + ] + } + }, + "tools": { + "dotnet-compile-fsc":"1.0.0-preview2-*" + }, + "frameworks": { + "netstandard1.6": { + "dependencies": { + "NETStandard.Library":"1.6.0", + "Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160629" + } + } + } +} \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-new/Program.cs b/src/dotnet/commands/dotnet-new/Program.cs index 627896f4f..1c9e75f8b 100644 --- a/src/dotnet/commands/dotnet-new/Program.cs +++ b/src/dotnet/commands/dotnet-new/Program.cs @@ -97,7 +97,7 @@ namespace Microsoft.DotNet.Tools.New app.HelpOption("-h|--help"); 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", "Lib" } }; var languages = new[] { csharp, fsharp }; diff --git a/src/dotnet/commands/dotnet-new/README.md b/src/dotnet/commands/dotnet-new/README.md index bdd871695..117edacb7 100644 --- a/src/dotnet/commands/dotnet-new/README.md +++ b/src/dotnet/commands/dotnet-new/README.md @@ -36,6 +36,7 @@ Type of the project. Valid values for C# are: Valid values for F# are: * `console` +* `lib` ## EXAMPLES diff --git a/src/dotnet/project.json b/src/dotnet/project.json index c029b55fb..b75006cb2 100644 --- a/src/dotnet/project.json +++ b/src/dotnet/project.json @@ -7,8 +7,9 @@ "commands/dotnet-new/CSharp_Console.zip", "commands/dotnet-new/CSharp_Lib.zip", "commands/dotnet-new/CSharp_xunittest.zip", + "commands/dotnet-new/CSharp_Web.zip", "commands/dotnet-new/FSharp_Console.zip", - "commands/dotnet-new/CSharp_Web.zip" + "commands/dotnet-new/FSharp_Lib.zip" ] }, "compile": { @@ -17,6 +18,7 @@ "commands/dotnet-new/FSharp_Console/**", "commands/dotnet-new/CSharp_Web/**", "commands/dotnet-new/CSharp_Lib/**", + "commands/dotnet-new/FSharp_Lib/**", "commands/dotnet-new/CSharp_xunittest/**" ] }