assemblies

What are differences between AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion?

前提是你 提交于 2019-12-16 19:56:17
问题 There are three assembly version attributes. What are differences? Is it ok if I use AssemblyVersion and ignore the rest? MSDN says: AssemblyVersion: Specifies the version of the assembly being attributed. AssemblyFileVersion: Instructs a compiler to use a specific version number for the Win32 file version resource. The Win32 file version is not required to be the same as the assembly's version number. AssemblyInformationalVersion: Defines additional version information for an assembly

What are differences between AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion?

情到浓时终转凉″ 提交于 2019-12-16 19:55:43
问题 There are three assembly version attributes. What are differences? Is it ok if I use AssemblyVersion and ignore the rest? MSDN says: AssemblyVersion: Specifies the version of the assembly being attributed. AssemblyFileVersion: Instructs a compiler to use a specific version number for the Win32 file version resource. The Win32 file version is not required to be the same as the assembly's version number. AssemblyInformationalVersion: Defines additional version information for an assembly

Error when adding parameters to ADODB command in a .NET assembly

不羁的心 提交于 2019-12-14 03:52:54
问题 I have a .NET assembly that is being consumed by a classic ASP page. I've created a method that returns a ADODB recordset. In my ADODB command object I'm supplying parameters using the following format to a adCmdStoredProc CommandType property... With ADODBCmd .ActiveConnection = ADODBConn .Prepared = True .CommandType = CommandTypeEnum.adCmdStoredProc .NamedParameters = True .CommandText = Sql_GetMyBook .Parameters.Append(.CreateParameter("@book", DataTypeEnum.adChar, ParameterDirectionEnum

How can my C# program behave differently depending on what assemblies are present?

最后都变了- 提交于 2019-12-14 03:49:12
问题 I want to reuse some code logic from a self-hosted web application in my Windows Azure web application. Currently I have code like this: void myFunction( params ) { //environment-neutral code } I need to rewrite that code to make the program act differently depending on whether is is on Azure: void myFunctionModified( params ) { if( onAzure() ) { //run Azure-specific code } else { //run non-Azure code } } yes, I know about virtual functions, but I'll need such code for at least instantiating

Is it possible to convert C to asm without link libc on Linux?

耗尽温柔 提交于 2019-12-14 02:44:03
问题 Test platform is on Linux 32 bit. (But certain solution on windows 32 bit is also welcome) Here is a c code snippet: int a = 0; printf("%d\n", a); And if I use gcc to generate assembly code gcc -S test.c Then I will get: movl $0, 28(%esp) movl 28(%esp), %eax movl %eax, 4(%esp) movl $.LC0, (%esp) call printf leave ret And this assembly code needs linking to libc to work(because of the call printf) My question is : Is it possible to convert C to asm with only explicit using system call

Are internal types visible from Assembly.GetExportedTypes()? [duplicate]

自古美人都是妖i 提交于 2019-12-14 02:32:03
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Assembly.GetExportedTypes vs GetTypes Are internal types visible when a call is made to Assembly.GetExportedTypes() ? If not, then does the call being made from an assembly with an InternalsVisibleToAttribute change the behavior? 回答1: GetTypes returns all the types in the assembly while GetExportedTypes returns only the types marked as public, i.e.: public class A would be returned by both methods class B would

How to register Assembly .net 4.0 in windows 7 GAC?

南楼画角 提交于 2019-12-14 01:22:29
问题 Hi i'm using vs2010 to create a .net 4.0 assembly that i pretend to register on the GAC. i can't find the gacutil and don't know ho to register an assembly on the 4.0 GAC can someone help? SOLUTION FOUND: Register using GacUtil located in: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools 回答1: You can either copy your assembly to your: %windir%\assembly folder, or use the Global Assembly Cache Utility found in the Microsoft SDK or Visual Studio SDK. 来源: https:/

Getting the Assembly Qualified Name of a class in Visual Studio

眉间皱痕 提交于 2019-12-14 00:49:39
问题 I'm writing a customized reflective library for some specialized custom domain logic, and that library is going to use XML configuration files that will dynamically resolve System.Type objects at runtime. However, when writing the XML configuration files, it's a bit of a pain to write the types because they need to be fully qualified assembly names for Type.GetType() to resolve them. Is there a way to find out the AssemblyQualifiedName of an object in Visual Studio without resorting to

How to find all assemblies that reference a specific dll?

若如初见. 提交于 2019-12-14 00:34:33
问题 I've a directory with a large number of dlls . I need to find all those that reference a specific dll . I'm thinking about the following solution : Loop the assemblies and invoke each one with ildasm Dump the manifest into a text file Search the text files for the required assembly name. Yet this solution feels immensely wrong to me. Is there a better way to achieve it? 回答1: You could write a small tool for that purpose, using Reflection to find the referenced assemblies: string[] fileNames =

Merging Assemblies

白昼怎懂夜的黑 提交于 2019-12-13 20:05:18
问题 I m working on a project which contain about 17 projects in it, means 17 DLL's. i want to merge some assemblies together. after googling i found ILMerge . is Ilmerge good ? n how to use it? can anyone tell me ? i tried it but so many errors came when i try to run the .exe. Anyone ? 回答1: You run ILMerge by first passing the "primary" assembly, and then all of the other assemblies. Use the /out option to specify the output assembly, and use the /targetplatform option to specify the .NET target