2017-07-27 5 views
1

をロードすることはできません私はネットと同じコンポーネントを構築する場合の.NET Framework 2.0アセンブリは、ライブラリ型に変換することができませんでした - エラー:タイプライブラリエクスポータはタイプ

を使用して古いコンポーネントの一つを構築しようとしていますフレームワーク4.0は正常に構築されますが、

.Net Framework 2.0が使用されている場合、「アセンブリをタイプライブラリに変換できませんでした」というエラーが表示されてビルドに失敗します。続き

は、このエラーの完全なエラーレポートです:

Error 14 The assembly "X:\MyAssembly.dll" could not be converted to a type library. Type library exporter encountered an error while processing 'Namespace.ComponentName, ProjectName'. Error: Type library exporter cannot load type 'Namespace.ComponentName' (error: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. 
    at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) 
    at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) 
    at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException) 
    at System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Assembly asm, SecurityAction action) 
The action that failed was: 
InheritanceDemand 
The type of the first permission that failed was: 
System.Security.Permissions.SecurityPermission 
The first permission that failed was: 
<IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
version="1" 
Flags="UnmanagedCode"/> 

The demand was for: 
<PermissionSet class="System.Security.PermissionSet" 
version="1"> 
<IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
version="1" 
Flags="UnmanagedCode"/> 
</PermissionSet> 

The granted set of the failing assembly was: 
<PermissionSet class="System.Security.PermissionSet" 
version="1"> 
<IPermission class="System.Security.Perm 

私はこのエラーを取り除くために何をすべき.NET Frameworkの上で2.0

をこのアセンブリを構築したいです。正しい方向に私を指してください...

+0

確かにX:ドライブが問題である、マップされたネットワークドライブは、デフォルトでは、イントラネットゾーンです。あなたは[あなたが完全にそれを信じている](https://blogs.msdn.microsoft.com/shawnfa/2004/12/30/using-caspol-to-fully-trust-a-share/) –

答えて

0

ユーザーHans Passantによって指摘されているように、確かにX:ドライブが問題でした。 CASPOLコマンドを使って "完全な信頼"を与えることで、それを動作させることができませんでした。 しかし、SUBSTコマンドを使ってX:ドライブをマップしたときにビルドできました。

したがって、マッピングX:SUBSTコマンドを使用してドライブが問題を修正しました。

subst X: D:\XDriveFolderToBeMapped

関連する問題