このブログを検索

2014/08/23

Runtime error - dotNet runtime exception

フリーのスクリプト(dll付き)を実行したら以下の警告が表示されたと連絡があった。
自分のパソコンでも試してみたが結果は同じだった。
---------------------------
MAXScript MacroScript Error Exception
---------------------------
-- Runtime error: dotNet runtime exception: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
---------------------------
OK   
---------------------------
表示された警告内のリンクに飛んでみると
<loadFromRemoteSources enabled="true|false"/>
を追加したら?みたいな事が書いてあったが、そういう事じゃない気がすると思って他の方法を探す事にした。
うーん、と悩んでいると以下のサイトに行き当たった。

http://blogs.msdn.com/b/drew/archive/2009/12/24/xunit-and-td-net-fixing-the-attempt-was-made-to-load-an-assembly-from-a-network-location-problem.aspx

おお、そういうことかと。
dllって署名付いてないと実行できないんですね。
署名ついてに場合はファイルのプロパティから「ブロックの解除」をしてあげないと使いないんだ。知らなかった。

0 件のコメント:

コメントを投稿