assemblies

Conditional Compilation in Referenced Assemblies

为君一笑 提交于 2019-12-04 07:22:22
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 compile-time), then is there any way to package multiple 'configurations' of an assembly (e.g. maybe with

Can't add .NET 4.0 Assembly Reference In MonoDevelop 2.4.1

丶灬走出姿态 提交于 2019-12-04 06:42:13
I've installed MonoDevelop 2.4.1 With Mono 2.8.1. My trouble is that i can't add assembly reference to assembly compiled for .NET 4.0 (on same MonoDevelop IDE). What am i do. References -> Edit References -> .NET Assembly -> Browse to file & select it Than MD displays an error that an assembly that i'm trying to add isn't .NET assembly. I've set profile to .NET 4.0 everywhere. Reflector disassembles my assembly fine so it's ok. My OS is Windows 7 What's wrong? UPD: Posted a bug to Novell. Here it is https://bugzilla.novell.com/show_bug.cgi?id=659894 When i do "C:\Program Files\Mono-2.8.1\bin

What assemblies do need to add/change to deploy silverlight web application to Windows Azure [Error]?

守給你的承諾、 提交于 2019-12-04 06:34:19
问题 I have a silverlight based application consisting of charts using silverlight toolkit and connected to database using RIA Services (Domain Service class, ADO.NET entity model). I want to deploy it to my windows azure account online. I recently encountered Instance 1 of role Website is busy Instance 1 of role Website is cycling I encountered this issue again and again. Note : My Windows Azure SDK is updated and I already deployed a MVC based application. This SOF answer guides that i should

Correct way to distribute VC++ runtime files

≯℡__Kan透↙ 提交于 2019-12-04 05:11:54
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 reasons. As far as I can see my only alternative is to install the files as Private Side-by-Side assemblies. Is this correct? According to http://msdn.microsoft.com/en-us/library/ms235317(VS.80).aspx the correct way to install a private assembly is to copy the

clr.sll!StrongNameSignatureVerification CPU consumption

强颜欢笑 提交于 2019-12-04 03:35:38
I have a C# (.NET 4.0) WinForm application that continuously communicates to a Linux based application, receives some data from it few times a second. I have been fine-tuning this WinForm application to reduce it's high CPU use when I saw ' clr.sll!StrongNameSignatureVerification ' is consuming a lot of CPU for this application. I used Process Explorer to find this out. Some Google searching told me that 'clr.sll!StrongNameSignatureVerification' is kicking-in because CLR is trying to verify whether this is a strongly named assembly (which I don't want CLR to). After my further research on this

Getting Runtime Assemblies in Silverlight 3

谁说我不能喝 提交于 2019-12-04 03:31:14
问题 I am currently writing a framework dll which has an AssemblyHelper. This helper stores Runtime and UserAdded assemblies to easily instantiate new objects. The .NET part of the framework uses: AppDomain MyDomain = AppDomain.CurrentDomain; Assembly[] AssembliesLoaded = MyDomain.GetAssemblies(); _runtimeAssemblies = AssembliesLoaded; This gets me all the assemblies I need. But the problem is I can't use this with Silverlight and I have no idea what to use now. Currently I am using: Assembly[]

Automatically embed multiple icons in a .NET Executable

旧巷老猫 提交于 2019-12-04 03:29:58
问题 I basically have the same issue as this question: Embed multiple icons in WPF EXE My .NET 2.0 WinForms application currently has this when you click "Change Icon" in explorer: (source: richard-slater.co.uk) What I would like to see, and with some hacking about as suggested by the above article I get this: (source: richard-slater.co.uk) However the process of getting there all of the version information for the assembly is lost. I need to maintain the Version Information in the assembly as my

StructureMap and scanning assemblies

强颜欢笑 提交于 2019-12-04 03:12:00
So, I have a .NET solution that uses StructureMap, and I'd like to have StructureMap read an outside assembly that implements an interface from a project in that solution and defines the registry entry for it. StructreMap configuration for my solution: ObjectFactory.Initialize(registry => { registry.Scan(assembly => { assembly.TheCallingAssembly(); //Telling StructureMap to sweep a folder called "extensions" directly //underneath the application root folder for any assemblies found in that folder assembly.AssembliesFromPath("extensions", addedAssembly => addedAssembly.GetName().Name.ToLower()

Best practices for merging assemblies?

血红的双手。 提交于 2019-12-04 02:55:36
I am wondering what are the heuristics when creating releases of libraries to be included in other projects in relation to dependencies and if I should include them or not. My problem is the following: I have a CommonUtilities library that provides as the name implies a set of utilities that can be used in more than one place. Dependencies of CommonUtilities include log4net.dll (the logging framework) and Oracle.DataAccess.dll (database driver). I have another project called MyProject that I want to include CommonUtilities in. MyProject also depends on Oracle.DataAccess. If I use ILMerge and

How can I troubleshoot : System.TypeLoadException?

限于喜欢 提交于 2019-12-04 02:54:04
问题 Can you show me a way to troubleshoot System.TypeLoadException ? I am having this exception for an existing project in my solution which I reference from a unit test project in the same solution. This exeption is thrown when I run my unit tests. They fail because of this exception: Details: Test method MyErrorHandler.Test.MyTest.Parse_RecievesValidMessage_ReturnsArray threw exception: System.TypeLoadException: Could not load type 'MyTestNameSpace' from assembly 'MyTestAssemblyName.Test,