【发布时间】:2010-11-21 08:41:38
【问题描述】:
我不知道我哪里出错了。当我构建它时,它会搜索 DLL 登录的默认路径。即使我指定了路径。
我已创建 .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")]
我收到以下错误:
"签名程序集'D:\Services\ErrorCollection\obj\Debug\ErrorCollection.dll'时加密失败--'读取密钥文件'D:\Services\bin\ErrorCollection.snk'时出错--系统找不到指定的文件。'ErrorCollection"
【问题讨论】:
-
snk 是否真的在 D:\Services\bin\ErrorCollection.snk 中?
-
是的,我看到了。它正好位于我指定的位置。
-
有没有解释为什么这个问题被关闭了?这样我就知道不应该发布什么。
标签: c# visual-studio dll