开发者

using regasm for an framework 4.0 assembly located on UNC share

开发者 https://www.devze.com 2023-01-07 05:53 出处:网络
I am trying to register a .Net 4.0 compiled binary using regasm utillity. This ComInterOp assemply has to be deployed on a network share, and t开发者_开发百科rying to register from the share fails wit

I am trying to register a .Net 4.0 compiled binary using regasm utillity. This ComInterOp assemply has to be deployed on a network share, and t开发者_开发百科rying to register from the share fails with the error "Cound not load file or assembly or one of the dependecies". (registration works if the binary is on a local drive). It may be Code access security issue, is there a way to set it for framework 4.0 assembly? I have tried Caspol.exe that ships with 4.0 framework but it did not help.


This is in fact due to security settings. The easiest solution is to change the regasm.config file to include the loadFromRemoteSources element so that the network share will be trusted:

http://msdn.microsoft.com/en-us/library/dd409252(VS.100).aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消