Name: fsharp-dnx-templates
Owner: F# Community Project Incubation Space
Description: Visual Studio templates for creating DNX projects with F#.
Created: 2015-10-16 15:15:21.0
Updated: 2016-06-29 16:51:08.0
Pushed: 2016-04-05 09:15:53.0
Homepage: null
Size: 32
Language: HTML
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Visual Studio templates for creating DNX projects with F#.
Right now we have the following templates:
The installation approach is identical for each template.
..\Microsoft Visual Studio 14.0\Common7\IDE\AspNetProjectTemplates\1033\
..\Microsoft Visual Studio 14.0\Common7\IDE\ProjectTemplates\FSharp\1033
To get Visual Studio to register the templates, you can run devenv.exe /installvstemplates
. (devenv.exe
is in the ..\Microsoft Visual Studio 14.0\Common7\IDE\
folder.)
FSharp.Dnx
dependency?The FSharp.Dnx
dependency can be found in the fsprojects NuGet feed: https://www.myget.org/F/fsprojects/api/v3/index.json
You can include it in your NuGet.Config file:
l version="1.0" encoding="utf-8"?>
figuration>
ackageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="fsprojects" value="https://www.myget.org/F/fsprojects/api/v3/index.json" />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
packageSources>
nfiguration>
If you don't have a NuGet.config file, create it yourself in the solution root. You can then add it to Visual Studio by right-clicking the solution node in the Solution Explorer and adding an existing item.
500 Internal Server Error
when running it? I haven't changed a thing!Because you need a newer version of Microsoft.AspNet.IISPlatformHandler
which you can get by adding the ASP.NET “dev” build NuGet feed to your NuGet.Config.
Program
type a class with a Main
method and not a simple F# function like the standard F# Console Application template?When DNX loads, it looks for a class called Program
with a method called Main
.
You can do
space ConsoleApplication1
Program () =
member x.Main (argv: string array) =
printfn "%A" argv
0
but you can also do
le MyModule
Program () =
member x.Main (argv: string array) =
printfn "%A" argv
0
or
le Program
Main (argv: string array) =
printfn "%A" argv
0
If you choose to use a Program class, you can do dependency injection, e.g. inject an IApplicationEnvironment
.
The default maintainer account for projects under “fsprojects” is @fsprojectsgit - F# Community Project Incubation Space (repo management)