New project from EXF template fails to build in Visual Studio
See original GitHub issueError:
/Users/sam.williams/Projects/SqueakyApp/SqueakyApp/FSC: Error FS0193: The module/namespace 'Microsoft.FSharp.Core' from compilation unit 'FSharp.Core' did not contain the namespace, module or type 'voption
1’ (FS0193) (SqueakyApp)`
Occurs in all projects - Core, Droid and iOS
Expected: all projects build successfully
Steps:
dotnet new elmish-forms-app -lang F# -n SqueakyApp
create an sln file and add the three projects
open sln file in Visual Studio for Mac
build project (I used DEBUG | AnyCPU
as the configuration)
also tried changed FSharp.Core version in the .NET Standard project using both 4.3.4 and 4.5.0. The .NET Standard project still fails to build. also tried adding the fsc.props file
Environment:
=== Visual Studio Professional 2017 for Mac ===
Version 7.5.3 (build 7)
Installation UUID: 82dffde3-8fbe-456a-90d8-d8692da1f7d9
Runtime:
Mono 5.10.1.57 (2017-12/ea8a24b1bbf) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 4.4.1.178 (master / eeaeb7e6)
Package version: 510010057
=== NuGet ===
Version: 4.3.1.4445
=== .NET Core ===
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.1.0
2.0.5
2.0.0
1.1.2
1.1.1
1.1.0
1.0.5
1.0.4
SDK: /usr/local/share/dotnet/sdk/2.1.300/Sdks
SDK Versions:
2.1.300
2.1.4
2.0.0
1.0.4
1.0.1
1.0.0-preview2-1-003177
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.10.1/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Version: 1.6.2
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Xamarin.Android ===
Version: 8.3.3.2 (Visual Studio Professional)
Android SDK: /Users/sam.williams/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
4.0.3 (API level 15)
5.1 (API level 22)
6.0 (API level 23)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 27.0.1
SDK Build Tools Version: 27.0.3
Java SDK: /usr
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Apple Developer Tools ===
Xcode 9.3.1 (14154.1)
Build 9E501
=== Xamarin.Mac ===
Version: 4.4.1.193 (Visual Studio Professional)
=== Xamarin.iOS ===
Version: 11.12.0.4 (Visual Studio Professional)
Hash: 64fece5f
Branch: d15-7
Build date: 2018-05-29 20:00:44-0400
=== Xamarin Inspector ===
Version: 1.4.0
Hash: b3f92f9
Branch: master
Build date: Fri, 19 Jan 2018 22:00:34 GMT
Client compatibility: 1
=== Build Information ===
Release ID: 705030007
Git revision: 13cecd02aceddf29a1ed57b86f81c02994df1483
Build date: 2018-06-14 15:48:08-04
Xamarin addins: 7065de97cf22c9038fdc39dd627f2c30790fd8af
Build lane: monodevelop-lion-d15-7
=== Operating System ===
Mac OS X 10.13.3
Darwin 17.4.0 Darwin Kernel Version 17.4.0
Sun Dec 17 09:19:54 PST 2017
root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64
=== Enabled user installed addins ===
Straight8's SpecFlow Intergration 1.11.0.0
Internet of Things (IoT) development (Preview) 7.5
Issue Analytics
- State:
- Created 5 years ago
- Comments:8
Top Results From Across the Web
Troubleshoot project and item templates
Learn how to troubleshoot templates when they fail to load in the development environment.
Read more >Even Visual Studio's project templates fail silently when ...
Any UWP project I build (using Visual Studio 2019, Windows 10 build 19042.1052, .NET 5.0) will: Work perfectly when launched from within Visual ......
Read more >Create New Project From Template Missing
I can import template items into an existing project no problem, I just can't create a new project from an existing template. Visual...
Read more >Visual Studio fails to display Project Templates for MapXtreme ...
Describes the possible causes and resolution of MapXtreme Project Templates failing to appear in the New > Project > Installed list in Visual...
Read more >VS2017 RC - new Project Type template failed to build · ...
I've created a new project based on Project Type template. It loaded fine and looks good. However when I build I get this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@willsam100 : ugh, yes - this is a known issue in VSMac and was recently fixed
so i have made some progress, I believe the issue is with VS4Mac
I cleared the packages (and bin + obj folder). then ran
nuget restore
andmsbuild /v:d
from terminal and the build passes. log files attached.however, when I delete the packages (and bin + obj folder) and then open the sln file in VS4Mac it seems the nuget restore fails. I have attached the logs for that and also a screenshot. The screenshot shows FSharp.Core 4.5.0 as the required version in the proj file, however VS4Mac has restored 4.2.3 (the exact version that VS4Mac restores each time is non-deterministic, usually it downloads 4.3.4 which is still incorrect. it never seems to restore verison 4.5.0) which can be seen in the solution explorer in the left.
running the commands from terminal first, and then opening the sln in VS4Mac results in the build working from VS4Mac, and I can even run the Droid project in an emulator.
build.log restore.log vs4macRestore.log