ionide / ionide-vscode-fsharp

VS Code plugin for F# development
http://ionide.io
MIT License
860 stars 279 forks source link

Project loading fails on xamarin androind apps #691

Closed chinwobble closed 6 years ago

chinwobble commented 6 years ago

When I try to load the following file in VSCode Ionide I get the following output:

Specs:

Output

[10:38:58 ERROR] Project loading failed, Cannot find output argument (-o, --out) in project 'c:\dev\DaisyParser\src\DaisyParser\DaisyParser.fsproj' with args {ProjectFileName = "c:\dev\DaisyParser\src\DaisyParser\DaisyParser.fsproj";
 SourceFiles =
  [|"c:\dev\DaisyParser\src\DaisyParser\Daisy202Parser\Domain.fs";
    "c:\dev\DaisyParser\src\DaisyParser\Daisy202Parser\Common.fs";
    "c:\dev\DaisyParser\src\DaisyParser\Daisy202Parser\HeadParser.fs";
    "c:\dev\DaisyParser\src\DaisyParser\Daisy202Parser\BodyParser.fs";
    "c:\dev\DaisyParser\src\DaisyParser\Daisy202Parser\SmilParser.fs";
    "c:\dev\DaisyParser\src\DaisyParser\Daisy202Parser\Processor.fs"|];
 OtherOptions =
  [|"-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.4.1.0\FSharp.Core.dll";
    "--simpleresolution"; "--noframework"; "--fullpaths"; "--flaterrors";
    "--target:library"; "--define:DEBUG"; "--define:TRACE"; "--debug+";
    "--optimize-"; "--tailcalls-"; "--debug:full"; "--platform:anycpu";
    "--warnon:1182"|];
 ReferencedProjects = [||];
 IsIncompleteTypeCheckEnvironment = false;
 UseScriptResolutionRules = false;
 LoadTime = 31/12/9999 11:59:59 PM;
 UnresolvedReferences = None;
 OriginalLoadReferences = [];
 ExtraProjectInfo = None;
 Stamp = None;} 'c:\dev\DaisyParser\src\DaisyParser\DaisyParser.fsproj'

FSProj File:

Full project can be cloned from here: https://github.com/chinwobble/DaisyParser

