编译的类库中的Cange命名空间 [英] Cange namespace in compiled Class Library

查看:92
本文介绍了编译的类库中的Cange命名空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些大约一年前建立的类库。我想

添加它没有其他项目,但我想更改他们的名称空间没有

recompliation(''我不确定我有所有nessesery库)。

是否有可能改变已编译的.NET DLL的命名空间?


TNX

I have a couple of class libraries wich I built about a year ago. I want to
add it no other project, but I want to change their namespaces without
recompliation (''cos I''m not sure that I have all nessesery libraries).
Is it possible anyhow change namespace of compiled .NET DLL ?

TNX

推荐答案



为什么你不能使用现有的命名空间?


Mattias


-

Mattias Sj?gren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com

请回复到新闻组。

Why can''t you use the existing namespace?

Mattias

--
Mattias Sj?gren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.


Tamir,


我对此表示怀疑,特别是如果签名的话。如果它已经签名,那么我想,

每个类型的命名空间构成了

程序集中签名时哈希的一部分。


您可以做的是在程序集上运行ildasm,创建IL文件,

然后调用ilasm,它将编译IL。您可以在IL中更改

命名空间,并且我相信得到相同的结果。


希望这会有所帮助。

-

- Nicholas Paldino [.NET / C#MVP]

- mv * @ spam.guard.caspershouse.com


" Tamir Khason" < TA ********** @ tcon-NOSPAM.co.il>在消息中写道

news:eH ************** @ tk2msftngp13.phx.gbl ...
Tamir,

I doubt it, especially if it is signed. If it is signed, then I imagine
the namespace of each type makes up part of the hash that is embedded in the
assembly when it is signed.

What you could do is run ildasm on the assembly, creating files of IL,
and then call ilasm, which would compile the IL. You can change the
namespace in the IL, and get the same results, I believe.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Tamir Khason" <ta**********@tcon-NOSPAM.co.il> wrote in message
news:eH**************@tk2msftngp13.phx.gbl...
我有几个我一年前建的班级图书馆。我想要
来添加它没有其他项目,但是我想在没有
重新编译的情况下更改它们的命名空间(''我不确定我是否拥有所有nessesery库)。
是吗可能无论如何更改已编译的.NET DLL的命名空间?

TNX
I have a couple of class libraries wich I built about a year ago. I want to add it no other project, but I want to change their namespaces without
recompliation (''cos I''m not sure that I have all nessesery libraries).
Is it possible anyhow change namespace of compiled .NET DLL ?

TNX



我需要在项目中加入它而不是其他版本(具有不同的

命名空间)所以我不想弄乱交换所有引用


" Mattias Sj?gren" <毫安******************** @ mvps.org>在消息中写道

新闻:%2 **************** @ TK2MSFTNGP09.phx.gbl ...
Cos I need to incude it in project instead of other version (with different
namespace) so I do not want to mess with exchanging all references

"Mattias Sj?gren" <ma********************@mvps.org> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...

为什么你不能使用现有的命名空间?

Mattias

-
Mattias Sj?gren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
请仅回复新闻组。

Why can''t you use the existing namespace?

Mattias

--
Mattias Sj?gren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.



这篇关于编译的类库中的Cange命名空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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