I get this error when debugging:
Managed Debugging Assistant 'BindingFailure' : 'The assembly with display name 'WPFToolkit.Aero2' failed to load in the 'Load' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'WPFToolkit.Aero2, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.'
I tried uninstall the Extended WPF Toolkit nuget (3.3.0) and install again. didn't solve.
What am I missing ?
I am using VS Enterprise 2017 version 15.5.7, .NET 4.7.1.
The exception is when I debug Managed debugging assistant on the upper
line of my Xaml.
My references are:
just had the same issue, while using the WPFToolkit.Extended (standalone, old version)
fixed it by removing the reference I had, and installing the nuget you refer to.
my current references look like this:
Note, that I don't reference "WPFToolkit", while you - do.
I would say, try removing the "WPFToolkit" reference, see if it helps.
Related
I have created a new Service Fabric application in Visual Studio 2017 (version 15.7.1) and added a new service using the .Net Core 2.0 Stateful Service template.
When I try to run the service it fails to start correctly and I can see the following exception in the Diagnostic Events:
Description='Replica had multiple failures during open on _Node_0.
API call: IStatefulServiceReplica.ChangeRole(P);
Error =
System.IO.FileNotFoundException (-2147024894)
Could not load file or assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
The system cannot find the file specified.
I fixed this by installing the Nuget package System.ServiceModel.Primitives:
PM> Install-Package System.ServiceModel.Primitives
An answer which may be useful after a Windows 11 update.
In my case, after an update of Windows 11, the application wasn't working because of this error. I had the error Could not load file or assembly System.ServiceModel, version 3.0.0.0.
After long research, I uninstalled the .net framework and re-installed it and it worked.
For this, I used the programs/Uninstall a program/Add remove windows features.
Unchecked all .net framework cases and click on the Okay button.
After the uninstall process, I checked the same cases and click on the Okay button.
Bingo!
The System.ServiceModel.Primitives has what I think is a rather odd bug. If you are using a DLL with a System.ServiceModel.Primatives dependency, then you must also install it as a reference in the project that is using that DLL. If you do not the DLL will not know where to find it and you get the dreaded "could not load file or assembly..."
As Ragtimewilly indicated you can easily add the reference through Nuget.
There may be a better way to do this - but adding it through Nuget will do the trick.
I successfully used VS 2015 (including c++ / c#) in the past and downloaded now the new VS 2017. Building the project, I got several warnings such as:
(1) Severity Code Description Project File Line Suppression State
Warning The referenced component 'Microsoft.Data.Tools.Components'
could not be found.
(2) Severity Code Description Project File Line Suppression State
Warning Could not resolve this reference. Could not locate the
assembly "Microsoft.Data.Tools.Components, Version=15.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a,
processorArchitecture=MSIL". Check to make sure the assembly exists on
disk. If this reference is required by your code, you may get
compilation errors.
(3) Severity Code Description Project File Line Suppression State
Warning Could not resolve this reference. Could not locate the
assembly "Microsoft.Data.Tools.Schema.Sql.UnitTesting,
Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a,
processorArchitecture=MSIL". Check to make sure the assembly exists on
disk. If this reference is required by your code, you may get
compilation errors.
I tried now several options. Actually, the solution explorer shows under references the "Microsoft.Data.Tools.Components". I then changed the .NET target framework from 4.6.1 to 4.5.1 and the reference path to C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\Microsoft\SqlDb\ without no progress.
Maybe, some could help .. many thanks.
Not sure if this would resolve this problem or if Sepp ever found a solution, but this problem sounds similar to one I had upgrading to 2017 on other projects. Adding updated MS Libraries via NuGet has worked for me.
Open NuGet Package Manager and search for Microsoft.Data.Tools to find Microsoft content similar to Microsoft.Data.Tools.Components.
There are two similar entries Microsoft.Data.Tools.UnitTest and Microsoft.Data.Tools.MsBuild
Try adding maybe the Microsoft.Data.Tools.MsBuild or both to your solution and recompile. These libraries sound like they are the same base, and may include the 'Component' content also. A Google found the same issue (i.e. https://social.msdn.microsoft.com/Forums/en-US/09f82922-2fe5-46cc-bc70-b63f137aec28/visual-studio-2017-warning-issues-?forum=vssetup, and the Microsoft.Data.Tools.MsBuild package includes content similar to that mentioned both above and there. The MsBuild states: "You can use SSDT Transact-SQL design capabilities to build, debug, maintain, and refactor databases." - so I'm thinking this may be an update to your older set. If it doesn't work, just unselect them to uninstall.
All of a suddon, I'm getting a FileLoadException when getting an instance of a class from Ninject.
The exact exception is the following:
System.IO.FileLoadException: "Could not load file or assembly 'Quartz, Version=2.3.3.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"
When reading the error message, it seems quite clear that it tries to load an assembly of Quartz with version 2.3.3.0 but the specified version is another... but I don't get why it even loads version 2.3.3.0.
I searched the whole solution (inclusive the .csproj) for Quartz references and every reference states v1.0.1.2.
I've searched the path on the file system for Quartz.dlls but could only find dlls of version 1.0.1.2 so I don't understand why it tries to load 2.3.3.0.
Do you know of any steps I could try to solve this exception?
Thanks in advance
Check the class library that includes Quartz. Make sure that the platform version is consistent. You can do this by right clicking on the project file and selecting properties. Then check the assembly version in the first/top most tab.
Whatever platform version you have in that class library should be consistent with the other projects in the solution.
This happens when you install some other nuget package (like Quartz.Unity) which depends on Quartz. While installing that other package if you select 'lowest' option for dependency then it would set Quartz 2.3.3.0 as dependency. However, you have Quartz 2.4.1 installed in your package. So you get the error.
Solution: While installing that other package select 'highest' option for dependency if you have highest version installed in your project.
Using Visual Studio 2015 RTM, I have a .NET 4.0 class library project.
I've added the Microsoft.CodeAnalysis.FxCopAnalyzers NuGet package to the project. This results in the following Analyzers being listed for the project in Solution Explorer.
Microsoft.AnalyzerPowerPack.Common
Microsoft.AnalyzerPowerPack.CSharp
System.Runtime.Analyzers
System.Runtime.CSharp.Analyzers
System.Runtime.InteropServices.Analyzers
System.Runtime.InteropServices.CSharp.Analyzers
However in the Error List window, the following error appears:
Unable to load Analyzer assembly
C:\Dev\git\MySolution\packages\System.Runtime.Analyzers.1.0.0\analyzers\dotnet\cs\System.Runtime.Analyzers.dll
: Could not load file or assembly 'System.Runtime.Analyzers,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or
one of its dependencies. Strong name validation failed. (Exception
from HRESULT: 0x8013141A)
(and similar for System.Runtime.CSharp.Analyzers and System.Runtime.InteropServices.Analyzers)
The first two analyzers do work correctly, but I'm not getting anything for the last four (probably related to the above errors).
Is there a way to get these to work, or is it possibly related to the project being .NET 4.0?
Thank you for reporting this issue. The System.Runtime.* analyzer assemblies uploaded to nuget are indeed only test-signed, and hence cause the assembly load failures. We are working uploading newer nuget packages for System.Runtime.Analyzers and System.Runtime.InteropServices.Analyzers which will have signed assemblies.
Meanwhile, you can get the non System.Runtime based FXCop analyzers by installing "Microsoft.AnalyzerPowerPack" from here: https://www.nuget.org/packages/Microsoft.AnalyzerPowerPack/. These do contain all signed assemblies and should work fine.
I'll post an update on this thread once we have uploaded signed System.Runtime analyzer packages.
Sorry for the inconvenience and thanks again for reporting it!
Regards,
Manish
I am getting the following WatiN error:
Unhandled Exception: System.IO.FileLoadException: Could not load file
or assembl y 'Interop.SHDocVw, Version=1.1.0.0, Culture=neutral,
PublicKeyToken=db7cfd3acb5 ad44e' or one of its dependencies. The
located assembly's manifest definition do es not match the assembly
reference. (Exception from HRESULT: 0x80131040) File name:
'Interop.SHDocVw, Version=1.1.0.0, Culture=neutral, PublicKeyToken=db
I copied the shDocvw.dll from System32 to the bin directory but still it is giving me the same problems.
If you've installed and referenced WatiN using NuGet in VS2010, you should already have the correct references, so they don't need to be removed and re-added. But you will still need to change the "Embed Interop Types" setting to False on the Interop.SHDocVw reference.
UPDATE: This answer was written before Nuget was released and applies only if you are NOT using Nuget to manage your dependencies. If you are using Nuget see the answer by #Nick Jones
I just had this issue today. You need to download the latest version of WatiN (I'm using 2.0.10.928) and reference the signed Interop.SHDocVw.dll that is provided by WatiN.
Try the follwoing:
Remove all other References to Interop.SHDocVw.dll
Right Click your solution and select 'Clean Solution'
Reference the Interop.SHDocVw.dll that is provided by WatiN
Build your solution.
Hope this helps.
UPDATE: Nick Jones is correct. This should not be an issue if you are using NuGet....but I was also getting this message when using MvcContrib.Mvc3.TestHelper-ci. At first glance it seems like the '-ci' packages is the way to go but I decided to use the MvcContrib.WatiN package for two reasons.
1) I don't get the "Could not load file or assembly" error message
2) The MvcContrib.Mvc3.TestHelper-ci is using an old version of WatiN.Core.dll (1.3.0.4000) where as the MvcContrib.WatiN package is using a newer version (2.0.0.99)
Check out the Properties of the Reference "Interop.SHDocVw.dll". Change the "Embed Interop Types" to False.
The problem is that it is not copying the dll file in your bin folder. But after this setting, it will do it properly.
I had the same error, and now its working fine.