我不知道我出錯的地方。當我構建它時,搜索DLL登錄的默認路徑。儘管我指定了路徑。在Visual Studio中籤署程序集時的加密失敗
我已經創建並將我的.snk文件存儲在與DLL相同的位置。
//Assembly info file for errorcollection
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ErrorCollection")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ErrorCollection")]
[assembly: AssemblyCopyright("Copyright © 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("2c17131b-0ae3-4146-a797-308f5958e819")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: System.Reflection.AssemblyKeyFile(@"D:\Services\bin\ErrorCollection.snk")]
我得到以下錯誤:
"Cryptographic failure while signing assembly 'D:\Services\ErrorCollection\obj\Debug\ErrorCollection.dll' -- 'Error reading key file 'D:\Services\bin\ErrorCollection.snk' -- The system cannot find the file specified. ' ErrorCollection"
snk實際上在D:\ Services \ bin \ ErrorCollection.snk中嗎? – 2010-11-21 08:53:58
是的,我看到它。其位於我指定的地方。 – 2010-11-21 10:08:02
是否有解釋爲什麼此問題已關閉?以便我瞭解不要發佈的內容。 – Mahesh 2014-03-07 09:13:59