Determine framework (CLR) version of assembly
ildasm.exe will show it if you double-click on “MANIFEST” and look for “Metadata version”. By default, it’s the version that the image was compiled against.
ildasm.exe will show it if you double-click on “MANIFEST” and look for “Metadata version”. By default, it’s the version that the image was compiled against.
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.
With PowerShell 2.0, you can use the built in Cmdlet Add-Type. You would just need to specify the path to the dll. Add-Type -Path foo.dll Also, you can use inline C# or VB.NET with Add-Type. The @” syntax is a HERE string. C:\PS>$source = @” public class BasicTest { public static int Add(int a, int … Read more
The only way I can see this working is by creating a class that derives from ResourceManager and then overriding the InternalGetResourceSet and GetResourceFileName methods. From there, you should be able to override where resources are obtained, given a CultureInfo instance.
The usual expected? practice is to place them in their own assembly, because then a given project consuming those interfaces doesn’t require a hard reference to the implementation of those interfaces. In theory it means you can swap out the implementation with little or no pain. That said, I can’t remember when I last did … Read more
Yes you can. We do this kind of thing. [AttributeUsage(AttributeTargets.Assembly)] public class MyCustomAttribute : Attribute { string someText; public MyCustomAttribute() : this(string.Empty) {} public MyCustomAttribute(string txt) { someText = txt; } … } To read use this kind of linq stmt. var attributes = assembly .GetCustomAttributes(typeof(MyCustomAttribute), false) .Cast<MyCustomAttribute>();
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 can do pretty much anything you like. … Read more
Referencing an external ResourceDictionary (XAML File): <Application.Resources> <ResourceDictionary Source=”MyResources.xaml” /> </Application.Resources> Referencing an external ResourceDictionary (DLL): <Application.Resources> <ResourceDictionary Source=”/MyExternalAssembly;component/MyResources.xaml” /> </Application.Resources>
I used the following configuration to resolve the issue. <configuration> <runtime> <assemblyBinding xmlns=”urn:schemas-microsoft-com:asm.v1″> <dependentAssembly> <assemblyIdentity name=”Castle.DynamicProxy2″ publicKeyToken=”407dd0808d44fbdc” /> <codeBase version=”2.1.0.0″ href=”https://stackoverflow.com/questions/2460542/v2.1\Castle.DynamicProxy2.dll” /> <codeBase version=”2.2.0.0″ href=”v2.2\Castle.DynamicProxy2.dll” /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name=”Castle.Core” publicKeyToken=”407dd0808d44fbdc” /> <codeBase version=”1.1.0.0″ href=”v2.1\Castle.Core.dll” /> <codeBase version=”1.2.0.0″ href=”v2.2\Castle.Core.dll” /> </dependentAssembly> </assemblyBinding> </runtime> </configuration>
The reference assemblies are correct. In .NET Framework 4.5, these properties were abstract. They were changed to virtual in .NET Framework 4.5.1. It appears you’ve uncovered a documentation bug. As you probably have already guessed, the difference between the two System.Data.dll assemblies you are observing is due to how .NET Framework separates reference assemblies and … Read more