assemblies

SQL CLR Assembly Error 80131051 when late binding to a registered C# COM .dll

I must have hit an unusual one, because I can't find any reference to this specific failing anywhere... Scenario: I have a legacy SQL function used to transform(encrypt) data. This function is called from within many stored procedures used by multiple applications. I say this, because the obvious answer of 'just call it from your cod...

Add File version, Product Version to the Existing Assemblies

I have some set of assemblies. I have disassemble those assemblies using the ISDASM.exe and change the namespace in the IL code and again compile those IL code using the ISASM.exe to get the assemblies without any error. Here my question is after disassemble and assemble those assemblies product version, File version and the copyright i...

How to pre-load all deployed assemblies for an AppDomain

Given an App Domain, there are many different locations that Fusion (the .Net assembly loader) will probe for a given assembly. Obviously, we take this functionality for granted and, since the probing appears to be embedded within the .Net runtime (Assembly._nLoad internal method seems to be the entry-point when Reflect-Loading - and I ...

How to change the assemblyIdentity of an executable?

I want to hide the tool I used to create an .exe file. I am not doing anything illegal, I just want to protect my intellectual property from being copied. If I open the exe file in a text editor I see the following section. <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifes...

How to get at ResourceDictionary style when it is loaded from external xap and assemblies are MEF-fed?

I've got the following setup: The main application loads a XAP with an IPlugin implementation. The Plugin contains a 'DisplayPanel' that contains a referenced Control with other controls. The DisplayPanel here is simply a container control to show referenced Control. This referenced Control, from an assembly, uses a Style from a Resourc...

Create an assembly in memory

I'd like to create an assembly in memory, using an using the classes in Reflection.Emit Currently, I can create the assembly and get it's bytes using something like AssemblyBuilder builder = AppDomain.CurrentDomain.DefineDynamicAssembly(..., AssemblyBuilderAccess.Save); ... create the assembly ... builder.Save(targetFileNam...

How to organize code using an optional assembly reference?

I am working on a project and want to optionally use an assembly if available. This assembly is only available on WS 2008 R2, and my ideal product whould be a common binary for both computers with and without the assembly. However, I'm primarily developing on a Windows 7 machine, where I cannot install the assembly. How can I organize my...

Assembly version from command line ?

Does it exist a ms tool to get the assembly version of a dll from a command line ? (I know that I can code my own tool) ...

Can I set a <probing> privatePath in ~/subdir/web.config without access to the root application .config?

Can I set <probing> privatePath in the web.config located in a subdir of the root webapp? The subdir is not a virtual directory. In other words, can a webapp in ~/subdir reference a private assembly in the ~/subdir/bin folder? According to the Microsoft documentation, it seems like this is possible in my environment, but I can't get i...

Referencing a different project in the same assembly, different namespaces

I have two projects : Menu and Module and they are both in the same namespace foobar. I am currently referencing the module project from the Menu project to open up certain controls on a tab control in my menu. However I need to launch a new control from one of my controls which is located in the Module project. When I try referencing ...

How to resolve conflicting assemblies in .Net?

In my web application I am using NHibernate.dll. This has a dependency on folowing assembly. 'Antlr3.Runtime, Version=3.1.0.39271, Culture=neutral, PublicKeyToken=3a9cab8f8d22bfb7' Now in the same project for another requirement I have to introduce Antlr3.StringTemplate.dll. Which has a dependency on another version of the abov...

Is there any way to consume .NET 4.0 assemblies in Silverlight

Silverlight can only recognize its v2.0.5.0 assemblies. The way to consume .NET 2.x/3.x assemblies in Silverlight truly exists. If I want to call, such as the method of Json class provided by System.Runtime.Serialization assembly, which is just in .NET 4.0, not in Silverlight v2.0.5.0, what can I do? Can I only consume the class and me...

Gacutil.exe successfully adds assembly, but assembly not viewable in explorer. Why?

I'm running GacUtil.exe from within Visual Studio Command Prompt 2010 to register a dll (CatalogPromotion.dll) to the GAC. After running the utility, it says Assembly Successfully added to the cache, and running gacutil /l CatalogPromotionDll shows that the GAC contains the assembly, but I can't see the assembly when I navigate to C:\WIN...

Context problem while loading Assemblies via Structuremap

I want to load plugins in a smiliar way as shown here however the loaded assemblies seem not to share the same context. Trying to solve the problem I just build a tiny spike containing two assemblies. One console app and one library. The console app contains the IPlugin interface and has no references to the Plugin dll. I am scanning t...

Where does VS 2010 Tools' gacutil.exe install assemblies?

I used the Visual Studio 2010 Command Prompt's gacutil.exe to install an assembly. I expected the assembly to be added to C:\WINDOWS\assemblies, but it was instead added to C:\WINDOWS\Microsoft.NET\assembly\GAC_MSIL and is not showing up in C:\WINDOWS\assemblies. Is this a problem and should I be concerned that it's not showing up ther...

Executing a .NET Managed Assembly from SQL Server 2008 - Pro's, Con's & Recommendations

Hi guys, looking for opinions/recommendations/links for the following scenario im currently facing. The Platform: .NET 4.0 Web Application SQL Server 2008 The Task: Overhaul a component of the system that performs (fairly) complex mathematical operations based on a specific user activity, and updates numerous tables in the databas...

Does order matter when registering, gac-ing assemblies for COM interop?

When registering .NET assemblies for COM Interop, I do two things, currently in this order: regasm /tlb:MyDll.tlb Mydll.dll gacutil /i Mydll.dll I use regasm to register the type library for COM and gacutil to install the assembly into the GAC. Does it matter which order I do these two actions? Also, as I make updates to my dll, do...

Do I need to force the GAC to reload an assembly? Is this possible?

I've added types to my .NET classes that I'm using for COM interop. To get it to work with my VB6 application, I unregistered the DLL and re-registered it (using regasm). I then uninstalled and reinstalled it to the GAC (using gacutil). The types are showing up in the VB6 object explorer, but when I run the application in the VB6 IDE,...

What is [assembly: InternalsVisibleTo("MyAssembly")]? A statement, directive, ...?

Hi. Sorry about the vocabulary question but I can't find this anywhere: how do you call this below? [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("MyAssembly")] Is it a statement, a directive, ... ? I want to indicate that you have to insert that line in order to give MyAssembly access to your assembly's internal membe...

Run time behavior of .NET referenced assembly not existing.

Microsoft .NET Framework Assembly A Assembly B Contains Class C - References Assembly A Contains Class D - Does not reference Assembly A, Does not reference Class C Questions: During runtime if Assembly A DLL does not exist, will Class D be able to execute successfully? Where as Class C will fail with a reference error? ...