草庐IT

Assembly-CSharp

全部标签

c# - 缺少编译器所需的成员 'microsoft.csharp.runtimebinder.binder.convert'

我第一次使用Excel通过SeleniumWebDriver在c#中读取数据,但是当我构建这段代码时,它弹出一个错误:"Missingcompilerrequiredmember'microsoft.csharp.runtimebinder.binder.convert'"使用excel的代码用红色标注如下:excel.Applicationx1Appl=newexcel.Application();excel.Workbookx1WorkBook=x1Appl.Workbooks.Open(@"C:\app\o\SearchBy.xlsx");excel._Worksheetx1Wo

c# - ILMerge DLL : Assembly not merged in correctly, 仍列为外部引用

在.NETC#工具的构建过程中,我一直在使用ILMerge将程序集合并到单个exe中。我最近添加了一个新的类库,现在ILMerge失败了。我记得告诉它要合并到新的DLL中!它现在给我这个错误,我不太明白:ILMerge.Merge:Theassembly'DataObjects'wasnotmergedincorrectly.Itisstilllistedasanexternalreferenceinthetargetassembly.我使用“项目”引用完成的所有程序集引用,过去从未失败过。谁能为我解释这个错误,或者建议解决方法? 最佳答案

c# - 何时更改 Generate Serialization Assembly 值?

我有一个连接到WCF本地网络服务器的客户端winform应用程序。客户端存在性能问题,我搜索了解决方案并找到了this发布。上面写着:Thissoundsliketheserializationassembliesbeingcreatedatruntime.TrychangingthesettingsoftheSerializationAssemblydropdownatthebottomoftheBuildpaneofthepropertieswindowfortheproject.我的问题是何时更改GenerateSerializationAssembly值以及我应该将其更改为什么

c# - SGEN : An attempt was made to load an assembly with an incorrect format

我有一个可以在我的本地机器上正常构建的项目,但是,当我使用TFS构建它时,我收到以下错误-SGEN:尝试加载格式不正确的程序集:在阅读了此处有关此主题的许多其他帖子后,大多数人只是说我需要将构建类型更改为x86或任何CPU,而不是x64,但在尝试了无数种组合之后,这并不是解决方案。我的程序也是一个Windows服务,因此将AppPool设置为允许32位应用程序(正如其他人所建议的)也不是解决方案。 最佳答案 我今天遇到了同样的问题。项目无法在我的PC上构建,但在其他PC上构建良好我最终通过执行以下操作修复了它:右键单击有错误的项目,

c# - 卸载用 Assembly.LoadFrom() 加载的程序集

我需要检查加载dll后运行GetTypes()的时间量。代码如下。Assemblyassem=Assembly.LoadFrom(file);sw=Stopwatch.StartNew();vartypes1=assem.GetTypes();sw.Stop();doubletime1=sw.Elapsed.TotalMilliseconds;我想卸载并重新加载dll以检查再次运行GetTypes()所花费的时间。如何卸载它?assem=null是否足够好?是否有明确的方法调用垃圾收集器来回收分配给assem的资源? 最佳答案 您可

c# - 处理动态时抛出很多第一次机会 Microsoft.CSharp.RuntimeBinderExceptions

我在C#中有一个标准的“动态字典”类型类-classBucket:DynamicObject{readonlyDictionarym_dict=newDictionary();publicoverrideboolTrySetMember(SetMemberBinderbinder,objectvalue){m_dict[binder.Name]=value;returntrue;}publicoverrideboolTryGetMember(GetMemberBinderbinder,outobjectresult){returnm_dict.TryGetValue(binder.Na

c# - EF 5 启用迁移 : No context type was found in the assembly

我有4个项目:Toombu.Entities:allmodelsarethereToombu.DataAccess:Mapping,RepositoryandToombuContextToombu.Logique:LogicofmyapplicationToombu.Web:MVC4application.WithallothersDLL.我尝试在Toombu.Web中启用迁移,但出现此错误:Nocontexttypewasfoundintheassembly如何启用迁移? 最佳答案 令我惊讶的是,没有人提到这个问题的明显答案:En

c# - Release模式下的 Visual Studio "Could not load file or assembly. Operation is not supported"错误

我有一个使用两个外部dll文件的C#小项目。一个是Redmine.Net.Api.dll,另一个是NLog.dll。我正在使用VisualStudio2010。我将这两个文件添加为对我的项目的引用。问题是,当我在Debug模式下运行项目时,它会编译,但是当我切换到Release模式时,它会说:Error1Couldnotloadfileorassembly'file:///C:\project\lib\Redmine.Net.Api.dll'oroneofitsdependencies.Operationisnotsupported.(ExceptionfromHRESULT:0x80

c# - NuGet 包管理器 : 'AutoMapper' already has a dependency defined for 'Microsoft.CSharp'

我尝试将AutoMapper添加为在VisualStudioPremium2012上使用NuGet的项目的依赖项,但它失败了。它说:Operationfailed'AutoMapper'alreadyhasadependencydefinedfor'Microsoft.CSharp'.我可以添加其他依赖项。我正在使用VS2012的最新版本的包管理器:NuGetPackageManager2.8.60318.667有什么我应该检查的想法吗? 最佳答案 问题是您的NuGet包管理器太旧了。你需要NuGet2.12因为它支持AutoMap

c# - 系统.BadImageFormatException : Could not load file or assembly

这个问题在这里已经有了答案:System.BadImageFormatException:Couldnotloadfileorassembly(frominstallutil.exe)(18个答案)关闭9年前。C:\Windows\Microsoft.NET\Framework64\v4.0.30319>InstallUtil.exeC:\_PRODUKCIJA\Debug\DynamicHtmlTool.exeMicrosoft(R).NETFrameworkInstallationutilityVersion4.0.30319.1Copyright(c)MicrosoftCorpo