assemblies

Determine whether .NET assemblies were built from the same source

丶灬走出姿态 提交于 2019-11-27 11:48:25
Does anyone know of a way to compare two .NET assemblies to determine whether they were built from the "same" source files? I am aware that there are some differencing utilities available, such as the plugin for Reflector, but I am not interested in viewing differences in a GUI, I just want an automated way to compare a collection of binaries to see whether they were built from the same (or equivalent) source files. I understand that multiple different source files could produce the same IL, and realise that the process would only be sensitive to differences in the IL, not the original source.

Maven, Proguard and assembly issues

余生长醉 提交于 2019-11-27 11:42:07
问题 I'm trying to get Maven working with ProGuard. What I want to achieve is the following: Run ProGuard over my source files and produce obfuscated classes Create a manifest file that references the main class so that I can execute it as a jar Unpack all of the associated library jars and create one huge jar containing them all. This file should only contact .class and .xml files only. Assemble them into .zip and tar.gz files that include various README.txt files and so on. So far I've got

using ILMerge with .NET 4 libraries

天大地大妈咪最大 提交于 2019-11-27 11:38:56
Two problems: 1) Basic .NET Assembly Not Included in ILMerged Assembly I'm having trouble using ILMerge in my post-build after upgrading from .NET 3.5/Visual Studio 2008 to .NET 4/Visual Studio 2010. I have a Solution with several projects whose target framework is set to ".NET Framework 4". I use the following ILMerge command to merge the individual project DLLs into a single DLL: if not $(ConfigurationName) == Debug if exist "C:\Program Files (x86)\Microsoft\ILMerge\ILMerge.exe" "C:\Program Files (x86)\Microsoft\ILMerge\ILMerge.exe" /lib:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319" /lib

Accessing unregistered COM objects from python via a registered TLB

筅森魡賤 提交于 2019-11-27 11:21:03
问题 I have three pieces of code that i'm working with at the moment: A closed source application (Main.exe) A closed source VB COM object implemented as a dll (comobj.dll) Code that I am developing in Python comobj.dll hosts a COM object (lets say, 'MainInteract') that I would like to use from Python. I can already use this object perfectly fine from IronPython, but due to other requirements I need to use it from regular Python. I believe the best method here is to use win32com, but I can't quite

How can I reference a dll in the GAC from Visual Studio?

♀尐吖头ヾ 提交于 2019-11-27 11:06:30
This assembly is in the GAC: Microsoft.SqlServer.Management.RegisteredServers.dll How can I add a reference to this assembly in Visual Studio? I can view the file in c:\windows\assembly\ As the others said, most of the time you won't want to do that because it doesn't copy the assembly to your project and it won't deploy with your project. However, if you're like me, and trying to add a reference that all target machines have in their GAC but it's not a .NET Framework assembly: Open the windows Run dialog (Windows Key + r) Type C:\Windows\assembly\gac_msil. This is some sort of weird hack that

How to check if an assembly was built using Debug or Release configuration?

China☆狼群 提交于 2019-11-27 11:00:05
问题 I'm starting deployment of my web application and I need to guarantee that all the assemblies that are going to be deployed were built using Release configuration. Our system was developed using C#/.Net 3.5. Is there any way to achieve this? 回答1: Check this. The idea is that you get the list of assembly attributes using Assembly.GetCustomAttributes() and search for DebuggableAttribute and then find if such attribute has IsJITTrackingEnabled property set. public bool IsAssemblyDebugBuild

How slow is Reflection

那年仲夏 提交于 2019-11-27 10:39:08
I recently created an interface layer to distinguish the DataAccessProvider from our Business logic layer. With this approach we can change our choice of DataAccessProvider whenever we want by changing the values in the Web/App.Config. (more details can be given if needed). Anyway, to do this we use reflection to accomplish our DataProvider class on which we can work. /// <summary> /// The constructor will create a new provider with the use of reflection. /// If the assembly could not be loaded an AssemblyNotFoundException will be thrown. /// </summary> public DataAccessProviderFactory() {

Assembly version from command line?

点点圈 提交于 2019-11-27 09:56:56
问题 Is there a Microsoft tool to get the assembly version of a DLL file from a command line? (I know that I can code my own tool.) 回答1: This is an area where PowerShell shines. If you don't already have it, install it. It's preinstalled with Windows 7. Running this command line: [System.Reflection.Assembly]::LoadFrom("C:\full\path\to\YourDllName.dll").GetName().Version outputs this: Major Minor Build Revision ----- ----- ----- -------- 3 0 8 0 Note that LoadFrom returns an assembly object, so you

Namespace or Assembly?

半世苍凉 提交于 2019-11-27 09:28:37
问题 I am getting very confused between Namespaces and Assemblies. Are System.Data and System.Web Namespaces or Assemblies? I have noticed these are called namespaces and at the same time they are present in GAC_32 folder. So what exactly are they? 回答1: System.Data is a namespace , System.Data.DLL (the file) is an assembly . A namespace is a logical grouping of types (mostly to avoid name collisions). An assembly can contain types in multiple namespaces ( System.DLL contains a few...), and a

What are the best practices for using Assembly Attributes?

泄露秘密 提交于 2019-11-27 08:56:11
问题 I have a solution with multiple project. I am trying to optimize AssemblyInfo.cs files by linking one solution wide assembly info file. What are the best practices for doing this? Which attributes should be in solution wide file and which are project/assembly specific? Edit: If you are interested there is a follow up question What are differences between AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion? 回答1: We're using a global file called GlobalAssemblyInfo.cs and a