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

ScriptHost fails to start with error cannot find : 'Microsoft.AspNetCore.Mvc.Abstractions, Version=2.0.1.0' #181

Closed
pragnagopa opened this issue Mar 21, 2018 · 14 comments

Comments

@pragnagopa
Copy link
Member

Customer reported issue on SO

Reproes with latest version Microsoft.NET.Sdk.Functions 1.0.10

Error:
[3/21/2018 9:59:48 PM] ScriptHost initialization failed
[3/21/2018 9:59:48 PM] System.Private.CoreLib: Could not load file or assembly 'Microsoft.AspNetCore.Mvc.Abstractions, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621). System.Private.CoreLib: Could not load file or assembly 'Microsoft.AspNetCore.Mvc.Abstractions, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

@pragnagopa
Copy link
Member Author

@ahmelsayed - This reproes with 1.0.9 and 1.0.10

@ahmelsayed
Copy link
Contributor

Can you check what runtime version they have?

@pragnagopa
Copy link
Member Author

@soninaren looked into this. VS tooling regressed as it is downloading older version of CLI: 2.0.1-beta instead of 2.0.1-beta-22.
@soninaren will follow up VS team.

@mdekrey
Copy link

mdekrey commented Mar 27, 2018

Is there a workaround for this to run from Visual Studio? For example, can we manually upgrade the CLI in the meantime?

I was able to install and run from command line, following the instructions for the CLI, but it's definitely not ideal as it didn't help in Visual Studio.

@soninaren
Copy link
Member

This has been fixed. Please update the functions extension from Tools -> Extensions -> Updates -> Azure Functions and Web Jobs Tools. The version you are looking for is 15.0.40322.0

@soninaren
Copy link
Member

Please re-open if this still doesn't work for you.

@chriswill
Copy link

chriswill commented Mar 27, 2018

I was the original poster on SO, and I just tried this with the 1.0.11 version of Microsoft.Net.Sdk.Functions and version 15.0.40322.0 of Azure Functions and Web Tools. Still get the error.

The error I receive is:
[3/27/2018 10:09:21 PM] ScriptHost initialization failed [3/27/2018 10:09:21 PM] System.Private.CoreLib: Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621). System.Private.CoreLib: Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

which is somewhat different from what @pragnagopa reported above.

You can see a Github example which shows the error here: https://github.com/chriswill/FunctionDemo.

Version 15.0.40322.0 shows that it was released on March 14. Is that the correct version?

image

cc: @soninaren

@soninaren soninaren reopened this Mar 27, 2018
@soninaren
Copy link
Member

Can you delete the contents of this folder "C:\Users<user>\AppData\Local\Azure.Functions.V2.Cli", rebuild and press F5 to run

@chriswill
Copy link

I did that, re-ran the project and noted that a 2.0.1-beta.22 folder was re-created in the directory.

Unfortunately no change. Still see the error.

@soninaren
Copy link
Member

You need Version:2.0.0 for Microsoft.Extensions.Logging and related packages. Sent a PR showing the fix.

https://github.com/chriswill/FunctionDemo/pull/1

@soninaren
Copy link
Member

@chriswill please re-open if the fix did not work for you.

@chriswill
Copy link

Thanks @soninaren that did work for me. I'm surprised that I won't be able to keep my app updated with current versions, but perhaps when a new version of the functions sdk comes out?

@ede0m
Copy link

ede0m commented Sep 7, 2018

@soninaren are you able to publish the above fix publicly? I am having the same issue with version 15.0.40322.0 running locally.

@OmerRasheed
Copy link

OmerRasheed commented Mar 6, 2019

I am having below issue. I have already installed the specified version but issue not resolved. Please help rectify the issue.

[3/6/2019 6:06:32 AM] Host configuration file read:
[3/6/2019 6:06:32 AM] {}
[3/6/2019 6:06:32 AM] Starting Host (HostId=omerrasheed-686540239, InstanceId=b6d47b71-f91b-4e8e-86ab-ec101eaa47a0, Version=2.0.11651.0, ProcessId=14792, AppDomainId=1, Debug=False, ConsecutiveErrors=0, StartupCount=1, FunctionsExtensionVersion=)
[3/6/2019 6:06:33 AM] A ScriptHost error has occurred
[3/6/2019 6:06:33 AM] System.Private.CoreLib: Could not load file or assembly 'Microsoft.AspNetCore.Mvc.Abstractions, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621). System.Private.CoreLib: Could not load file or assembly 'Microsoft.AspNetCore.Mvc.Abstractions, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

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

7 participants