I'm loading an assembly with LoadWithPartialName(), but VS tells me that it's obsolete and to use Load() instead. However, I can't find any convenient overload.
我正在使用LoadWithPartialName()加载程序集,但VS告诉我它已过时并使用Load()代替。但是,我找不到任何方便的过载。
There is a Load(string) with asks for a "full-name" which, if I understood correctly the MSDN docs, includes things like the version number.
有一个Load(字符串)请求“全名”,如果我理解正确的MSDN文档,包括版本号之类的东西。
There is also a Load (string, Evidence) which accepts a "Display name". The problem is I don't have the slightest idea what the "Display Name" is, as the "Partial Name" I was using with the first function doesn't seem to work.
还有一个Load(string,Evidence)接受“显示名称”。问题是我没有丝毫知道“显示名称”是什么,因为我使用第一个功能的“部分名称”似乎不起作用。
So, how should it be done?
那么,应该怎么做呢?
1 个解决方案
#1
The following article explains why it's obsolete: http://blogs.msdn.com/suzcook/archive/2003/05/30/57159.aspx.
以下文章解释了为什么它已经过时:http://blogs.msdn.com/suzcook/archive/2003/05/30/57159.aspx。
Bottom line is: use Load and give it the version number.
底线是:使用Load并为其提供版本号。
#1
The following article explains why it's obsolete: http://blogs.msdn.com/suzcook/archive/2003/05/30/57159.aspx.
以下文章解释了为什么它已经过时:http://blogs.msdn.com/suzcook/archive/2003/05/30/57159.aspx。
Bottom line is: use Load and give it the version number.
底线是:使用Load并为其提供版本号。