Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot load assembly #2381

Closed
dandereggK opened this issue Aug 21, 2019 · 5 comments
Closed

Cannot load assembly #2381

dandereggK opened this issue Aug 21, 2019 · 5 comments

Comments

@dandereggK
Copy link

Description

(Could not load file or assembly 'Microsoft.ServiceFabric.Client.Http, Culture=neutral, PublicKeyToken=null'. General Exception (Exception from HRESULT: 0x80131500))

Repro steps

Please provide the steps required to reproduce the problem

  1. Using this paket.dependencies:
    `version 5.216.0
    source https://api.nuget.org/v3/index.json
    framework: netcoreapp2.1

nuget FSharp.Core
nuget Microsoft.ServiceFabric
nuget Microsoft.ServiceFabric.Services
nuget Expecto

group Build
source https://api.nuget.org/v3/index.json
framework: netstandard2.0
generate_load_scripts: true

nuget FSharp.Core 4.6.2
nuget Fake.Core.Target 5.15.0
nuget Fake.Core.Targets
nuget Fake.DotNet.Cli
nuget Fake.IO.FileSystem
nuget Microsoft.ServiceFabric.Client.Http 3.0.0-preview16 

//also produces error at lower version
nuget FSharp.Data
nuget Fake.IO.Zip
nuget TaskBuilder.fs 2.1.0`

  1. Run Build ".fake/fake.exe" -vv build

It appears to reference correctly:
"-r:C:\Users\danderegg\Desktop\Projects\Fake.TurboFabric\packages\build\Microsoft.ServiceFabric.Client.Http\lib\netstandard2.0\Microsoft.ServiceFabric.Client.dll";
"-r:C:\Users\danderegg\Desktop\Projects\Fake.TurboFabric\packages\build\Microsoft.ServiceFabric.Client.Http\lib\netstandard2.0\Microsoft.ServiceFabric.Client.Http.dll";
"-r:C:\Users\danderegg\Desktop\Projects\Fake.TurboFabric\packages\build\Microsoft.ServiceFabric.Client.Http\lib\netstandard2.0\Microsoft.ServiceFabric.Common.dll";

Fails when trying to use:
let connect creds = let sfClient = ServiceFabricClientBuilder() .UseEndpoints(Uri(creds.Endpoint)) .UseX509Security(Func<CancellationToken,Task<SecuritySettings>>(getCreds creds)) .BuildAsync().GetAwaiter().GetResult(); sfClient
at
let client = TurboFabric.connect DemoSettings.Creds

Repo at this commit in the master branch:

musheddev/Fake.TurboFabric@d91c500

Windows
Fake 5.16.0

Questions (because I am not that familiar with fsi or fake runner)

Am I wrong to use netstandard2.0 in paket for fake dependencies?
Could this be related to dotnet/fsharp#6968?

@matthid
Copy link
Member

matthid commented Aug 21, 2019

One problem is source api.nuget.org/v3/index.json which should read source https://api.nuget.org/v3/index.json
Another problem is the generate_load_scripts: true which apparently has an issue (which has been regressed some time ago)

Other than that it should be reasonable to assume it working with netstandard2.0.
Can you try to provide a minimal failing sample? I tried to create one myself but failed. Ideally a single script I can run and which yields the above error.
Otherwise an exact commit and exact steps on how I get this failing on my machine?

Thanks!

@dandereggK
Copy link
Author

It's is not minimal, but checking out on master https://github.com/turbofabric/Fake.TurboFabric.
running the bootstrap.cmd will install paket and fake locally. after running ".paket/paket.exe" install running fake like ".fake/fake.exe" build will succeed with this line https://github.com/turbofabric/Fake.TurboFabric/blob/d91c500e6e08879fad7f7042bacc6da78172b036/build.fsx#L329 commented out and fail with the issue if it is not.

@dandereggK
Copy link
Author

I will try to pull out a repro into a different repo.

@dandereggK
Copy link
Author

@matthid
Copy link
Member

matthid commented Aug 25, 2019

@dandereggK Thanks for the report, should be fixed in the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants