草庐IT

signed-assembly

全部标签

c# - 未找到类型或命名空间 "are you missing assembly reference"而所有引用都正确

我正在尝试使用MSBuildWorkspaceclass.我的项目中有所有程序集引用。当我在对象浏览器中打开引用时,我看到了namespace和我尝试使用的类。但是在我接下来的using语句中,使用Microsoft.CodeAnalysis.MSBuild我得到一个Thetypeornamespacename'MSBuild'doesnotexistinthenamespace'Microsoft.CodeAnalysis'(areyoumissinganassemblyreference?)但有趣的是,语法高亮器识别类型名称,这是编译器的提示这是构建日志1>c:\windows\M

c# - 尝试运行项目 :The module was expected to contain an assembly manifest 时出错

当我尝试运行该项目时,它显示:Errorwhiletryingtorunproject:couldnotloadfileorassembly'Project.exe'oroneofitsdependencies.Themodulewasexpectedtocontainanassemblymanifest.当我从调试文件夹运行exe时,出现了这个错误:applicationunabletostartcorrectly(0xc000007b)我也重新安装了VisualStudio,但它似乎不起作用! 最佳答案 Themodulewas

c# - 为什么签名程序集加载缓慢?

这周我遇到了一个我无法解释的奇怪问题:我将我的应用程序切换为使用一些第三方程序集(XceedGrid和他们的一些其他组件)的签名版本并且应用程序启动时间进入了厕所.每次应用程序加载签名程序集时,加载时间为30秒。应用程序启动时间从5秒缩短到90多秒。这到底是怎么回事?!一些其他信息:这是一个在.NET3.5SP1下运行的WinForms应用。计算机没有互联网连接(出于安全考虑,是故意的)。 最佳答案 JasonEvans的帖子确实包含答案,但是以链接的形式。我认为最好在此处发布实际解决方案:在与可执行文件相同的文件夹中创建文件App

c# - BinaryFormatter.ILMerge 后反序列化 "unable to find assembly"

我有一个带有引用dll的C#解决方案(也是具有相同.Net版本的C#)。当我构建解决方案并运行生成的exe时,没有合并exe和引用的dll,一切正常。现在我想将它们合并到一个exe中。我运行ILMerge,一切似乎都正常。我尝试执行exe,它似乎运行良好,直到它尝试反序列化在引用的dll中定义的对象。using(Streamfstream=newFileStream(file_path,FileMode.Open)){BinaryFormatterbf=newBinaryFormatter();returnbf.Deserialize(fstream)asControlledRuleC

c# - 错误 : Could not load log4net assembly

我正在寻找解决这个错误的办法:Couldnotloadfileorassembly'log4net,Version=1.2.10.0,Culture=neutral,PublicKeyToken=692fbea5521e1304'oroneofitsdependencies.Thesystemcannotfindthefilespecified."Thiserrorislocatedintheweb.configfile.当我将log4net.dll复制到我的webapp的bin目录时,我得到一个Couldnotloadfileorassembly'log4net,Version=1.

c# - "Assembly Same Simple Name already been imported"错误

这是一个CLR项目。我正在导入两个同名的DLL文件,quizz.dll(我将旧版本重命名为legacyquizz.dll),并将新版本包含为quizz.dll到遗留转换器测试项目。(正在测试的遗留转换器项目仅导入旧的quizz.dll)。这是我遇到的错误。..Anassemblywiththesamesimplename'Quizz,Version=2.0.0.1,Culture=neutral,PublicKeyToken=nullhasalreadybeenimported.Tryremovingoneofthereferencesorsignthemtoenableside-by

c# - 为什么 "Sign the ClickOnce manifests"复选框在构建时默认选中?

与SigntheClickOncemanifestscheckboxkeepsdefaultingtocheckedonpublish密切相关.这个问题中列出的答案都没有帮助到我。我的解决方案中有两个项目,以及其他引用项目。一个项目是C#WindowsPresentationFoundation(WPF)(输出类型Windows应用程序),当我取消选中“签署ClickOncelist”时,它在构建后仍未选中。第二个项目,也是启动项目,是一个VisualStudioToolsforOffice(VSTO)项目(输出类型默认为类库,不能更改)。当我取消选中其中的“签署ClickOnceli

c# - System.Reflection.Assembly 的空引用异常

我开发了一个用于内部电子邮件报告的库。当我从另一个项目使用该库时(通过添加引用)。它在下一行给出了NullReferenceException。System.Reflection.Assembly.GetEntryAssembly().GetName().Name知道为什么Assembly为空吗? 最佳答案 这是预期的,尤其是在由非托管运行时加载的Windows服务中。使用:Process.GetCurrentProcess().MainModule.FileName获取非托管入口点文件。更新看来您正在寻找这个:System.Ref

c# - 使用 Assembly.GetType ("MyCompany.Class1.Class2") 返回 null

我正在尝试使用Assembly.GetType("MyCompany.Class1.Class2")从字符串中动态获取类型。Assembly.GetType("MyCompany.Class1");按预期工作。如果我将一个类嵌入到另一个类中,例如:namespaceMyCompany{publicclassClass1{//.....publicclassClass2{//.....}}}并尝试获取类型Class2Assembly.GetType("MyCompany.Class1.Class2")将返回一个空值。我正在使用.NETFrameworks3.5SP1有谁知道我做错了什么以

c# - Assembly.GetType 返回 null

我正在尝试动态加载加密程序集,但我的GetType返回null,即使我使用的是正确的类名。这是代码://Loadencryptionassembly.AssemblyencryptionAssembly=Assembly.LoadFrom("Encryption.dll");foreach(TypetinencryptionAssembly.GetTypes()){MessageBox.Show(t.Name.ToString());//Thisshows"Encryption"}TypeencryptionClass=encryptionAssembly.GetType("Encry