.net-assembly

Validating .NET Framework Assemblies

守給你的承諾、 提交于 2019-12-21 04:34:07
问题 I just went through our german VB.NET forums and there was something interesting that gives me some kind of headache. It is actually possible to edit the .NET Framework assemblies using ReflexIL or some other IL editor. The only thing you have to bypass is the Strong Name signature of the assembly. After changing the assembly IL, you have to run sn.exe -Vr [assemblyname] to kinda skip the strong name validation. After that you have to clear the cached native images. Just go through the C:

What's the XML file that comes together with a .NET assembly file?

▼魔方 西西 提交于 2019-12-20 17:49:08
问题 Many .NET assemblies are accompanied with an XML file. For example, System.Web.WebPages.Razor.dll comes together with System.Web.WebPages.Razor.xml that contains the following: <?xml version="1.0" encoding="utf-8" ?> <doc> <assembly> <name>System.Web.WebPages.Razor</name> </assembly> <members> <member name="T:System.Web.WebPages.Razor.PreApplicationStartCode" /> <member name="M:System.Web.WebPages.Razor.PreApplicationStartCode.Start" /> <member name="T:System.Web.WebPages.Razor

Retrieve Target Framework Version and Target Framework Profile from a .Net Assembly

不打扰是莪最后的温柔 提交于 2019-12-20 11:52:58
问题 Is there any way that I can access the values that were used for TargetFrameworkVersion and/or TargetFrameworkProfile when a .Net assembly was compiled? The values I'm talking about are the ones contained the project file <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <OtherStuff> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client<

Retrieve Target Framework Version and Target Framework Profile from a .Net Assembly

孤街醉人 提交于 2019-12-20 11:52:19
问题 Is there any way that I can access the values that were used for TargetFrameworkVersion and/or TargetFrameworkProfile when a .Net assembly was compiled? The values I'm talking about are the ones contained the project file <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <OtherStuff> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client<

How to load an .exe as a .NET assembly?

帅比萌擦擦* 提交于 2019-12-20 10:16:44
问题 Can I just use?: Assembly.LoadFile Not sure if this is the way to do this? But when I try that approach, it throws a Could not load file or assembly "CustomControlLib" or one of its dependencies. The system cannot find the file specified. Any ideas? 回答1: You will need to make sure that the dependencies are also loaded into the app domain. If they aren't located automatically, you can subscribe to AppDomain.AssemblyResolve in order to find and load assemblies manually if needs be. For example:

Can a C# .dll assembly contain an entry point?

回眸只為那壹抹淺笑 提交于 2019-12-20 09:56:09
问题 My goal is to create an executable that will start a shadow copied application. The trick is, I want this starter program to have no external dependencies and not have to contain any knowledge about the program it has to start. I also want it to be the only executable in the directory. In other words, I want it to "run" a .dll assembly not an .exe assembly. (I can require that the name of the .dll file being loaded into a new AppDomain be the same everytime, like Main.dll or something like

NuGet Enterprise - best practices for different maturity levels of packages

不问归期 提交于 2019-12-20 09:03:21
问题 We want to use NuGet to share assemblies amongst developers in our organisation. We are currently looking at setting up three NuGet feeds, like this: Release-feed: Stable release-quality versions of the assemblies. QA-feed: Assemblies built in the master-branch (our integration branch). Development-feed: Assemblies built in any of the feature branches (sharing progress). Local builds on the developers' machines should not be sent to any of these feeds. Only the builds done by the build-server

.net assemblies and individual configuration

此生再无相见时 提交于 2019-12-20 07:32:16
问题 My primary assembly is a web application. It uses spring.net framework to load other assemblies into its executing app domain. So naturally this means all those other assemblies must get their config values (for e.g. connection strings & app settings) from the web.config. Is there a way I can override this? Some of the configurations can come from the web.config; others must reside separately. What kind of an approach should I take in developing such .net assemblies? The goal is, once this

Create application domain and load assembly

笑着哭i 提交于 2019-12-20 07:06:28
问题 I want to create an application domain with default permissions and load assembly into the application domain with default privileges and execute the methods inside the assembly. 回答1: You may take a look at the following article on MSDN. Or if you want to construct an instance of some type inside another AppDomain (assuming this type has a default constructor): var domain = AppDomain.CreateDomain("NewAppDomain"); var path = @"C:\work\SomeAssembly.dll"; var t = typeof(SomeType); var instance =

.Net assembly PublicKeyToken

爷,独闯天下 提交于 2019-12-20 05:29:36
问题 Can often be seen a PublicKeyToken for an assembly, for example: C1.Win.C1Input.C1NumericEdit, C1.Win.C1Input.4, Version=4.0.20131.33296, Culture=neutral, PublicKeyToken=7e7ff60f0c214f9a What is this part of the line mean? 回答1: The PublicKeyToken identifies the key that was used to sign a strong-named .net assembly. Read more about Strong-Named Assemblies here. 来源: https://stackoverflow.com/questions/17365349/net-assembly-publickeytoken