microsoft / vs-azure-iot-edge-docs

Documentation for Azure IoT Edge Tools for Visual Studio
Creative Commons Attribution 4.0 International
5 stars 6 forks source link

Azure IoT Edge Tools for VS 2019 v2.0.0: Could not load file or assembly Microsoft.VisualStudio.Validation, Version=16.9.0.0 #33

Closed felixmondelo closed 2 years ago

felixmondelo commented 3 years ago

Hi, I've installed v.2.0 and when I launch to debug my modules, I receive the error:

Failed to exec task with error System.Exception: Cannot find executable of Azure IoT Edge simulator, please click menu 'Tools -> Azure IoT Edge Tools -> Update IoT Edge simulator' to reinstall simulator and try again.

(but the executable is on the printed path C:\Users\fmondelo\Documents\Visual Studio 2019\iotedgehubdev\v0.14.9\iotedgehubdev in the log)

When I try to click menu 'Tools -> Azure IoT Edge Tools -> Update IoT Edge simulator' I receive the next error:

image

In the ActivityLog.xml is this error, how I can resolve this:

SetSite failed for package [Tools for creating and debugging Azure IoT Edge Modules]Source: 'Microsoft.VisualStudio.Azure.IoT.Edge.ProjectSystem' Description: Could not load file or assembly 'Microsoft.VisualStudio.Validation, Version=16.9.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) System.IO.FileLoadException: Could not load file or assembly 'Microsoft.VisualStudio.Validation, Version=16.9.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'Microsoft.VisualStudio.Validation, Version=16.9.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at Microsoft.VisualStudio.Azure.IoT.Edge.ProjectSystem.Commands.ToolsEdgeCommandBase.Initialize() at Microsoft.VisualStudio.Azure.IoT.Edge.ProjectSystem.Commands.ToolsEdgeCommandBase..ctor(IoTEdgePackage package) at Microsoft.VisualStudio.Azure.IoT.Edge.ProjectSystem.IoTEdgePackage.<InitializeAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass20_0.<<Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize>b__1>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e) at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck) at Microsoft.VisualStudio.Services.VsTask.GetResult() WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
marianan commented 3 years ago

@felixmondelo thanks for reporting this issue. Which OS and version are you running on?

The error indicates that the Microsoft.VisualStudio.Azure.IoT.Edge.ProjectSystem assembly is failing to load the expected version of Microsoft.VisualStudio.Validation - either some process is holding onto a different version or the installation is corrupted.

Please try these to see if the issue still reproduces with each of these actions:

  1. Close all VS instances on the machine and retry with a new one
  2. Uninstall IoT Edge extension and reinstall it
  3. Downgrade to previous IoT Edge extension version

Let us know how each of these suggestions works out.

marianan commented 2 years ago

Closing the issue as no repro, please reach back if the issue still reproduces with the details above.