我正在尝试将VS2010(C#.net 4.0)项目转换为VS2013。在该解决方案中,共有6个项目,包括MyApp.Excel,MyApp.Host,MyApp.WCF,MyApp.Web,SetupAction,MyAppSetup。
MyApp.Excel是一个EXCEL VSTO项目。它最初是为Excel 2003设计的。我是否需要做一些事情才能使其支持Excel 2010?在转换之前,可以在Excel 2010中打开应用程序的Excel加载项。
MyAppSetup是一个MSI安装程序项目。我从
安装了VS安装程序项目扩展现在,我可以在VS2013中构建除MyApp.Excel和MyAppSetup之外的所有项目。后者取决于第一个。
在MyApp.Excel中,我遇到了构建错误:
Error 11 The "FindRibbons" task failed unexpectedly.System.ArgumentException: Invalid directory on URL.
服务器堆栈跟踪:
at System.Security.Util.DirectoryString.CreateSeparatedString(String directory)
at System.Security.Util.URLString.ParseFileURL(String url)
at System.Security.Util.URLString.ParseString(String url, Boolean parsed)
at System.Security.Util.URLString.GetFileName()
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.ReflectionOnlyLoadFrom(String assemblyFile)
at Microsoft.VisualStudio.Tools.Office.BuildTasks.FindRibbons.FindRibbonTypes(String assemblyName)
at Microsoft.VisualStudio.Tools.Office.BuildTasks.FindRibbons.Execute()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& m sgData, Int32 type)
at Microsoft.Build.Framework.ITask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() MyApp.Excel
我搜索过/试过很多相关的解决方案,但没有一个能为我效劳。
Assembly binding error when building Office add-in: "FindRibbons" task failed unexpectedly
FindRibbons task failed unexpectedly when building addin for Outlook 2010
http://www.wpthm.com/t/ibs13h11mmvs6v799stssrkbskvri39s
错误是什么意思?怎么解决?
答案 0 :(得分:0)
如果从以前版本的Visual Studio迁移项目,请务必从AssemblyInfo.cs文件中删除 ExcelLocale1033 和 SecurityTransparent 属性。 因为.Net框架4及更高版本内部处理了属性。