assemblies

How I do add this function to console app.

Hello, I have loaded an assembly called 'Mscorlib.dll' and i wanted it to list all classes within the 'Mscorlib', which it does(using reflection). Now I want to add a function whereby the user inputs a class from the assembly and it gets all the methods from that class. How would i go around doing this? Any help would be nice ...

Pros/Cons of using an assembly as a license file?

I was initially going to use a signed serialized xml file to store license details. In planning, more and more has moved into this "license file" which will allow for us to distribute a single application and control available functions via the supplied license file. The UI and printed reports are co-branded with distributors logos, so...

Is it possible to get the contents of a loaded .net assembly as a byte array or stream?

Is it possible to get the contents of a loaded .net assembly as a byte array or stream? What I'm trying to do is something similar to (of course the real scenario is much more complex, so just storing the buffer is not an option). byte[] bytes = GetTheBytes(); Assembly asm = Assembly.Load(bytes); byte[] bytes2 = GetAssemblyAsByteArray(...

How to increment automatically the version of an assembly if there are changes on the code?

Hello, there is a way of incrementing the version number of an assembly automatically if the assembly has changed after doing a build of the solution? I've tried with post-build events but then you increment the version on each build, not only if the build process has compiled anything due to changes. Thanks in advance. EDIT: What I ...

How do I add an assembly to a Visual Studio project and reference it?

I've compiled an assembly for MySql.Data.dll and would like to add it to a new Visual Studio Project. I'm lost on the correct terminology and how best to go about this, but the end goal is to distribute this dll so that it's included with the application when the application runs. This is to avoid having to GAC the dll on the end user'...

How to load assemblies at runtime: winForms vs. web service

I use the following code to load up types from assemblies annotated with my SearchableAssemblyAttribute. The goal is to be able to load my own assemblies in addition to any 3rd party assemblies. Following this example I get the path from the GetExecutingAssembly().Location. For a web service however this will be a temp directory that co...

Strong named assemblies in winforms .net

Ok, I've read every question on here about strong named assemblies and just want to clarify something. First though, from what I've read, GAC aside, strong named assemblies prevent a malicious 3rd party changing and impersonating your code. It'd be great to have some links to some real world examples of this kind of spoofing that happen...

Where to place the pre-generated serialization assembly?

I am trying to speed up the start-up of my Click-Once (.net 2.0 in VS2008) app by shipping the pre-generated XML serialization assemblies. So to test my scenario, I set VS2008 to break when an exception is thrown. Even though, the XML Serialization assemblies are there, there is still an exception, saying that it can't find or load t...

Wix - ComPlusAssembly - Could not install type library

Hi, I'm new to Wix and I have ran into a problem that I'm obviously not able to solve on my own, so any help will be very much appreciated. Quick background: I'm representing a software vendor building a comprehensive suite of SOA based applications for deployment in large enterprises. Our architecture consists of many layers which ma...

How to reference WPF style keys defined in a separate assembly in another library

I have two libraries and a single application assembly project layout and I'm wondering how can I reference styles by their key in one of my libraries that's defined in the other. My solution layout: WpfControls.dll - Holds generic reusable controls such as a WPF based NumericUpDown control as well as other basic controls and some st...

How to check if an assembly was built using Debug or Release configuration?

I'm starting deployment of my web application and I need to guarantee that all the assemblies that are going to be deployed were built using Release configuration. Our system was developed using C#/.Net 3.5. Is there any way to achieve this? ...

Correct way to distribute VC++ runtime files

I have an MFC application which I am trying to package for deployment. It seems to depend on the files 'msvcr90.dll', 'msvcp90.dll' and 'mfc90.dll'. What is the correct way to distribute these files? I can't use merge modules as my installer doesn't support them. I know I can run VCRedist_x86.exe, but I don't want to do this for various...

"Reference required" error when referencing NServiceBus assembly from another project

We are trying to write an application that uses the NServiceBus library in a VB.NET environment. We've been stymied by errors similar to the following: Reference required to assembly 'NServiceBus, Version=2.0.0.1071, Culture=neutral, PublicKeyToken=9fc386479f8a226c' containing the implemented interface 'NServiceBus.IMessageHandler`1'...

Mono - Could not load file or assembly

Hi, i just exported my project to my new imac an loaded my solution into monodevelop. After the successfully compilation i started the project, and i always getting the same error. ** (/Library/Frameworks/Mono.framework/Versions/2.6.1/lib/mono/2.0/xsp2.exe:1576): WARNING **: The following assembly referenced from /private/var/folders...

Where are assemblies in .NET physically located?

I am a little confused about where .NET assemblies are physically located. Take good old Linq. In my web.config file it says: <add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> This is the reference to Linq. But where exactly is the DLL this refers to located? There's no path in the a...

Adding an assembly reference in a website project (VS2005) and storing it in subversion

I have an assembly I need to reference in a website project in Visual Studio 2005. I have in the solution a folder called Assemblies in which all third-party assemblies reside. I can right click the website project in the Solution Explorer and select "Add Reference..." and navigate to the assemblies folder to get the assembly. Once I do ...

How add a jquery webresource not in a webcontrol/servercontrol context

My situation is this: I have created a utility class on my solution that uses a method that uses jquery registered code to setfocus on a control. The problem: Using WebResources in a class thats is not a control simply dont work, i endup getting a empty script source references... something like this(script src="/WebSite/WebResource.a...

TFS build problem: missing assembly in test output folder

Hi all, I am trying to integrate unit test cases with a TFS build in our new solution. I've include the following configuration line in my TFSBuild.proj <ItemGroup> <TestContainer Include="$(OutDir)\%2aTest.dll" /> </ItemGroup> Which I think is the correct configuration since I only have 1 test project. However, when I do this, ...

AssemblyInfo.cs for WebSite in Visual Studio 2005

I am using WebSite project in Visual Studio 2005. I don't see any AssemblyInfo.cs created for a WebSite project. Can I manually create AssemblyInfo.cs in a Properties folder there or is there any better way? Its an existing project so I can't change it now. I am maintaining this WebSite project and want to add log4Net using PostSharp. ...

using microsoft enterprise library in .net dll to be called from COM application

I created a c++ .net dll, in which I need to implement logging. I decided to go with Microsoft Enterprise Library's Logging. Now, I am calling this dll from a COM application (I created a .tlb from the dll to use in the COM application), and the error I am getting is this: Could not load file or assembly 'Microsoft.Practices.Enterpris...