assemblies

Mixed signed assemblies in 1 VS solution?

Hey, currently I am trying to run a project (Noizwaves.Client) which has a dependency (as a project reference) to a signed class library (Noizwaves.Core). Noizwaves.Core has it's assembly version set to 2.0.*. I have both of these projects within the same VS2008 solution file. Noizwaves.Client is set as the default startup project. All ...

Load WPF styles (static resources) from an external assembly

I have a few WPF applications and I want all my styles to be in a shared assembly instead of declaring them in each application separately. I am looking for a way so I don't have to change all my Style="{StaticResource BlahBlah}" in the existing applications; I just want to add the reference to this style assembly, and delete it from th...

How can you cast objects from different assemblies into each other?

I've run into this apparently not uncommon problem -- I have a interface in Assembly A. I am dynamically loading Assembly B, and trying to cast an object from it into my interface from Assembly A. It's failing with an InvalidCastException. I've come to understand why -- a class in Assembly A and a class in Assembly B, even with the s...

Reflection with Powershell

I have a set of .NET Assemblies (all under the same directory) and some of those contain classes which implement an abstract class. I would like a Powershell script to find all the classes which implement my abstract class, and execute a method on each of them. Does anybody have an idea on how to do this? Thanks! ...

Grant private access attribute

What's the name of the attribute that you apply on an assembly to allow access from another assembly to private methods? Thanks! ...

How to extract an assembly from the GAC?

There is a package I have to deal with which installs assemblies straight into the GAC (e.g. somewhere deep in %windows%/assembly). How do I exorcise the actual assembly (the DLL) from the GAC into the normal file system? Thanks. ...

Referencing a COM assembly in Visual Studio vs converting a COM assembly via tlbimp.exe

When I import a COM assembly (dll) in to a Visual Studio project by adding it as a reference I can use the generated equivalent common language runtime assembly without issue. However if I try and convert the same COM assembly into a common language runtime assembly using tlbimp I run in to all kinds of problems. Is there a way to repl...

Create Your Own .NET Assembly Cache

Hello everyone, In a .net application I am writing, I need to locally cache assemblies from various locations so my application can use them even if the original locations are unavailable. I cannot use the GAC (primarily because I want portability and also because the assemblies might not be signed). Does anyone know of any .net cod...

Unable to deploy new SharePoint site template assembly version

I did a build of my SharePoint site template solution assembly and successfully deployed it to SharePoint, it was version 6.4.0.2032. I did some testing and found a couple problems with my code. I fixed the issues. Uninstalled my solution via "setup.bat /uninstall". Rebuilt my assembly to version 6.4.0.2033. I again installed my new temp...

Using the Web Application version number from an assembly (ASP.NET/C#)

How do I obtain the version number of the calling web application in a referenced assembly? I've tried using System.Reflection.Assembly.GetCallingAssembly().GetName() but it just gives me the dynamically compiled assembly (returning a version number of 0.0.0.0). ...

.Net Web Service Memory Pressure Error

I have a web service I'm trying to use on one of my sites. When I call the web service (which is created in C#) I get an error on several lines where try to execute an SP, which was created as an assembly. This web service works on our development environment but not on live. Our live and dev environments run on the same server, but diff...

Accessing information in the AssemblyInfo.cs using Reflection in a Web Site

I have created a DLL that will gather information from the AssemblyInfo.cs. In the class constructor I am using Reflection to get the top-most application that is running. public class AppInfo() { public AppInfo() { System.Reflection.Assembly assembly = System.Reflection.Assembly.GetEntryAssembly(); ...

Updating the version number of all assemblies in a solution

I've got a rather large solution in Visual Studio. Is there a way to update the Major / Minor version numbers for all the assemblies in the solution in one go? ...

View assembly hash

Hi I have signed my assembly with strong key. I am able to locate public key in assembly manifest using ildasm. I am not able however to locate assembly hash which should be placed in assembly along with the public key. Where can I find computed hash? Kind regards PK ...

How slow is Reflection (C#)

I recently created an interface layer to distinguish the DataAccessProvider from our Business logic layer. With this approach we can change our choice of DataAccessProvider whenever we want by changing the values in the Web/App.Config. (more details can be given if needed). Anyway, to do this we use reflection to accomplish our DataProv...

Why this code is not working while it worked fine for almost a year.

Does automatic software update causes some of the module property not to work? I am really scratching my head over this function that I have posted here. They are basically the same function that reads image logo from the currently executing assembly. Function named "Get2LogoImageStream" is different from "Get1LogoImageStream" by just Cu...

Get Published XBAP version in C#

I have an XBAP currently published on my local machine, which has an 'About' canvas build into the XMAL, of which I want to show the published version number, but I can only seem to get the assembly version number. Any suggestions? ...

How to add resource to existing signed assembly

Hello. Given: - an assembly (e.g. "SomeLib.dll") - a text file (e.g. "myconfig.xml") I need to embed the file myconfig.xml into the existing assembly SomeLib.dll Please consider before pressing "Answer": I know about resources embeding during compile (csc.exe .. /embedresource:file ... ). The thing is that I need to embed a resource ...

Castle ActiveRecord - Command line Assemblies vs. VB.Net Assemblies Problem

Ok, so here is the deal. I have this project called Import.exe. It will look for a file, parse it and use Castle AR to import. This runs great at the command line. Now that same Import.exe needs to be ran from and VB.NET web program after a file Upload. I am using System.Debug.Process.Start to call the exe. The file uploads fine, the p...

Does an assembly maintain its directory structure?

Since all files in a web project are compiled into single assembly, then does this assembly maintain a directory structure? For example, if a file in a root directory references a file in a subdirectory, then how could this reference still be valid when the two files get compiled into same assembly? Assume a web project has the directo...