assemblies

Using Precompiled .NET Assembly DLL in Mono?

别等时光非礼了梦想. 提交于 2019-11-30 06:50:43
We're currently testing Mono to see if our .NET DLLs will work for customers on Linux. Our DLLs provide components for Windows Forms. I placed the DLLs in the Debug directory, added the references, and created a class deriving from a Windows Form. The class had run fine standalone, but after I added the DLL references and created one of our components (the intellisense worked fine), it compiles but will not run: ** (/home/aldwin/testMonoWF/testMonoWF/bin/Debug/testMonoWF.exe:26905): WARNING **: Could not load file or assembly 'OUR.ASSEMBLY, Version=1.0.0.1, Culture=neutral, PublicKeyToken

Why would System.Type.GetType(“Xyz”) return null if typeof(Xyz) exists?

落花浮王杯 提交于 2019-11-30 06:45:47
I have come across a strange behaviour in my (huge) .NET 4 project. At some point in the code, I am referring to a fully qualified type, say: System.Type type = typeof (Foo.Bar.Xyz); later on, I do this: System.Type type = System.Type.GetType ("Foo.Bar.Xyz"); and I get back null . I cannot make sense of why this is happening, because my type name is correct, and I have checked with other types and they get resolved properly. Moreover, the following LINQ query finds the type: var types = from assembly in System.AppDomain.CurrentDomain.GetAssemblies () from assemblyType in assembly.GetTypes ()

Is it possible to Load an assembly from the GAC without the FullName?

浪子不回头ぞ 提交于 2019-11-30 06:25:11
问题 I know how to load an assembly from a filename, and also from the GAC. As My .msi file will put a dll project into the GAC, I'm wondering if it's possible to load it from the GAC unknowing the FullName (I mean just with the assembly name, or even the dll filename), because I have to Load this assembly from another project. 回答1: Here is a piece of code that allows to do this, and an exemple: string path = GetAssemblyPath("System.DirectoryServices"); Assembly.LoadFrom(path); Note if you need a

Updating the version number of all assemblies in a solution

自古美人都是妖i 提交于 2019-11-30 06:24:56
问题 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? 回答1: You can share an AssemblyInfo.cs file between all projects in the solution. This shared file should contain the version numbers. To share it, you must use Add Existing File in VS and select Add as Link in the file dialog. Every project has its private and the shared AssemblyInfo.cs. The private one still contains the non-Version

How can I list all registered assemblies in GAC?

十年热恋 提交于 2019-11-30 05:34:48
How can I list all the assemblies that are in the GAC? Do I need a tool that makes it easy to view them? dexter You can use gacutil provided with Visual Studio for that. Simply open the Developer Command Prompt (available in Start Menu>App>Visual Studio) and run the following command: gacutil -l >yourassemblies.txt Gacutil is also available as a separate download if you don't have/want Visual Studio. If you need the output in text-form, you can use gacutil /l . If you need to get that list from inside, say, an installer or other tool of your own, you might want to look into the APIs to query

Restrict access to .NET assembly?

旧时模样 提交于 2019-11-30 05:22:25
Is there a way to have a .NET assembly accessible for only authorized sources? I mean I want to have a DLL that contains components, but I don't want anyone to be able to use these components but the other DLLs EXEs in my solution. I do want them to be in separated DLLs though. Restriction on namespace might also be a good idea if this feature exists out there. Is there a way? You can create internal classes. And the give your specified assemblies to access these classes by using InternalsVisibleTo attribute. The assembly should be strong named. You can find more information about the

Does using assembly compiled in older version of .NET framework affects whole performance?

拜拜、爱过 提交于 2019-11-30 05:10:17
Lets imagine that we have two assemblies: Foo.Logic (compiled on .NET 2.0 framework) Foo.Application (compiled on .NET 4.0 framework) that have reference and uses compiled Foo.Logic. Does it have impact on Foo.Application performance (or have any other drawbacks)? In the situation you described in the question, everything will Just Work™ without any problems. A .NET 4.0 application will load a .NET 2.0 library directly into the .NET 4.0 runtime environment. It will not use side-by-side execution unless you explicitly ask it to. There's a lot of misinformation or unclear statements made about

C# assemblies, whats in an assembly?

删除回忆录丶 提交于 2019-11-30 04:54:37
I'm trying to understand the internal access modifier in C#. I can't seem to understand what an assembly is exactly, and what part of my program is held inside that assembly. I was trying to make it so that a variable is accessibly only by objects within the following namespace: namespace Engine.Entity The variable in question is defined in a class inside of that namespace, so I assumed if I made it internal, only objects inside of that namespace have access to it. I am seeing assemblies and namespaces as one, and I don't think that's right. Namespaces affect name resolution only. Namespaces

Could not load file or assembly Microsoft.ServiceModel.DomainServices.Hosting

梦想与她 提交于 2019-11-30 04:52:22
问题 I have an application loaded in my local environment. This is a codebase that I have inherited and have not gotten it to work at all. At this time, when I navigate to "http://test.myapp.com:75/" in my browser, I receive the following error: Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: Could not load file or

ASP.Net cannot create/shadow copy

限于喜欢 提交于 2019-11-30 04:41:07
I get this error repeatedly when developing ASP.Net applications: Cannot create/shadow copy 'XXXXX' when that file already exists Where XXXXX is a random DLL. Typically the DLL is one of the DLLs from Microsoft's Enterprise Library, but it varies. It's really random, and it's very frustrating. I will go hours without getting the error, and then get this error every 10-20 minutes. I've seen several solutions. For instance, this question . I've tried using Clean Solution option, and I've also simply restarted my local IIS. However, it still occurs at the same random but persistent frequency. I