assemblies

Cannot find `ZipArchive` in the “System.IO.Compression” namespace

风流意气都作罢 提交于 2019-12-19 05:16:24
问题 My question is related to I didn't find "ZipFile" class in the "System.IO.Compression" namespace But I have referenced the DLL's for my 4.5.1 webforms project: Properties of my project give me: Target framework: .Net Framework 4.5.1. and the web.config: <compilation debug="true" targetFramework="4.5" /> What am I missing? The solution was to manually reference the assemblies in the web.config But why? Why wasn't the checkbox in the add reference dialog insufficient? <assemblies> <add assembly

Maven creating flat zip assembly

≯℡__Kan透↙ 提交于 2019-12-19 05:06:22
问题 To Maven gurus out there: I'm trying to package non-java project artifacts (.NET) into a single zip file. I'm having 2 problems: If I change packaging in my POM to zip <packaging>zip</packaging> , I get this error message: [INFO] Cannot find lifecycle mapping for packaging: 'zip'. Component descriptor cannot be found in the component repository: org.apache.mav en.lifecycle.mapping.LifecycleMappingzip. OK, no big deal - I changed it to <packaging>pom</packaging> to get rid of useless jar that

How to load an assembly from a Stream or byte[] in WP7?

耗尽温柔 提交于 2019-12-19 02:46:06
问题 I want to load an assembly at runtime using either a Stream or a Byte array. In .net you can use Assembly.Load(Byte[], Byte[]) http://msdn.microsoft.com/en-us/library/twt16z2x.aspx In standard Silverlight you can use AssemblyPart.Load() http://msdn.microsoft.com/en-us/library/cc190521%28v=VS.96%29.aspx But in Windows Phone 7 neither of these methods are avaliable. 回答1: Well, as you pretty much discovered; you can't do it. The design doesn't allow for you to load an assembly that doesn't ship

Supply Assembly to CompilerParameters ReferencedAssemblies from memory and not disk?

笑着哭i 提交于 2019-12-18 21:13:28
问题 I have a CompilerParameters object that I use to feed a Microsoft.CSharp.CSharpCodeProvider object and an ICodeCompiler object that derives from that. Everything works OK, and I can compile code on the fly. My problem is with the referenced assemblies. Right now, I just add all assemblies from System.Reflection.Assembly.GetExecutingAssembly().GetReferencedAssemblies() into the compiler parameter's ReferencedAssemblies . This works for files on the hard disk. However I have one assembly that

Is it possible to execute a .NET assembly(dll) from vbscript?

六月ゝ 毕业季﹏ 提交于 2019-12-18 16:56:35
问题 I'd like to execute a .NET dll file from vbscript in a synchronous way - is this possible? if yes, is it possible to execute a GAC assembly? thanks, Ofer 回答1: I think you must first make the .NET assembly COM-visible by including the ComVisible attribute in the AssemblyInfo.cs file: [ComVisible(true)] See this page on MSDN: Packaging an Assembly for COM And then in VBScript you can access those components by the same means you access COM components, i.e. using CreateObject or Server

Assembly.GetTypes() - ReflectionTypeLoadException

假装没事ソ 提交于 2019-12-18 14:47:27
问题 We implement a plugin framework for our application and load plugin assemblies using Assembly.Loadfrom. We then use GetTypes() and further examine the types with each plugin file for supported Interfaces. A path for the plugins is provided by the user and we cycle through each of the files in the folder to see if it (the plugin) supports our plugin interface. If it does, we create an instance, if not we move onto the next file. We build two versions of software from the one code base (appA_1

Assembly.GetTypes() - ReflectionTypeLoadException

a 夏天 提交于 2019-12-18 14:47:15
问题 We implement a plugin framework for our application and load plugin assemblies using Assembly.Loadfrom. We then use GetTypes() and further examine the types with each plugin file for supported Interfaces. A path for the plugins is provided by the user and we cycle through each of the files in the folder to see if it (the plugin) supports our plugin interface. If it does, we create an instance, if not we move onto the next file. We build two versions of software from the one code base (appA_1

.NET: Strong naming vs. Authenticode

血红的双手。 提交于 2019-12-18 14:16:43
问题 Having read about strong names in .NET here, for example, I have the following question: We have an Authenticode code signing certificate with which we sign all our EXE, DLL and MSI files. The benefit of that is that Windows knows the MSI comes from a trusted source, and also that the authenticity of each file can be verified if required. We currently do not use .NET strong names . I have read that strong-naming a file essentially means that it is digitally signed with a self-signed

Sql Server CLR load assembly failed

风流意气都作罢 提交于 2019-12-18 13:11:31
问题 I am trying to deploy an CLR TVF (table value function). In the code I am using JavaScriptSerializer to parse some JSON string, so I reference the System.Web.Extensions dll and my problems start there. Project builds fine, but when I try to register the dll I receive the following error: Assembly 'my_assembly_name' references assembly 'system.web.extensions, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35.', which is not present in the current database. SQL Server attempted

How to load an assembly without using Assembly.Load?

我们两清 提交于 2019-12-18 12:07:46
问题 Is it possible to do this by streaming the assembly into memory? If so, how does one do this? Reason: I don't want to lock the dll that's loaded. I want to have the ability to dynamically load, change the code, compile and reload it again 回答1: It can be done by an overload of Load using byte array. You need to read the assembly bytes before the load and it won't lock the file: byte[] readAllBytes = File.ReadAllBytes("path"); Assembly assembly = Assembly.Load(readAllBytes); 回答2: As I