ionide-vscode-fsharp
ionide-vscode-fsharp copied to clipboard
Project "load failed" in net5.0 devcontainer
Describe the bug**
All projects show as "(load failed)" when run in net5.0 devcontainer -- even after a successful dotnet build
.
Steps to reproduce
- Open sln in Ionide
- When prompted, open in remote dev container (with the "Remote - Containers" extension)
- All projects will show as "(load failed)"
- From terminal,
cd src
,dotnet build
- All projects still show as "(load failed)" even after successful build
- Disable Ionide and reload vscode
- Re-enable Ionide -- only now are projects loaded properly
Link to sample reproduction
https://github.com/JordanMarr/SqlHydra
Expected behaviour
I would expect that projects should load properly after a successful build when in the devcontainer.
Screenshots
--
Machine info
- OS: Host: Windows, Container: Ubuntu
- .NET SDK version: 5.0 (container details here)
- Ionide version: 5.7.1
Additional context
--
Hey @JordanMarr :wave:,
Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our OpenCollective and consider backing us.
https://opencollective.com/ionide
PS.: We offer
backer
support for all backers. Don't forget to addbacker
label when you start backing us :smile:
I had the same problem and this is the log appeared:
Status: failed to load
Error:
Build started. Project "WordsHttpCounter.fsproj" (ResolvePackageDependenciesDesignTime;_GenerateCompileDependencyCache;CoreCompile target(s)): Building with tools version "Current". Target "_CheckForUnsupportedTargetFramework" skipped, due to false condition; ('$(_UnsupportedTargetFrameworkError)' == 'true') was evaluated as ('' == 'true'). Target "_CollectTargetFrameworkForTelemetry" in file "/usr/share/dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets" from project "/workspaces/starting-fsharp/WordsHttpCounter/WordsHttpCounter.fsproj" (target "RunResolvePackageDependencies" depends on it): Using "AllowEmptyTelemetry" task from assembly "/usr/share/dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/targets/../tools/net5.0/Microsoft.NET.Build.Tasks.dll". Task "AllowEmptyTelemetry" Done executing task "AllowEmptyTelemetry". Done building target "_CollectTargetFrameworkForTelemetry" in project "WordsHttpCounter.fsproj". Target "_CheckForUnsupportedTargetPlatformIdentifier" skipped, due to false condition; ('$(TargetPlatformIdentifier)' != '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0))) was evaluated as ('' != '' and '.NETCoreApp' == '.NETCoreApp' and True). Target "RunResolvePackageDependencies" in file "/usr/share/dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets" from project "/workspaces/starting-fsharp/WordsHttpCounter/WordsHttpCounter.fsproj" (target "ResolvePackageDependenciesDesignTime" depends on it): Task "CheckForTargetInAssetsFile" skipped, due to false condition; ( '$(DesignTimeBuild)' != 'true') was evaluated as ( 'true' != 'true'). Using "ResolvePackageDependencies" task from assembly "/usr/share/dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/targets/../tools/net5.0/Microsoft.NET.Build.Tasks.dll". Task "ResolvePackageDependencies" Done executing task "ResolvePackageDependencies". Done building target "RunResolvePackageDependencies" in project "WordsHttpCounter.fsproj". Target "AssignProjectConfiguration" skipped, due to false condition; ('$(CurrentSolutionConfigurationContents)' != '' or '@(ProjectReference)'!='') was evaluated as ('' != '' or ''!=''). Target "AddWindowsSdkKnownFrameworkReferences" skipped, due to false condition; ('$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(TargetPlatformIdentifier)' == 'Windows') was evaluated as ('.NETCoreApp' == '.NETCoreApp' And '' == 'Windows'). Target "_NormalizeTargetPlatformVersion" skipped, due to false condition; ('$(TargetPlatformVersion)' != '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0)) and ('$(Language)' != 'C++' or '$(_EnablePackageReferencesInVCProjects)' == 'true')) was evaluated as ('' != '' and '.NETCoreApp' == '.NETCoreApp' and True and ('F#' != 'C++' or '' == 'true')). Target "_CheckForLanguageAndFeatureCombinationSupport" in file "/usr/share/dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.RuntimeIdentifierInference.targets" from project "/workspaces/starting-fsharp/WordsHttpCounter/WordsHttpCounter.fsproj" (target "ProcessFrameworkReferences" depends on it): Task "NETSdkError" skipped, due to false condition; (('$(Language)' == 'C++' and '$(_EnablePackageReferencesInVCProjects)' != 'true') and $(OutputType) != 'library' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp') was evaluated as (('F#' == 'C++' and '' != 'true') and Exe != 'library' and '.NETCoreApp' == '.NETCoreApp'). Task "NETSdkError" skipped, due to false condition; (('$(Language)' == 'C++' and '$(_EnablePackageReferencesInVCProjects)' != 'true') and $(EnableComHosting) == 'true') was evaluated as (('F#' == 'C++' and '' != 'true') and == 'true'). Task "NETSdkError" skipped, due to false condition; (('$(Language)' == 'C++' and '$(_EnablePackageReferencesInVCProjects)' != 'true') and $(SelfContained) == 'true') was evaluated as (('F#' == 'C++' and '' != 'true') and false == 'true'). Done building target "_CheckForLanguageAndFeatureCombinationSupport" in project "WordsHttpCounter.fsproj". Target "UpdateAspNetToFrameworkReference" in file "/usr/share/dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.DefaultItems.Shared.targets" from project "/workspaces/starting-fsharp/WordsHttpCounter/WordsHttpCounter.fsproj" (target "ApplyImplicitVersions" depends on it): Using "CheckIfPackageReferenceShouldBeFrameworkReference" task from assembly "/usr/share/dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/targets/../tools/net5.0/Microsoft.NET.Build.Tasks.dll". Task "CheckIfPackageReferenceShouldBeFrameworkReference" Done executing task "CheckIfPackageReferenceShouldBeFrameworkReference". Task "NETSdkError" skipped, due to false condition; ('$(_ShouldRemoveAspNetCoreAll)' == 'true') was evaluated as ('False' == 'true'). Task "CheckIfPackageReferenceShouldBeFrameworkReference" Done executing task "CheckIfPackageReferenceShouldBeFrameworkReference". Task "NETSdkWarning" skipped, due to false condition; ('$(_ShouldRemoveAspNetCoreApp)' == 'true') was evaluated as ('False' == 'true'). Done building target "UpdateAspNetToFrameworkReference" in project "WordsHttpCounter.fsproj". Target "IncludeTargetingPackReference" skipped, due to false condition; ('$(TargetFrameworkMoniker)' != '' and '$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(AutomaticallyUseReferenceAssemblyPackages)' == 'true') was evaluated as ('.NETCoreApp,Version=v5.0' != '' and '.NETCoreApp' == '.NETFramework' and 'true' == 'true'). Target "CheckForImplicitPackageReferenceOverrides" in file "/usr/share/dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.DefaultItems.Shared.targets" from project "/workspaces/starting-fsharp/WordsHttpCounter/WordsHttpCounter.fsproj" (target "ApplyImplicitVersions" depends on it): Using "CheckForImplicitPackageReferenceOverrides" task from assembly "/usr/share/dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/targets/../tools/net5.0/Microsoft.NET.Build.Tasks.dll". Task "CheckForImplicitPackageReferenceOverrides" Done executing task "CheckForImplicitPackageReferenceOverrides". Done building target "CheckForImplicitPackageReferenceOverrides" in project "WordsHttpCounter.fsproj". Target "ApplyImplicitVersions" in file "/usr/share/dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.DefaultItems.Shared.targets" from project "/workspaces/starting-fsharp/WordsHttpCounter/WordsHttpCounter.fsproj" (target "ProcessFrameworkReferences" depends on it): Using "ApplyImplicitVersions" task from assembly "/usr/share/dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/targets/../tools/net5.0/Microsoft.NET.Build.Tasks.dll". Task "ApplyImplicitVersions" Done executing task "ApplyImplicitVersions". Done building target "ApplyImplicitVersions" in project "WordsHttpCounter.fsproj". Target "ProcessFrameworkReferences" in file "/usr/share/dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets" from project "/workspaces/starting-fsharp/WordsHttpCounter/WordsHttpCounter.fsproj" (target "ResolvePackageAssets" depends on it): Using "CheckForDuplicateFrameworkReferences" task from assembly "/usr/share/dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/targets/../tools/net5.0/Microsoft.NET.Build.Tasks.dll". Task "CheckForDuplicateFrameworkReferences" Done executing task "CheckForDuplicateFrameworkReferences". Using "ProcessFrameworkReferences" task from assembly "/usr/share/dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/targets/../tools/net5.0/Microsoft.NET.Build.Tasks.dll". Task "ProcessFrameworkReferences" Done executing task "ProcessFrameworkReferences". Using "ResolveAppHosts" task from assembly "/usr/share/dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/targets/../tools/net5.0/Microsoft.NET.Build.Tasks.dll". Task "ResolveAppHosts" Done executing task "ResolveAppHosts". Done building target "ProcessFrameworkReferences" in project "WordsHttpCounter.fsproj". Target "_DefaultMicrosoftNETPlatformLibrary" in file "/usr/share/dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.Shared.targets" from project "/workspaces/starting-fsharp/WordsHttpCounter/WordsHttpCounter.fsproj" (target "ResolvePackageAssets" depends on it): Done building target "_DefaultMicrosoftNETPlatformLibrary" in project "WordsHttpCounter.fsproj". Target "_ComputePackageReferencePublish" in file "/usr/share/dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.Shared.targets" from project "/workspaces/starting-fsharp/WordsHttpCounter/WordsHttpCounter.fsproj" (target "ResolvePackageAssets" depends on it): Done building target "_ComputePackageReferencePublish" in project "WordsHttpCounter.fsproj". Target "ResolvePackageAssets" in file "/usr/share/dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets" from project "/workspaces/starting-fsharp/WordsHttpCounter/WordsHttpCounter.fsproj" (target "ResolveLockFileReferences" depends on it): Using "ResolvePackageAssets" task from assembly "/usr/share/dotnet/sdk/5.0.400/Sdks/Microsoft.NET.Sdk/targets/../tools/net5.0/Microsoft.NET.Build.Tasks.dll". Task "ResolvePackageAssets" Package FSharp.Core, version 5.0.0 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions. Done executing task "ResolvePackageAssets" -- FAILED. Done building target "ResolvePackageAssets" in project "WordsHttpCounter.fsproj" -- FAILED. Done building project "WordsHttpCounter.fsproj" -- FAILED. Build FAILED.
@JordanMarr one approach that worked for me was manually writing in the console: dotnet build
.