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

Updated McMaster.Extensions.CommandLineUtils to 3.0.0 #640

Merged
merged 4 commits into from
Feb 4, 2022

Conversation

badbort
Copy link
Contributor

@badbort badbort commented Sep 9, 2021

Updated the command line utils package.

I have done this as my .csx scripts pull a package that references a more recent version of McMaster.Extensions.CommandLineUtils. This causes the script to fail:

FileLoadException:Could not load file or assembly 'McMaster.Extensions.CommandLineUtils, Version=3.0.0.0, Culture=neutral, PublicKeyToken=6f71cb76b82f055d'. Could not find or load a specific file. (0x80131621)
at Microsoft.Extensions.Hosting.HostBuilderExtensions.RunCommandLineApplicationAsync[TApp](IHostBuilder hostBuilder, String[] args, CancellationToken cancellationToken)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Extensions.Hosting.HostBuilderExtensions.RunCommandLineApplicationAsync[TApp](IHostBuilder hostBuilder, String[] args, CancellationToken cancellationToken)
at Indi.UpdateIndex.WebJob.Program.Main(String[] args)

I have tried downgrading the referenced package to 2.2.5 but that version has some issues.

This does highlight an issue where dotnet-script dependencies conflict with the .csx nuget dependencies, however I figure this is a harmless upgrade that allows me to proceed in the short term

@filipw
Copy link
Member

filipw commented Sep 9, 2021

did you try running your script with --isolated-load-context? e.g. dotnet script main.csx --isolated-load-context

Copy link
Member

@filipw filipw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks

@badbort
Copy link
Contributor Author

badbort commented Sep 9, 2021

Ah, I did not notice that option. I'll give that a shot

Cheers

@badbort badbort closed this Sep 9, 2021
@badbort badbort reopened this Sep 9, 2021
@badbort
Copy link
Contributor Author

badbort commented Sep 9, 2021

Sorry not too familiar with completing PRs in github. Do I leave this in your hands now for merging?

@filipw filipw enabled auto-merge February 4, 2022 10:28
@filipw filipw merged commit 114aed0 into dotnet-script:master Feb 4, 2022
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

Successfully merging this pull request may close these issues.

None yet

3 participants