assemblies

Assembly.Load strange behavior

I have "Microsoft.Web.Services2.dll" V2.0.3.0 in my GAC of two machines. I am running this line in both of them: Assembly.Load("Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"); (note the version is 2.0.0.0 and not 2.0.3.0) On one machine this fails (as I would expect). In another it works...

In MonoDevelop, how do I include all assemblies from a package as references?

I want to include all the assemblies in the GtkSharp package. Right now, I have to find every assembly and include it individually. Is there any way to simple include all assemblies in the GtkSharp package? ...

GAC'ing 4.0 assemblies

I have built a dll with VS2010 targeted for framework 4.0. When I try to gac the assembly (either by drag drop the assembly into the GAC folder or by command line using gacutil), it does not give me any error. It says that the assembly was successfully added to the cache. But I am unable to see the assembly in the GAC folder. Wont it sho...

interface not implemented error when signing C# assembly

I've been trying to sign an assembly and getting this error: 'Utils.Connection' does not implement interface member 'Interfaces.IConnection.BugFactory()'. 'Utils.Connection.BugFactory()' cannot implement 'Interfaces.IConnection.BugFactory()' because it does not have the matching return type of 'ThirdPartyLibrary.BugFactory'. That e...

MSBuild - Assemblies differ slightly after each clean+build

Hi, I'm trying to work with an existing home grown implementation of click-once. Currently we manually update the manifest for assemblies that we actually changed. I'm attempting to make it automatic based on a binary comparison of the existing assemblies and the newly built assemblies. Unfortunately, it seems that each time I run cl...

Define a .net reference to always use the latest version of a GAC'd dll?

We have a vendor who is writing an application for us who makes use of a dll I've provided to them. My boss just found out that if we ever need to make a change to one of our dll's we'd have to provide the updated version to the vendor so they could recompile their project. This causes problems because we don't have automated testing a...

reflection to list return types, parameters in C# application from specific namespace

I've been working on an API that encapsulates another, trickier-to-use API. The goal is for my API to not require the user to touch any of the old API by 1) not requiring any parameters of classes in the old API and 2) not returning any instances of classes in the old API. Is there a program, perhaps a Visual Studio plugin, that can an...

One of my projects does not compile unless I am using Debug mode

Hi, I am having difficulties compiling the test project in my .NET solution solution when using any configuration other than "Debug". I am using a third party assembly (Ninject), the assembly is referenced as usual in my project settings. It works fine in Debug mode, but when switching to relase I get this error: Error 13 The type ...

Specifying the location of an assembly to II

My ASP.NET application uses some 3rd assembly. What are my options to make the application load that assembly? Do I have to put it in the GAC? I don't want to modify the machine's PATH env variable... ...

Read embedded file from assembly

Hi I have to pass the path of a config file to a framework method (Gurok SmartInspect). The config file is an embedded resource of the assembly. Currently I read the file from the assembly and store it outside and then pass the pathName. Is there a better / less complicated way to achieve this goal, without copying the file? private...

AppDomain.CreateInstanceAndUnwrap fails if library's name has been changed

Greetings, I have an application that allows users to import libraries (.NET DLLs) they've created, as long as the library conforms to specific guidelines I've given them (use my namespace, decorate methods with my attribute, etc.). I copy each user lib to an internal directory and then load it into its own app domain (so user can unloa...

Load multiple versions of the same dll without putting it in the GAC

Hi, I would like to load two different versions of the same dll within the same process. At the same time I would like to avoid placing any of them in the GAC. Any ideas? Thanks, Krikor ...

VS.NET: Project Refs vs. Assembly Refs

There's some debate here over which is better for referencing our common code base from other projects: by project or by assembly. I'm in favor of referencing the project, especially since we have automated unit tests that prove that the common code does what it needs to. The thought from the other camp is to lock down those projects...

Copy Local = false ignored when I Publish my ASP.NET Web Application

Hello, I have an ASP.NET Web Application that has several references set. I have Copy Local set to False for several of them, but when I Publish my application it copies the .dlls anyway. How can I turn that off for good? The dlls are registered in the GAC on the web server and I want to make sure that those are references instead of ...

Exposing multiple assemblies as single API

Didnt really consider this aspect till I started building my solution... To simplify, my application exposes an API to be used by other applications. The API is conceptually comprised of two parts: "Action" classes, and data type objects. Each of these is in its own project. (I'm not asking now about class design, thats a whole separ...

Is it possible in Silverlight to read assembly manifest without loading the full assembly?

Dear ladies and sirs. Observe the following piece of Silverlight code: foreach (AssemblyPart ap in Deployment.Current.Parts) { var sri = Application.GetResourceStream(new Uri(ap.Source, UriKind.Relative)); var assembly = new AssemblyPart().Load(sri.Stream); // Do something with the assembly. } It iterates over all the assemblie...

Can dependency injection prevent a circular dependency?

Project#1 has some interfaces and classes that project#2 references. Now I want to use the implementation of Project#2 in Project#1 but vs.net complains about a circular dependency. If I was to use dependancy injection in Project#1 and bind to the implementation in Project#2 (since it adheres to the interface contract), will this work ...

Link against non specific version of an assembly ?

I'm getting an error like this in an application, Could not load file or assembly 'MySql.Data, Version=6.2.2.0, Culture=neutral,PublicKeyToken=c5687fc889699c44d' or one of its depedencies. The located assembly's manifest defenition does not match the assembly reference. Which is expected, as this installation happened to...

Is it possible to save a dynamic assembly to disk?

I recently bought Ayende's book Building DSLs in Boo (buy it, read it, it's awesome) but I'm coming up against an implementation problem and I want to see what the generated code looks like. I would normally use reflector to look at the code but in this case the assemblies are dynamic and only in memory. Is there a way to save dynamic ...

ASP.NET - bin Directory vs. Adding Assembly in web.conf

I am relatively new to ASP.NET programming (but not programming in general), and I have been looking through a project that has been handed off to me. Within this project, there is a bin directory which contains a slew of various DLL files. Then, in the web.conf file, inside the assemblies structure (within the XML), there is a slew of...