Error creating WPF projects - visual-studio

I am having a problem with WPF projects. Whenever I try to create a WPF project I am getting the following error:
System.IO.FileLoadException
Could not load file or assembly 'Microsoft.Windows.Design.Interaction, Version=4.3.0.0, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"
Can anyone help me?

Related

Wrong FSharp.Core version looked for in a Xamarin.Forms project

In a Xamarin.Forms project I am getting an error on Windows 8.1 and UWP:
Could not load file or assembly 'FSharp.Core, Version=3.259.3.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
The actual version of F# used throughout the solution is 3.7.4.0:
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile7</TargetFrameworkProfile>
<TargetProfile>netcore</TargetProfile>
<TargetFSharpCoreVersion>3.7.4.0</TargetFSharpCoreVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
There is an F# PCL project and C# platform-specific projects. The error occurs only when using F# libraries from Nuget in the PCL. These packages tend to use:
<TargetFSharpCoreVersion>3.259.3.1</TargetFSharpCoreVersion>
I have tried the following, but they do not change the error:
Putting an app.config file with a binding redirect to 3.7.4.0 in the F# project and/or the build directory
Installing the FSharp.Core Nuget package into all projects
Very grateful for any help.
Edit: in the original question there was an incompatibility between the profile (111) and the intended TargetFSharpCoreVersion (3.7.4.0) which was causing additional issues.

Could not load file or assembly 'System.Web.Http, Version=5.0.0.0 after installing core

After installing ASP.NET web API 2.2 core I'm getting this problem. I'm using visual Studio 2013. I've seen a similar problem in stack but as my problem I can't solve it. If there is any way to solve it please let know.
Could not load file or assembly 'System.Web.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Screenshot here.

Mistaken prism assembly reference in visual studio

I am using prism and I get an exception that: The type 'Microsoft.Practices.Prism.Bootstrapper' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Practices.Prism.Composition, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null'
the problem is that I already have an assembly reference to Microsoft.Practices.Prism.Composition in my project
any help? thanks
It seems Microsoft.Practices.Prism.UnityExtensions need a reference to Microsoft.Practices.Prism.Composition assembly.
Just download Prism 5.0 for WPF, compile the source code of ModularityWithUnity.Desktop.sln at \Source\Quickstarts\Modularity\Desktop\ModularityWithUnity and copy all Prism assemblies from bin\Debug directory and paste it in your app's location.
This fixed my same problem.

Can't find assembly - System.Reactive.Debugger

I have installed visual studio 2010 express and then Reactive Extensions 2.0. When I start my app in debug mode, part of code where reactive extensions is used following exception is thrown:
The assembly with display name 'System.Reactive.Debugger' 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
'System.Reactive.Debugger, Version=2.0.20823.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies
The problem is that nowhere I can find this dll - System.Reactive.Debugger.

'access is denied' error when using VS 2010, VSTO, Excel 2007 for customized ribbon

I'm trying to get a simple ribbon add-in build using VS 2010 and Excel 2007 utilizing VSTO. I've tried both an Excel Worksheet and Excel Add-in with the same results when I launch Excel (listed below).
I have a larger prototype I'm trying to build, but for now I can't get off the ground with customizing the Excel ribbon. Has anyone had any luck with building a simple prototype using VS 2010 and Excel 2007? Did you encounter any Access denied issues when attempting to load in your add-in dll? Let me stress there is nothing fancy here .. just 2 buttons that don't even do anything at this point (excel doesn't even load the dll, so there's no breakpoints, etc).
I have tried using the 'caspol.exe' tool to grant full trust to my dll, this changed nothing. I've made sure the folder where the dll is built to has 'Everyone' privileges. I've tried publishing and installing the add-in, I've also tried just starting it directly from the debugger in VS 2010, same issue over and over again. I am admin on the server.
Thank you.
Jim
Could not load file or assembly 'MyRibbonAddIn, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied.
***** Exception Text *******
System.IO.FileLoadException: Could not load file or assembly 'MyRibbonAddIn, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied.
File name: 'MyRibbonAddIn, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' ---> System.IO.FileLoadException: Could not load file or assembly 'MyRibbonAddIn, Version=1.0.0.0, Culture=neutral' or one of its dependencies. Access is denied.
File name: 'MyRibbonAddIn, Version=1.0.0.0, Culture=neutral'
ARGH! It was our virus scanner. I disabled it and things showed up. So many hours wasted. Hopefully this question helps someone else avoid losing time in their life on something stupid

Resources