Skip to content

FSI packaged with 3.0.100-preview3-010431 throws "Could not load file or assembly" exception while executing Hopac job.  #6337

Closed

Description

@HoraceGonzalez

This may be a dupe/known-issue, but I thought I'd report it anyway just in case. Also, I'm not sure if it's a symptom of a broader assembly resolution issue or just a problem with the Hopac library.

Repro steps

  1. Create a new console project using the sdk as follows:
dotnet new console -lang F#
dotnet add package Hopac -v 0.4.1 -f netstandard2.0 --package-directory packages
  1. Create a new *.fsx script with the following contents:
#r "packages/hopac/0.4.1/lib/netstandard2.0/Hopac.Core.dll"
#r "packages/hopac/0.4.1/lib/netstandard2.0/Hopac.Platform.dll"
#r "packages/hopac/0.4.1/lib/netstandard2.0/Hopac.dll"

Hopac.Job.unit()
  1. Execute the script using FSI.

Expected behavior

FSI exits normally.

Actual behavior

The following runtime exception occurs:

System.IO.FileNotFoundException: Could not load file or assembly 'Hopac.Platform, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

File name: 'Hopac.Platform, Culture=neutral, PublicKeyToken=null'
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, IntPtr ptrLoadContextBinder)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, IntPtr ptrLoadContextBinder)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   at Hopac.Core.StaticData.Init() in /Users/h/dev/logibit/Hopac/Libs/Hopac.Core/Engine/StaticData.cs:line 63
   at <StartupCode$FSI_0001>.$FSI_0001.main@()


Stopped due to error

Related Information

Here's my dotnet --info:

> dotnet --info                                                                                                                                                               
.NET Core SDK (reflecting any global.json):
 Version:   3.0.100-preview3-010431
 Commit:    d72abce213

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  18.04
 OS Platform: Linux
 RID:         ubuntu.18.04-x64
 Base Path:   /home/tracy/.dotnet/sdk/3.0.100-preview3-010431/

Host (useful for support):
  Version: 3.0.0-preview3-27503-5
  Commit:  3844df9537

.NET Core SDKs installed:
  2.1.300 [/home/tracy/.dotnet/sdk]
  2.1.402 [/home/tracy/.dotnet/sdk]
  2.1.503 [/home/tracy/.dotnet/sdk]
  3.0.100-preview3-010431 [/home/tracy/.dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.0 [/home/tracy/.dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.4 [/home/tracy/.dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.7 [/home/tracy/.dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.0 [/home/tracy/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.4 [/home/tracy/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.7 [/home/tracy/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview3-19153-02 [/home/tracy/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.0 [/home/tracy/.dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.4 [/home/tracy/.dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.7 [/home/tracy/.dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.0-preview3-27503-5 [/home/tracy/.dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

Activity

  1. added this to the Core 3.0 milestone on Mar 19, 2019
  2. HoraceGonzalez commented on Apr 21, 2019

    @HoraceGonzalez
    Author

    @KevinRansom (cc @cartermp): I tested this locally on 3.0.100-preview4-011223 and wasn't able to reproduce. I think it was fixed somehow. Hooray!

  3. cartermp commented on Apr 22, 2019

    @cartermp
    Contributor

    @HoraceGonzalez I believe this is due to #6324. Thanks for confirming it's fixed!

  4. modified the milestones: .NET Core 3.0, 16.3 on Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions