assemblies

How to reference to multiple version assembly

故事扮演 提交于 2019-12-22 01:27:11
问题 I'm developing a Sharepoint application and use .NET AjaxControlToolkit library, we are adding a custom aspx page to the Sharepoint. Sharepoint 2007 run in quirks mode so I've made some modification to the AJAX library to make it behave like it normally should. The problem is, the other team already use AJAX library and it is a different version with mine. This cause conflict because there could be only one dll in the bin folder with the same name. From what I know, .NET should be able to

Single assembly from multiple projects

落爺英雄遲暮 提交于 2019-12-21 16:38:40
问题 In a .net application involving several projects in one solution, I have a project with the namespace set to Company.Product.UI and another one with Company.Product.UI.WebPages. My problem is that two dlls result from building the two projects. How can I have a single dll and still preserve the current solution structure. I use Visual Studio 2008 and C#. 回答1: You will have to either merge the two projects into one project or use a tool like ILMerge to merge the resulting assemblies into a

Conditional Compilation in Referenced Assemblies

▼魔方 西西 提交于 2019-12-21 12:37:17
问题 I'm writing an assembly with some conditionally compiled members in it, e.g.: [Conditional("DEBUG")] public static void Log(string message) { /*...*/ } And using it like so: public void DoStuff() { Log("This will only appear on debug builds"); /* ... Do stuff ... */ } But when I give this assembly to someone to use in their project, I want them to be able to define whether or not DEBUG-conditional members are compiled. If that's not possible (e.g. the methods are just completely removed at

Can a C# .dll assembly contain an entry point?

回眸只為那壹抹淺笑 提交于 2019-12-20 09:56:09
问题 My goal is to create an executable that will start a shadow copied application. The trick is, I want this starter program to have no external dependencies and not have to contain any knowledge about the program it has to start. I also want it to be the only executable in the directory. In other words, I want it to "run" a .dll assembly not an .exe assembly. (I can require that the name of the .dll file being loaded into a new AppDomain be the same everytime, like Main.dll or something like

Can I tell my application to load all assemblies (DLLs) from a specific location?

放肆的年华 提交于 2019-12-20 07:09:14
问题 My application uses a third party SDK which is installed on every machine that has my application, I do not want to add these SDK DLLs in my application deployment because it takes a lot of space. Registering the DLLs in the GAC is not an option for other reasons. Anyway is there a way to tell my application that the required DLLs are available on a specific path? 回答1: Yes, shared files (if for some reason you do not want to put them in GAC) can be deployed, for example, in the Common

Create application domain and load assembly

笑着哭i 提交于 2019-12-20 07:06:28
问题 I want to create an application domain with default permissions and load assembly into the application domain with default privileges and execute the methods inside the assembly. 回答1: You may take a look at the following article on MSDN. Or if you want to construct an instance of some type inside another AppDomain (assuming this type has a default constructor): var domain = AppDomain.CreateDomain("NewAppDomain"); var path = @"C:\work\SomeAssembly.dll"; var t = typeof(SomeType); var instance =

Team Build 2010 - Third Party Assembly References not copying to output folder

无人久伴 提交于 2019-12-20 03:21:43
问题 When I build a solution on my build server it generates a binaries folder and then later on copies these binaries to the final output folder. In my case some of the third party assemblies REFERENCES are correctly copied over while other 3rd part assemblies REFERENCES are not copied over. Take not that my solution projects do not directly reference the assemblies being copied over. This means that everything build fine. But when I run my program it doesn't start since the assemblies it's

ILMerge question

坚强是说给别人听的谎言 提交于 2019-12-20 02:37:11
问题 I'm trying to merge multiple assemblies into one as my 'Proxy' assembly for a WCF service. Currently, users of the Proxy need to reference the assembly containing the data contracts, and also my domain assembly because of my inheritance schemes. I'd like to use ILMerge for this. In particular, the ILMerge-Tasks project looks promising, especially this line from their project home: ILMerge-Tasks Project Home: ...It even includes a post-build event that merges ILMerge and the task dll so that

Why can't I see Microsoft.ReportViewer.WebForms version 10.0.0.0 in “Add Reference…” dialog?

家住魔仙堡 提交于 2019-12-19 19:48:25
问题 I have a VS2008 Reporting Services project (database: SQL Server 2008 RC2). This project has been updated from VS2005/SQL2005. I need to update the Report Viewer control to version 10.0.0.0. But when I install the Redistributable (http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=a941c6b2-64dd-4d03-9ca7-4017a0d164fd), it isn't added to the .NET-tab in the 'Add reference...' dialog! I can see the Microsoft.ReportViewer 8.0.0.0 and Microsoft.ReportViewer 9.0.0.0 in the

Weird behaviour when mixing loading of assemblies using Assembly.LoadFrom and Assembly.Load

百般思念 提交于 2019-12-19 19:22:12
问题 Weird behavior when mixing loading of assemblies using Assembly.LoadFrom and Assembly.Load I have encountered a weird behavior when loading assemblies with Assembly.LoadFrom and later on with Assembly.Load. I am loading an assembly using Assembly.LoadFrom, where the assembly is located in a folder which is not the execution folder. Later on in my test code when I try to load once again this assembly with Assembly.Load, the load fails with a System.IO.FileNotFoundException (“Could not load