assemblies

Get Assemblies Without Instantiating Them

假如想象 提交于 2019-12-10 17:35:26
问题 I am trying to get all assemblies in CurrentDomain using AppDomain.CurrentDomain.GetAssemblies() to write their FullName into a DropDownList , however if I don't instantiate them, they are not seen in returned array from GetAssemblies() in CurrentDomain . They are all added as Reference and in Reference folder of the solution. Only time I can get them from the GetAssemblies() is when I first instantiate them. How to overcome this problem with an easy and more generic way instead of

Need a C# Assembly to reference a strongly named assembly loosely

China☆狼群 提交于 2019-12-10 15:22:56
问题 So here's the problem. I'm writing some StyleCop plug-in assemblies for use at the company I work for. As such, these assemblies need to reference Microsoft.StyleCop.CSharp.dll for example, which is strongly named. The problem comes in that if I build this and pass it along to the developers in my group, they must have the same version of the StyleCop dll (currently 4.3.3.0) or it fails to load. What is the best way to make my add-on rules DLL more independent? Should I just install my 4.3.3

How to recompile Google Drive API sdk?

ⅰ亾dé卋堺 提交于 2019-12-10 15:18:06
问题 Here is our question: How can recompile Google drive api sdk in dotnet? => We didn't find the source code. => In the binary package, there a single source file not shipped with a project and we don't know what to do with it. Reason of the question: In dotnet, we're unable to use the latest Google Drive api dll downloaded from Google: Google.Apis.Drive.v2 We are getting compilation errors like: Warning 10 The primary reference "Google.Apis.Drive.v2" could not be resolved because it has an

.Net 4 - Include custom information in assembly

試著忘記壹切 提交于 2019-12-10 15:09:23
问题 I'm building an extensible application which will load additional assemblies at runtime through Assembly.LoadFile() . Those additional assemblies will contain things like WPF resource dictionaries (skins, etc.), plain resources (Resx), and/or plugin classes. The assembly can also contain no public classes, only resources or resource dictionaries. I'm looking for a way to identify an assembly, things like a friendly name (like "Additional skins" or "Integrated browser"), the functional type of

How to use two different Microsoft Interop assemblies in one project?

核能气质少年 提交于 2019-12-10 14:48:52
问题 I want to use two different Microsoft.Office.Interop assemblies (version 11 and 12) depending on the Office version installed on customer's machine. I've been able to add these two asseblies to my project ( I am using them loccaly - they are in my bin folder, in two diffrent subfolders) , I used aliases on this assemblies to be able to use both of them in my project (respectively, aliases are Excel11 and Excel12). But unfourtunately, when I am trying to build the solution I am getting warning

Strange problems about strong name verification skipping

半城伤御伤魂 提交于 2019-12-10 14:25:17
问题 My ASP.NET application is using an assembly without strong name. When I run it in IE, it shows an error saying: Could not load file or assemlby 'xxxxx.' or one of its dependencies. Strong name signatuer could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)" I use sn.exe -Vr xxxx to register that assembly to skip the strong name verification, but still it shows that error.

Moving constants to a separate assembly [closed]

情到浓时终转凉″ 提交于 2019-12-10 13:48:15
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago . I have a project which utilizes many global constants. Eventually I am planning to extract some parts of the program and create assemblies of its own. Is it worthy (or is it possible?) to create an assembly for global constants alone (viz, GlobalConstants.dll), so that I can

Loading all referenced assemblies .NET even if not used explicitly in code

断了今生、忘了曾经 提交于 2019-12-10 13:45:47
问题 We have a windows service which is using Autofac, when we try to load the referenced assemblies not all are listed as some contain objects we aren't using anywhere in the application but interface implementations are in there we need to be included. The following method loads the assemblies: private IEnumerable<Assembly> GetReferencedAssemblies(Assembly assembly) { var assemblyNames = assembly.GetReferencedAssemblies(); List<Assembly> assemblies = new List<Assembly>(); assemblies.Add(assembly

c# - can you make a “weak” assembly reference to a strong named assembly

流过昼夜 提交于 2019-12-10 13:22:37
问题 For various reasons i would rather not use strong named (signed) assemblies in my project. however, one of the projects is referenced by a sharepoint web part which means it must be signed. is it possible to have this assembly signed but when I reference it from other projects, to do so using a non-strong reference. this would give me the advantages of having a non-signed assembly for the rest of my code but still allow it to be loaded by sharepoint. 回答1: The simplest way to do this is

Modules, Assemblies, Headers in CLR

妖精的绣舞 提交于 2019-12-10 12:45:58
问题 I've been reading CLR with C# 3.0 and I've been reflecting on Assemblies, Modules and Headers however things got complicated. This is what I understood but if would be great if someone can clarify things little bit more: Modules are result of csc.exe which contains IL code and Metadata tables. Metadata tables contains three different tables which are: Definition Tables such as "ModuleDef, TypeDef, PropertyDef, MethodDef, EventDef, FieldDef" Reference Tables such as "TypeRef, ModuleRef,