F# WebAPIApplication template is not working
unjello opened this issue · 5 comments
Short issue description
Newly generated Web API Application (F#) compilation fails.
Expected behavior
Newly generated Web API application builds and runs.
Actual behavior
Compilation fails.
Steps to reproduce the behavior
yo aspnet
- Web API Application (F#)
cd WebAPIApplication
dotnet restore
dotnet build
OS version (Win/Mac/*Nix?)
macOS Sierra 10.12.3
NodeJS version
v7.4.0
Yeoman version
1.8.5
Generator version
/usr/local/lib
└── generator-aspnet@0.2.6
Mind posting version of Dotnet? (dotnet --info
)
No prob. Here it is (sorry for not including it in the first place. Too focused on filling out the template I guess:)
.NET Command Line Tools (1.0.0-preview2-1-003177)
Product Information:
Version: 1.0.0-preview2-1-003177
Commit SHA-1 hash: a2df9c2576
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.12
OS Platform: Darwin
RID: osx.10.12-x64
@unjello
The generator has been updated for RC4 release (0.3.1 version) with new templates:
➜ WebAPIApplication dotnet restore
Restoring packages for /Users/piotrblazejewicz/development/WebAPIApplication/WebAPIApplication.fsproj...
Restoring packages for /Users/piotrblazejewicz/development/WebAPIApplication/WebAPIApplication.fsproj...
Restore completed in 975.17 ms for /Users/piotrblazejewicz/development/WebAPIApplication/WebAPIApplication.fsproj.
Installing FSharp.NET.Sdk 1.0.0-beta-060000.
Generating MSBuild file /Users/piotrblazejewicz/development/WebAPIApplication/obj/WebAPIApplication.fsproj.nuget.g.props.
Generating MSBuild file /Users/piotrblazejewicz/development/WebAPIApplication/obj/WebAPIApplication.fsproj.nuget.g.targets.
Writing lock file to disk. Path: /Users/piotrblazejewicz/development/WebAPIApplication/obj/project.assets.json
Restore completed in 2.85 sec for /Users/piotrblazejewicz/development/WebAPIApplication/WebAPIApplication.fsproj.
NuGet Config files used:
/Users/piotrblazejewicz/.nuget/NuGet/NuGet.Config
Feeds used:
https://api.nuget.org/v3/index.json
Installed:
1 package(s) to /Users/piotrblazejewicz/development/WebAPIApplication/WebAPIApplication.fsproj
➜ WebAPIApplication dotnet run
Hosting environment: Production
Content root path: /Users/piotrblazejewicz/development/WebAPIApplication
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.
Using .NET core (Bash (ubuntu 14.04) On Windows)
.NET Command Line Tools (1.0.1)
Product Information:
Version: 1.0.1
Commit SHA-1 hash: 005db40cd1
Runtime Environment:
OS Name: ubuntu
OS Version: 14.04
OS Platform: Linux
RID: ubuntu.14.04-x64
Base Path: /usr/share/dotnet/sdk/1.0.1
$ dotnet restore
Restoring packages for /mnt/c/Users/Per Arneng/dev/op-internal-integration-worker/op-internal-integration-worker.fsproj...
Restoring packages for /mnt/c/Users/Per Arneng/dev/op-internal-integration-worker/op-internal-integration-worker.fsproj...
Restore completed in 759.73 ms for /mnt/c/Users/Per Arneng/dev/op-internal-integration-worker/op-internal-integration-worker.fsproj.
/usr/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): warning : Detected package downgrade: Microsoft.Extensions.Configuration.EnvironmentVariables from 1.0.2 to 1.0.1 [/mnt/c/Users/Per Arneng/dev/op-internal-integration-worker/op-internal-integration-worker.fsproj]
/usr/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): warning : op-internal-integration-worker (>= 1.0.0) -> Microsoft.AspNetCore (>= 1.0.4) -> Microsoft.Extensions.Configuration.EnvironmentVariables (>= 1.0.2) [/mnt/c/Users/Per Arneng/dev/op-internal-integration-worker/op-internal-integration-worker.fsproj]
/usr/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): warning : op-internal-integration-worker (>= 1.0.0) -> Microsoft.Extensions.Configuration.EnvironmentVariables (>= 1.0.1) [/mnt/c/Users/Per Arneng/dev/op-internal-integration-worker/op-internal-integration-worker.fsproj]
/usr/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): warning : Detected package downgrade: Microsoft.Extensions.Configuration.Json from 1.0.2 to 1.0.1 [/mnt/c/Users/Per Arneng/dev/op-internal-integration-worker/op-internal-integration-worker.fsproj]
/usr/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): warning : op-internal-integration-worker (>= 1.0.0) -> Microsoft.AspNetCore (>= 1.0.4) -> Microsoft.Extensions.Configuration.Json (>= 1.0.2) [/mnt/c/Users/Per Arneng/dev/op-internal-integration-worker/op-internal-integration-worker.fsproj]
/usr/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): warning : op-internal-integration-worker (>= 1.0.0) -> Microsoft.Extensions.Configuration.Json (>= 1.0.1) [/mnt/c/Users/Per Arneng/dev/op-internal-integration-worker/op-internal-integration-worker.fsproj]
Lock file has not changed. Skipping lock file write. Path: /mnt/c/Users/Per Arneng/dev/op-internal-integration-worker/obj/project.assets.json
Restore completed in 1.3 sec for /mnt/c/Users/Per Arneng/dev/op-internal-integration-worker/op-internal-integration-worker.fsproj.
NuGet Config files used:
/home/pure/.nuget/NuGet/NuGet.Config
Feeds used:
https://api.nuget.org/v3/index.json
$ dotnet run
/usr/share/dotnet/sdk/1.0.1/Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [/mnt/c/Users/Per Arneng/dev/op-internal-integration-worker/op-internal-integration-worker.fsproj]
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Extensions.Configuration.EnvironmentVariables, Version=1.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Working when updated versions to
<ItemGroup>
<PackageReference Include="FSharp.NET.Sdk" Version="1.0.2" PrivateAssets="All" />
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" />
<PackageReference Include="Microsoft.FSharp.Core.netcore" Version="1.0.0-rc-170316-0" />
</ItemGroup>
We are shutting this repo down, it's been replaced with dotnet new
.