Questions tagged [assembly-resolution]

229 questions
2
votes
1 answer

Assembly reference version numbers are confusing. Lastest verison is 3.2.3.0, so why do all references say 3.0.0.0?

VS Project Assembly Reference Inconsistency I have System.Web.WebPages.Razor.dll version 3.2.3.0 installed via NuGet. When I open References in VisualStudio project explorer and look at the properties window for that reference, it says version…
Triynko
  • 18,766
  • 21
  • 107
  • 173
2
votes
2 answers

Problems with AssemblyResolve event on created AppDomain

I am trying to customize the assembly resolution process by wrapping the AppDomain and its AssemblyResolve event inside a class. The simplified version of my ClassLoader is below. The problem I am having is that when the event AssemblyResolve is…
user379898
  • 63
  • 2
  • 5
2
votes
1 answer

Proper dependency loading for plug-ins using Assembly.Load, Assembly.LoadFile

I am working on a plug-in based framework that allows plug-ins to exchange data between one another based on some contract (interface). Currently, a Windows Service can load the plug-ins in two ways: In the same AppDomain as the Windows Service…
remarkpk
  • 21
  • 3
2
votes
1 answer

Looking for strategy to resolve: Could not load file or assembly

I have an issue with the following error: "Could not load file or assembly". The error speaks for itself: Micorsoft.Owin version 2.0.0.0 fails to load in System.Web.Http.Owin. But I want to use Microsoft.Owin 3.0.0.0 and the dll of…
Sjoerd222888
  • 3,228
  • 3
  • 31
  • 64
2
votes
1 answer

Visual Studio Winforms App Cannot See Reference on Build/Rebuild

This should be a simple one... but it confounds me. I am trying to test a third-party assembly using a very simple winforms app. I add a reference to it in the project. I then add an Imports (this is VB.Net) statement. I continue on to call a…
2
votes
0 answers

Hosted CLR: how to set base directory of default AppDomain?

If I host CLR in my C++ executable, is there any way to set base directory of default AppDomain to something other than location of the executable? Here's why I need it. I have a rather complex application that loads .NET plugins using a plugin…
Ivan Krivyakov
  • 1,898
  • 1
  • 17
  • 27
2
votes
1 answer

Runtime loading of private assemblies in a subdirectory

I have been trying to load a private assembly which is located in a subdirectory under the application base directory. I have an assembly named Sparrow.dll which is located under plugins directory (which is under application base dir also). Whenever…
Deniz
  • 858
  • 10
  • 31
2
votes
2 answers

Adding assembly reference requires base assembly to be referenced as well

I created a assembly having a child class that derives from a parent defined in another assembly. When I add reference to the child, Visula studio also requires reference to be added to the parent. Why is it so and how can I prevent it without…
Mrchief
  • 75,126
  • 20
  • 142
  • 189
2
votes
0 answers

Differentiating assemblies by publicKeyToken alone

Consider the following scenario: A NuGet package contains two versions of an assembly, one for .NET 3.5 (in lib/net35) and one for .NET 4.0 (in lib/net40). Both are named SomeInterfaces.dll and have version 1.0.0.0, but the strong names for the two…
2
votes
3 answers

Why do I get assembly bind failure in IIS CGI program

I have a C# program that is running as a CGI app in IIS on XP Pro SP3. It runs fine until I reference a library assembly class and use it in the program's code. If I run the CGI program by hand it loads and executes. But when it is run by IIS the…
Bob Denny
  • 1,306
  • 1
  • 11
  • 18
2
votes
1 answer

Reference assembly version mismatch

I am trying to do a demo for Fusion Log Viewer, wanting to view the Assembly Bind Logs in a custom directory. I just created a small demo application for this as follows: A small class library project containing just one method GetString() and set…
user3492844
2
votes
0 answers

Unable to load assembly. Ensure that the file is a valid .Net Framework assembly

I have an issue in Microsoft Visual Studio 2008 developing a Smart Device Solution with .NET CF 3.5. The main project is Smart Device Application Project (normal executable for smart devices - WinCE). This project is referenced to…
hellboy
  • 1,567
  • 6
  • 21
  • 54
2
votes
2 answers

StackOverflowException in PowerShell when tab-completion/Intellisense is invoked

I'm writing a PowerShell module, in PowerShell, which has to redirect an assembly binding. I had no problems using a bindingRedirect in powershell_ise.exe.config but I don't think this is acceptable for a module I want to distribute, so I looked for…
2
votes
2 answers

Monogame template crashes on launch with System.TypeInitializationException

Attempting to run this program on Windows #region Using Statements using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Storage; using…
Gigimoi
  • 125
  • 2
  • 11
2
votes
1 answer

Loading other .NET libraries from a C++/CLI library called by native code

So I have three parts: Lib: A C# library, compiled for AnyCPU. BridgeLib: A C++/CLI library, compiled for x86. It exports a native C function called bridgeEntry and calls methods in Lib. NativeExe: A native C++ Win32 application that simply loads…
main--
  • 3,873
  • 1
  • 16
  • 37