Azure-Functions icon indicating copy to clipboard operation
Azure-Functions copied to clipboard

Upgradeing to SDK 1.0.7 causing my Function debug to fail

Open baget opened this issue 8 years ago • 8 comments

Using VS2017 15.2.2

  1. Create a new Azure Function with HTTP Trigger
  2. Run it (F5)
  3. See no error in the Azure function console
  4. Right Click "Manage NuGet Packages"
  5. Upgrade Microsoft.NET.Sdk.Functions from 1.0.6 to 1.0.7"
  6. get the following error
[16/12/2017 20:42:49] ScriptHost initialization failed
[16/12/2017 20:42:49] 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'.

baget avatar Dec 16 '17 20:12 baget

I was able to reproduce this using the 2.0 runtime. The error does not occur in the 1.0 runtime

patricklee2 avatar Dec 19 '17 23:12 patricklee2

I think this is related to https://github.com/Azure/Azure-Functions/issues/625

patricklee2 avatar Dec 19 '17 23:12 patricklee2

i'm used also 2.0

baget avatar Dec 20 '17 05:12 baget

I have similar issue, I upgraded Microsoft.NET.Sdk.Functions to version 1.0.9

and get this ScriptHost initialization failed

[14/03/2018 21:38:46] 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'.

image

It only works if I downgrade to version 1.0.6

TonyHenrique avatar Mar 14 '18 21:03 TonyHenrique

@TonyHenrique I suggest trying the workaround mentioned in #625 @justcla has there been any progress with #625 or this issue?

patricklee2 avatar Mar 14 '18 22:03 patricklee2

Same error here with 1.0.9

piersrobcoleman avatar Mar 20 '18 22:03 piersrobcoleman

Same error here with 1.0.13

TravisLRiffle avatar Apr 25 '18 20:04 TravisLRiffle

@patricklee2 are you in a position to test this against the latest bits (VS tools 2.1.0/CLI 2.0.1-beta.26)? There were updates in this area and this should no longer occur.

I just validated with the steps above and can no longer repro. I'm closing this issue, but please let us know if you continue to experience issues and we'll re-open.

fabiocav avatar May 22 '18 17:05 fabiocav