Click to expand for whole fsproj ```xml DaisyParser DaisyParser DaisyParser Debug AnyCPU 2.0 ad6a7f8b-5c4d-41d6-8595-427df609ca15 Library v4.6.2 4.4.1.0 true Full false false bin\Debug DEBUG;TRACE 3 --warnon:1182 PdbOnly true true .\bin\Release TRACE 3 --warnon:1182 $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets ..\..\packages\FParsec\lib\net40-client\FParsec.dll True True ..\..\packages\FParsec\lib\net40-client\FParsecCS.dll True True ..\..\packages\FParsec\lib\portable-net45+netcore45+wpa81+wp8\FParsec.dll True True ..\..\packages\FParsec\lib\portable-net45+netcore45+wpa81+wp8\FParsecCS.dll True True ..\..\packages\FSharp.Core\lib\net45\FSharp.Core.dll True True ..\..\packages\FSharp.Core\lib\netstandard1.6\FSharp.Core.dll True True True ..\..\packages\FSharp.Data\lib\net40\FSharp.Data.dll True True ..\..\packages\FSharp.Data\lib\portable-net45+netcore45\FSharp.Data.dll True True ..\..\packages\FSharp.Data\lib\portable-net45+netcore45+wpa81+wp8\FSharp.Data.dll True True ..\..\packages\FSharp.Data\lib\portable-net45+sl50+netcore45\FSharp.Data.dll True True ..\..\packages\Microsoft.Win32.Primitives\ref\netstandard1.3\Microsoft.Win32.Primitives.dll False True ..\..\packages\NodaTime\lib\net45\NodaTime.dll True True ..\..\packages\NodaTime\lib\netstandard1.3\NodaTime.dll True True ..\..\packages\System.AppContext\ref\netstandard1.3\System.AppContext.dll False True ..\..\packages\System.AppContext\lib\netstandard1.6\System.AppContext.dll True True ..\..\packages\System.AppContext\ref\netstandard1.6\System.AppContext.dll False True ..\..\packages\System.Buffers\lib\netstandard1.1\System.Buffers.dll True True ..\..\packages\System.Collections\ref\netstandard1.3\System.Collections.dll False True ..\..\packages\System.Collections.Concurrent\lib\netstandard1.3\System.Collections.Concurrent.dll True True ..\..\packages\System.Collections.Concurrent\ref\netstandard1.3\System.Collections.Concurrent.dll False True ..\..\packages\System.Console\ref\netstandard1.3\System.Console.dll False True ..\..\packages\System.Diagnostics.Debug\ref\netstandard1.3\System.Diagnostics.Debug.dll False True ..\..\packages\System.Diagnostics.DiagnosticSource\lib\netstandard1.3\System.Diagnostics.DiagnosticSource.dll True True ..\..\packages\System.Diagnostics.Tools\ref\netstandard1.0\System.Diagnostics.Tools.dll False True ..\..\packages\System.Diagnostics.Tracing\ref\netstandard1.3\System.Diagnostics.Tracing.dll False True ..\..\packages\System.Diagnostics.Tracing\ref\netstandard1.5\System.Diagnostics.Tracing.dll False True ..\..\packages\System.Globalization\ref\netstandard1.3\System.Globalization.dll False True ..\..\packages\System.Globalization.Calendars\ref\netstandard1.3\System.Globalization.Calendars.dll False True ..\..\packages\System.Globalization.Extensions\ref\netstandard1.3\System.Globalization.Extensions.dll False True ..\..\packages\System.IO\ref\netstandard1.3\System.IO.dll False True ..\..\packages\System.IO\ref\netstandard1.5\System.IO.dll False True True True ..\..\packages\System.IO.Compression\ref\netstandard1.3\System.IO.Compression.dll False True True True True True ..\..\packages\System.IO.Compression.ZipFile\lib\netstandard1.3\System.IO.Compression.ZipFile.dll True True ..\..\packages\System.IO.Compression.ZipFile\ref\netstandard1.3\System.IO.Compression.ZipFile.dll False True ..\..\packages\System.IO.FileSystem\ref\netstandard1.3\System.IO.FileSystem.dll False True ..\..\packages\System.IO.FileSystem.Primitives\lib\netstandard1.3\System.IO.FileSystem.Primitives.dll True True ..\..\packages\System.IO.FileSystem.Primitives\ref\netstandard1.3\System.IO.FileSystem.Primitives.dll False True ..\..\packages\System.Linq\ref\netstandard1.0\System.Linq.dll False True ..\..\packages\System.Linq\lib\netstandard1.6\System.Linq.dll True True ..\..\packages\System.Linq\ref\netstandard1.6\System.Linq.dll False True ..\..\packages\System.Linq.Expressions\ref\netstandard1.3\System.Linq.Expressions.dll False True ..\..\packages\System.Linq.Expressions\lib\netstandard1.6\System.Linq.Expressions.dll True True ..\..\packages\System.Linq.Expressions\ref\netstandard1.6\System.Linq.Expressions.dll False True ..\..\packages\System.Linq.Queryable\ref\netstandard1.0\System.Linq.Queryable.dll False True ..\..\packages\System.Linq.Queryable\lib\netstandard1.3\System.Linq.Queryable.dll True True True True True ..\..\packages\System.Net.Http\ref\netstandard1.3\System.Net.Http.dll False True True True True ..\..\packages\System.Net.Primitives\ref\netstandard1.3\System.Net.Primitives.dll False True ..\..\packages\System.Net.Requests\ref\netstandard1.3\System.Net.Requests.dll False True ..\..\packages\System.Net.Sockets\ref\netstandard1.3\System.Net.Sockets.dll False True ..\..\packages\System.Net.WebHeaderCollection\lib\netstandard1.3\System.Net.WebHeaderCollection.dll True True ..\..\packages\System.Net.WebHeaderCollection\ref\netstandard1.3\System.Net.WebHeaderCollection.dll False True ..\..\packages\System.ObjectModel\lib\netstandard1.3\System.ObjectModel.dll True True ..\..\packages\System.ObjectModel\ref\netstandard1.3\System.ObjectModel.dll False True ..\..\packages\System.Private.DataContractSerialization\lib\netstandard1.3\System.Private.DataContractSerialization.dll True True ..\..\packages\System.Reflection\ref\netstandard1.3\System.Reflection.dll False True ..\..\packages\System.Reflection\ref\netstandard1.5\System.Reflection.dll False True ..\..\packages\System.Reflection.Emit\ref\netstandard1.1\System.Reflection.Emit.dll False True ..\..\packages\System.Reflection.Emit\lib\netstandard1.3\System.Reflection.Emit.dll True True ..\..\packages\System.Reflection.Emit.ILGeneration\ref\netstandard1.0\System.Reflection.Emit.ILGeneration.dll False True ..\..\packages\System.Reflection.Emit.ILGeneration\lib\netstandard1.3\System.Reflection.Emit.ILGeneration.dll True True ..\..\packages\System.Reflection.Emit.Lightweight\ref\netstandard1.0\System.Reflection.Emit.Lightweight.dll False True ..\..\packages\System.Reflection.Emit.Lightweight\lib\netstandard1.3\System.Reflection.Emit.Lightweight.dll True True ..\..\packages\System.Reflection.Extensions\ref\netstandard1.0\System.Reflection.Extensions.dll False True ..\..\packages\System.Reflection.Primitives\ref\netstandard1.0\System.Reflection.Primitives.dll False True ..\..\packages\System.Reflection.TypeExtensions\ref\netstandard1.3\System.Reflection.TypeExtensions.dll False True ..\..\packages\System.Reflection.TypeExtensions\lib\netstandard1.5\System.Reflection.TypeExtensions.dll True True ..\..\packages\System.Reflection.TypeExtensions\ref\netstandard1.5\System.Reflection.TypeExtensions.dll False True ..\..\packages\System.Resources.ResourceManager\ref\netstandard1.0\System.Resources.ResourceManager.dll False True ..\..\packages\System.Runtime\ref\netstandard1.3\System.Runtime.dll False True ..\..\packages\System.Runtime\ref\netstandard1.5\System.Runtime.dll False True ..\..\packages\System.Runtime.Extensions\ref\netstandard1.3\System.Runtime.Extensions.dll False True ..\..\packages\System.Runtime.Extensions\ref\netstandard1.5\System.Runtime.Extensions.dll False True ..\..\packages\System.Runtime.Handles\ref\netstandard1.3\System.Runtime.Handles.dll False True ..\..\packages\System.Runtime.InteropServices\ref\netcoreapp1.1\System.Runtime.InteropServices.dll False True ..\..\packages\System.Runtime.InteropServices\ref\netstandard1.3\System.Runtime.InteropServices.dll False True ..\..\packages\System.Runtime.InteropServices\ref\netstandard1.5\System.Runtime.InteropServices.dll False True ..\..\packages\System.Runtime.InteropServices.RuntimeInformation\lib\netstandard1.1\System.Runtime.InteropServices.RuntimeInformation.dll True True ..\..\packages\System.Runtime.InteropServices.RuntimeInformation\ref\netstandard1.1\System.Runtime.InteropServices.RuntimeInformation.dll False True ..\..\packages\System.Runtime.InteropServices.RuntimeInformation\lib\wpa81\System.Runtime.InteropServices.RuntimeInformation.dll True True ..\..\packages\System.Runtime.Numerics\ref\netstandard1.1\System.Runtime.Numerics.dll False True ..\..\packages\System.Runtime.Numerics\lib\netstandard1.3\System.Runtime.Numerics.dll True True ..\..\packages\System.Runtime.Serialization.Primitives\lib\netstandard1.3\System.Runtime.Serialization.Primitives.dll True True ..\..\packages\System.Runtime.Serialization.Primitives\ref\netstandard1.3\System.Runtime.Serialization.Primitives.dll False True ..\..\packages\System.Runtime.Serialization.Xml\lib\netstandard1.3\System.Runtime.Serialization.Xml.dll True True ..\..\packages\System.Runtime.Serialization.Xml\ref\netstandard1.3\System.Runtime.Serialization.Xml.dll False True ..\..\packages\System.Security.Cryptography.Algorithms\ref\netstandard1.3\System.Security.Cryptography.Algorithms.dll False True ..\..\packages\System.Security.Cryptography.Algorithms\ref\netstandard1.4\System.Security.Cryptography.Algorithms.dll False True ..\..\packages\System.Security.Cryptography.Algorithms\ref\netstandard1.6\System.Security.Cryptography.Algorithms.dll False True ..\..\packages\System.Security.Cryptography.Cng\ref\netstandard1.6\System.Security.Cryptography.Cng.dll False True ..\..\packages\System.Security.Cryptography.Csp\ref\netstandard1.3\System.Security.Cryptography.Csp.dll False True ..\..\packages\System.Security.Cryptography.Encoding\ref\netstandard1.3\System.Security.Cryptography.Encoding.dll False True ..\..\packages\System.Security.Cryptography.OpenSsl\lib\netstandard1.6\System.Security.Cryptography.OpenSsl.dll True True ..\..\packages\System.Security.Cryptography.OpenSsl\ref\netstandard1.6\System.Security.Cryptography.OpenSsl.dll False True ..\..\packages\System.Security.Cryptography.Primitives\lib\netstandard1.3\System.Security.Cryptography.Primitives.dll True True ..\..\packages\System.Security.Cryptography.Primitives\ref\netstandard1.3\System.Security.Cryptography.Primitives.dll False True ..\..\packages\System.Security.Cryptography.X509Certificates\ref\netstandard1.3\System.Security.Cryptography.X509Certificates.dll False True ..\..\packages\System.Security.Cryptography.X509Certificates\ref\netstandard1.4\System.Security.Cryptography.X509Certificates.dll False True ..\..\packages\System.Text.Encoding\ref\netstandard1.3\System.Text.Encoding.dll False True ..\..\packages\System.Text.Encoding.Extensions\ref\netstandard1.3\System.Text.Encoding.Extensions.dll False True ..\..\packages\System.Text.RegularExpressions\ref\netcoreapp1.1\System.Text.RegularExpressions.dll False True ..\..\packages\System.Text.RegularExpressions\ref\netstandard1.3\System.Text.RegularExpressions.dll False True ..\..\packages\System.Text.RegularExpressions\lib\netstandard1.6\System.Text.RegularExpressions.dll True True ..\..\packages\System.Text.RegularExpressions\ref\netstandard1.6\System.Text.RegularExpressions.dll False True ..\..\packages\System.Threading\lib\netstandard1.3\System.Threading.dll True True ..\..\packages\System.Threading\ref\netstandard1.3\System.Threading.dll False True ..\..\packages\System.Threading.Tasks\ref\netstandard1.3\System.Threading.Tasks.dll False True ..\..\packages\System.Threading.Tasks.Extensions\lib\netstandard1.0\System.Threading.Tasks.Extensions.dll True True ..\..\packages\System.Threading.Tasks.Parallel\ref\netstandard1.1\System.Threading.Tasks.Parallel.dll False True ..\..\packages\System.Threading.Tasks.Parallel\lib\netstandard1.3\System.Threading.Tasks.Parallel.dll True True ..\..\packages\System.Threading.Thread\lib\netstandard1.3\System.Threading.Thread.dll True True ..\..\packages\System.Threading.Thread\ref\netstandard1.3\System.Threading.Thread.dll False True ..\..\packages\System.Threading.ThreadPool\lib\netstandard1.3\System.Threading.ThreadPool.dll True True ..\..\packages\System.Threading.ThreadPool\ref\netstandard1.3\System.Threading.ThreadPool.dll False True ..\..\packages\System.Threading.Timer\ref\netstandard1.2\System.Threading.Timer.dll False True ..\..\packages\System.Xml.ReaderWriter\lib\netstandard1.3\System.Xml.ReaderWriter.dll True True ..\..\packages\System.Xml.ReaderWriter\ref\netstandard1.3\System.Xml.ReaderWriter.dll False True ..\..\packages\System.Xml.XDocument\lib\netstandard1.3\System.Xml.XDocument.dll True True ..\..\packages\System.Xml.XDocument\ref\netstandard1.3\System.Xml.XDocument.dll False True ..\..\packages\System.Xml.XmlDocument\lib\netstandard1.3\System.Xml.XmlDocument.dll True True ..\..\packages\System.Xml.XmlDocument\ref\netstandard1.3\System.Xml.XmlDocument.dll False True ..\..\packages\System.Xml.XmlSerializer\lib\netstandard1.3\System.Xml.XmlSerializer.dll True True ..\..\packages\System.Xml.XmlSerializer\ref\netstandard1.3\System.Xml.XmlSerializer.dll False True ..\..\packages\Zlib.Portable\lib\portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid\Zlib.Portable.dll True True ```
enricosada commented 6 years ago

