如何重命名[空格]在.NET程序集类型 [英] How can I rename[space] a type in a .NET assembly

查看:179
本文介绍了如何重命名[空格]在.NET程序集类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某种类型中有一些组件,怎么可以重命名和renamespace的类型,因此它在不同的位置?或者,也许只是提取的类型,并将其移动到不同的组件。

Given some assembly with some type in it, how can rename and renamespace that type so its in a different location? Or perhaps just extract the type and move it to a different assembly.

是否有任何工具,有做到这一点? (塞西尔?),并没有任何TUTS对上述工具?

Are there any tools out there to do this? (Cecil?) And are there any tuts for said tool?

感谢

背景打消了:你为什么这样做,白痴?对策:

Background to dispel "why are you doing that, idiot?!" responses:

我是precompiling我在Web应用程序的意见,然后ILMerging的组件放在一起。我使用的是自定义的虚拟路径提供负载从多个物理和虚拟地点的意见(一些precompiled,有些不是)。在precompiled的观点有不正确的名称和命名空间,所以我需要纠正。 (除非有办法让 aspnet_compiler 不是好惹的名称和命名空间在首位?另外,我知道我可以让我的VPP寻求该意见他们修改过的命名空间,那不是重点。

I'm precompiling my views in a web application, then ILMerging the assemblies together. I'm using a custom virtual path provider to load views from many physical and virtual locations (some precompiled, some not). The precompiled views have "incorrect" names and namespaces so I need to correct this. (Unless there is a way to make aspnet_compiler not mess the names and namespaces up in the first place? Also, I'm aware I could make my VPP search for the views in their modified namespace, thats not the point.

推荐答案

工作了。

下面是上一个帖子:<一href="http://blog.muonlab.com/2011/08/01/how-to-modify-net-types-names-and-namespaces-inside-compiled-assemblies-using-mono-cecil/"相对=nofollow>如何修改.NET类型的名称和命名空间使用Mono.Cecil能做到编译的程序集里面

Here is a post on it: How to modify .NET types’ names and namespaces inside compiled assemblies using Mono.Cecil

这篇关于如何重命名[空格]在.NET程序集类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