@chinwobble i cannot repro. (win10 - ionide v3.15.7). is a project cracker issue, not of ionide itself.

what's the msbuild version? you have any VS installed?

can you try, as possible workaround to use the fsac .net core? use a different project parser.

enable it with setting "FSharp.fsacRuntime": "netcore" and open vscode from a prompt where msbuild is in PATH (likethe VS Command Prompt)

chinwobble commented 6 years ago

@enricosada thanks for your quick reply here are the details you requrested:

However when I open an Xamarin android project it fails to load (it successfully loads in visual studio but has never loaded in VSCode before) It gives the following output:

Error:
MSBuild failed with exitCode 1 Working Directory: 'c:\dev\DaisyApp\DaisyApp.Droid' Exe Path: 'msbuild' Args: 'c:\dev\DaisyApp\DaisyApp.Droid\DaisyApp.Droid.fsproj /p:CopyBuildOutputToOutputDirectory=false /p:UseCommonOutputDirectory=true /p:BuildingInsideVisualStudio=true /p:ShouldUnsetParentConfigurationAndPlatform=true /t:Build /p:_Inspect_CoreCompilePropsOldSdk_OutFile=C:\Users\benne\AppData\Local\Temp\tmp2ED.tmp.CoreCompilePropsOldSdk.txt /p:DesignTimeBuild=true /t:_Inspect_GetResolvedProjectReferences /p:_Inspect_GetResolvedProjectReferences_OutFile=C:\Users\benne\AppData\Local\Temp\tmp2FE.tmp.GetResolvedProjectReferences.txt /t:_Inspect_GetProperties /p:_Inspect_GetProperties_OutFile=C:\Users\benne\AppData\Local\Temp\tmp2FF.tmp.GetProperties.txt /p:CustomAfterMicrosoftCommonTargets=C:\Users\benne\AppData\Local\Temp\tmp30F.tmp.proj-info.oldsdk-hook.targets /nologo /verbosity:quiet' Log: writing helper target file in 'C:\Users\benne\AppData\Local\Temp\tmp30F.tmp.proj-info.oldsdk-hook.targets' packages.config : warning XA0101: @(Content) build action is not supported [c:\dev\DaisyApp\DaisyApp.Droid\DaisyApp.Droid.fsproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\bin\Microsoft.Common.CurrentVersion.targets(2041,5): warning MSB3277: Found conflicts between different versions of "Microsoft.CSharp" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [c:\dev\DaisyApp\DaisyApp.Droid\DaisyApp.Droid.fsproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\bin\Microsoft.Common.CurrentVersion.targets(2041,5): warning MSB3277: Found conflicts between different versions of "FSharp.Core" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [c:\dev\DaisyApp\DaisyApp.Droid\DaisyApp.Droid.fsproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\bin\Microsoft.Common.CurrentVersion.targets(2041,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: [c:\dev\DaisyApp\DaisyApp.Droid\DaisyApp.Droid.fsproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2153,3): warning MSB3277: Found conflicts between different versions of "FSharp.Core" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [c:\dev\DaisyApp\DaisyApp.Droid\DaisyApp.Droid.fsproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2153,3): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: [c:\dev\DaisyApp\DaisyApp.Droid\DaisyApp.Droid.fsproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1667,5): error MSB4018: The "LinkAssemblies" task failed unexpectedly. [c:\dev\DaisyApp\DaisyApp.Droid\DaisyApp.Droid.fsproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1667,5): error MSB4018: System.IO.FileNotFoundException: Could not load assembly 'DaisyApp.Droid, Version=0.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile? [c:\dev\DaisyApp\DaisyApp.Droid\DaisyApp.Droid.fsproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1667,5): error MSB4018: File name: 'DaisyApp.Droid.dll' [c:\dev\DaisyApp\DaisyApp.Droid\DaisyApp.Droid.fsproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1667,5): error MSB4018: at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters) in /Users/builder/data/lanes/5749/d8c6e504/source/xamarin-android/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/DirectoryAssemblyResolver.cs:line 229 [c:\dev\DaisyApp\DaisyApp.Droid\DaisyApp.Droid.fsproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1667,5): error MSB4018: at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.GetAssembly(String fileName) in /Users/builder/data/lanes/5749/d8c6e504/source/xamarin-android/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/DirectoryAssemblyResolver.cs:line 164 [c:\dev\DaisyApp\DaisyApp.Droid\DaisyApp.Droid.fsproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1667,5): error MSB4018: at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res) [c:\dev\DaisyApp\DaisyApp.Droid\DaisyApp.Droid.fsproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1667,5): error MSB4018: at Xamarin.Android.Tasks.LinkAssemblies.Execute() [c:\dev\DaisyApp\DaisyApp.Droid\DaisyApp.Droid.fsproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1667,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [c:\dev\DaisyApp\DaisyApp.Droid\DaisyApp.Droid.fsproj] C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1667,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() [c:\dev\DaisyApp\DaisyApp.Droid\DaisyApp.Droid.fsproj]
enricosada commented 6 years ago

@chinwobble nice that FSharp.fsacRuntime: netcore works. that use the new project parser, previous one (projectcracker) has issues (like you have seen). it is going to be possibile in the near future to use it also with fsacRuntime: net , but please just use fsacRuntime: netcore for now as workaround.

this setting can be applied to workaround that repository (Open Workspace Setting command), no need to be set per user (Open User Settings command) if you want

About the Xamarin android project, can you share the fsproj? just that, not the source files? a repro will be is the best :D

chinwobble commented 6 years ago

@enricosada ooops sorry forgot to add the xamarin android fsproj file. Please find it below:

The error happens with several xamarin android apps I have tried to open in VSCode.

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
    <ProjectGuid>{7527A41F-0A76-4058-A414-DAD1A9585660}</ProjectGuid>
    <ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{F2A71F9B-5D33-465A-A702-920D77279786}</ProjectTypeGuids>
    <OutputType>Exe</OutputType>
    <RootNamespace>GWallet.Frontend.XamForms.iOS</RootNamespace>
    <AssemblyName>GWallet.Frontend.XamForms.iOS</AssemblyName>
    <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
    <SelectedDevice>Simulator</SelectedDevice>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
    <DefineConstants>DEBUG</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <CodesignKey>iPhone Developer</CodesignKey>
    <MtouchDebug>true</MtouchDebug>
    <MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
    <MtouchFastDev>true</MtouchFastDev>
    <IOSDebuggerPort>26913</IOSDebuggerPort>
    <MtouchLink>None</MtouchLink>
    <MtouchArch>x86_64</MtouchArch>
    <MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
    <PlatformTarget>x86</PlatformTarget>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\iPhone\Release</OutputPath>
    <DefineConstants>
    </DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <CodesignKey>iPhone Developer</CodesignKey>
    <MtouchFloat32>true</MtouchFloat32>
    <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
    <MtouchLink>SdkOnly</MtouchLink>
    <MtouchArch>ARM64</MtouchArch>
    <MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
    <GenerateTailCalls>true</GenerateTailCalls>
    <PlatformTarget>x86</PlatformTarget>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\iPhoneSimulator\Release</OutputPath>
    <DefineConstants>
    </DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <CodesignKey>iPhone Developer</CodesignKey>
    <MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
    <MtouchLink>None</MtouchLink>
    <MtouchArch>x86_64</MtouchArch>
    <MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
    <GenerateTailCalls>true</GenerateTailCalls>
    <PlatformTarget>x86</PlatformTarget>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>portable</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\iPhone\Debug</OutputPath>
    <DefineConstants>DEBUG</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <CodesignKey>iPhone Developer</CodesignKey>
    <DeviceSpecificBuild>true</DeviceSpecificBuild>
    <MtouchDebug>true</MtouchDebug>
    <MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
    <MtouchFastDev>true</MtouchFastDev>
    <MtouchFloat32>true</MtouchFloat32>
    <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
    <IOSDebuggerPort>47389</IOSDebuggerPort>
    <MtouchLink>Full</MtouchLink>
    <MtouchArch>ARM64</MtouchArch>
    <MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
    <PlatformTarget>x86</PlatformTarget>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Core" />
    <Reference Include="Xamarin.iOS" />
    <Reference Include="Xamarin.Forms.Core">
      <HintPath>..\..\packages\Xamarin.Forms.2.3.4.247\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll</HintPath>
    </Reference>
    <Reference Include="Xamarin.Forms.Platform">
      <HintPath>..\..\packages\Xamarin.Forms.2.3.4.247\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll</HintPath>
    </Reference>
    <Reference Include="Xamarin.Forms.Platform.iOS">
      <HintPath>..\..\packages\Xamarin.Forms.2.3.4.247\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll</HintPath>
    </Reference>
    <Reference Include="Xamarin.Forms.Xaml">
      <HintPath>..\..\packages\Xamarin.Forms.2.3.4.247\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="System.IO.Compression" />
    <Reference Include="System.Net.Http" />
    <Reference Include="Newtonsoft.Json">
      <HintPath>..\..\packages\Newtonsoft.Json.10.0.3\lib\netstandard1.3\Newtonsoft.Json.dll</HintPath>
    </Reference>
    <Reference Include="crypto">
      <HintPath>..\..\packages\Portable.BouncyCastle.1.8.1.1\lib\netstandard1.3\crypto.dll</HintPath>
    </Reference>
    <Reference Include="EdjCase.JsonRpc.Core">
      <HintPath>..\..\packages\EdjCase.JsonRpc.Core.1.3.1\lib\portable45-net45+win8+wpa81\EdjCase.JsonRpc.Core.dll</HintPath>
    </Reference>
    <Reference Include="EdjCase.JsonRpc.Client">
      <HintPath>..\..\packages\EdjCase.JsonRpc.Client.1.3.1\lib\portable45-net45+win8+wpa81\EdjCase.JsonRpc.Client.dll</HintPath>
    </Reference>
    <Reference Include="Plugin.Clipboard.Abstractions">
      <HintPath>..\..\packages\Xamarin.Plugins.Clipboard.2.0.0\lib\Xamarin.iOS10\Plugin.Clipboard.Abstractions.dll</HintPath>
    </Reference>
    <Reference Include="Plugin.Clipboard">
      <HintPath>..\..\packages\Xamarin.Plugins.Clipboard.2.0.0\lib\Xamarin.iOS10\Plugin.Clipboard.dll</HintPath>
    </Reference>
    <Reference Include="NBitcoin">
      <HintPath>..\..\packages\NBitcoin.3.0.2.24\lib\netstandard1.3\NBitcoin.dll</HintPath>
    </Reference>
    <Reference Include="SharpRavenLight">
      <HintPath>..\..\packages\SharpRavenLight.1.0.0-beta5\lib\netstandard2.0\SharpRavenLight.dll</HintPath>
    </Reference>
    <Reference Include="Nethereum.Hex">
      <HintPath>..\..\packages\Nethereum.Hex.2.0.1\lib\netstandard1.1\Nethereum.Hex.dll</HintPath>
    </Reference>
    <Reference Include="Nethereum.Util">
      <HintPath>..\..\packages\Nethereum.Util.2.0.1\lib\netstandard1.1\Nethereum.Util.dll</HintPath>
    </Reference>
    <Reference Include="Nethereum.ABI">
      <HintPath>..\..\packages\Nethereum.ABI.2.0.1\lib\netstandard1.1\Nethereum.ABI.dll</HintPath>
    </Reference>
    <Reference Include="Nethereum.JsonRpc.Client">
      <HintPath>..\..\packages\Nethereum.JsonRpc.Client.2.0.1\lib\netstandard1.1\Nethereum.JsonRpc.Client.dll</HintPath>
    </Reference>
    <Reference Include="Nethereum.RPC">
      <HintPath>..\..\packages\Nethereum.RPC.2.0.1\lib\netstandard1.1\Nethereum.RPC.dll</HintPath>
    </Reference>
    <Reference Include="Nethereum.JsonRpc.RpcClient">
      <HintPath>..\..\packages\Nethereum.JsonRpc.RpcClient.2.0.1\lib\netstandard1.1\Nethereum.JsonRpc.RpcClient.dll</HintPath>
    </Reference>
    <Reference Include="Nethereum.Contracts">
      <HintPath>..\..\packages\Nethereum.Contracts.2.0.1\lib\netstandard1.1\Nethereum.Contracts.dll</HintPath>
    </Reference>
    <Reference Include="Nethereum.RLP">
      <HintPath>..\..\packages\Nethereum.RLP.2.0.1\lib\netstandard1.1\Nethereum.RLP.dll</HintPath>
    </Reference>
    <Reference Include="Nethereum.KeyStore">
      <HintPath>..\..\packages\Nethereum.KeyStore.2.0.1\lib\netstandard1.1\Nethereum.KeyStore.dll</HintPath>
    </Reference>
    <Reference Include="Nethereum.Signer">
      <HintPath>..\..\packages\Nethereum.Signer.2.0.1\lib\netstandard1.1\Nethereum.Signer.dll</HintPath>
    </Reference>
    <Reference Include="Nethereum.Web3">
      <HintPath>..\..\packages\Nethereum.Web3.2.0.1\lib\netstandard1.1\Nethereum.Web3.dll</HintPath>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json">
      <Visible>false</Visible>
    </ImageAsset>
    <ImageAsset Include="Assets.xcassets\Contents.json">
      <Visible>false</Visible>
    </ImageAsset>
    <InterfaceDefinition Include="LaunchScreen.storyboard" />
    <None Include="Info.plist" />
    <None Include="Entitlements.plist" />
    <Compile Include="AppDelegate.fs" />
    <None Include="packages.config" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\GWallet.Frontend.XF\GWallet.Frontend.XF.fsproj">
      <Project>{19C613A6-21D8-4120-8E5D-C092193D1003}</Project>
      <Name>GWallet.Frontend.XF</Name>
    </ProjectReference>
  </ItemGroup>
  <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.FSharp.targets" />
  <Import Project="..\..\packages\Xamarin.Forms.2.3.4.247\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.2.3.4.247\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
</Project>
enricosada commented 6 years ago

The error happens with several xamarin android apps I have tried to open in VSCode.

good, mean the bug is only one usually :D

Thanks a lot @chinwobble .The issue is not with ionide itself, but of the project parser library used (https://github.com/enricosada/dotnet-proj-info).

created this https://github.com/enricosada/dotnet-proj-info/issues/15 to track it.

Closing. the work will continue in https://github.com/enricosada/dotnet-proj-info/issues/15 and the fix will be integrated in ionide when dotnet.projinfo library will be fixed..