本文介绍了食谱执行中的异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Microsoft.Practices.RecipeFramework.ActionExecutionException:绑定引用或执行配方时发生异常。错误是:操作无法执行:
抛出类型'Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TemplateException'的异常。
您可以通过Guidance Package Manager删除对此配方的引用。



编译转换:名称空间'System'中不存在类型或命名空间名称'CodeDom'(您是否缺少程序集引用?)
- -------------------------------------------------- ------------------------------------------------ 编译转换:名称空间'System'中不存在类型或命名空间名称'CodeDom'(您是否缺少程序集引用?)
----------------- -------------------------------------------------- ---------------------------------
编译转换:类型'System.CodeDom.Compiler.CompilerErrorCollection'在未引用的程序集中定义。您必须添加对程序集'System,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089'的引用。
---------------------- -------------------------------------------------- ----------------------------
编译转换:'System.CodeDom.Compiler.CompilerErrorCollection'不包含'的定义'添加"点击--------------------------------------------- -------------------------------------------------- -----


---内部异常堆栈跟踪结束---来自Microsoft的Microsoft.Practices.RecipeFramework.Recipe.UndoExecutedActionsAndRethrow(Exception ex)
.Practices.RecipeFramework.Recipe.ExecuteActions(IDictionaryService readOnlyArguments,IDictionaryService参数,ITypeResolutionService解析)
at Microsoft.Practices.RecipeFramework.Recipe.Execute(Boolean allowSuspend)
at Microsoft.Practices.RecipeFramework.GuidancePackage.Execute(String recipe,IAssetReference引用,IDictionary参数s)
Microsoft.Practices.RecipeFramework.GuidancePackage.Execute(IAssetReference reference)
at Microsoft.Practices.RecipeFramework.RecipeReference.OnExecute()
at Microsoft.Practices.RecipeFramework.VisualStudio.VsBoundReference.OnExecute( )
Microsoft.Practices.RecipeFramework.AssetReference.Execute()
at Microsoft.Practices.RecipeFramework.VisualStudio.RecipeMenuCommand.OnExec()
at Microsoft.Practices.RecipeFramework.VisualStudio.AssetMenuCommand.Invoke()

解决方案

Microsoft.Practices.RecipeFramework.ActionExecutionException: An exception occurred during the binding of reference or execution of recipe . Error was: Action  failed to execute:
Exception of type 'Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TemplateException' was thrown..
You can remove the reference to this recipe through the Guidance Package Manager.


Compiling transformation: The type or namespace name 'CodeDom' does not exist in the namespace 'System' (are you missing an assembly reference?)
----------------------------------------------------------------------------------------------------
Compiling transformation: The type or namespace name 'CodeDom' does not exist in the namespace 'System' (are you missing an assembly reference?)
----------------------------------------------------------------------------------------------------
Compiling transformation: The type 'System.CodeDom.Compiler.CompilerErrorCollection' is defined in an assembly that is not referenced. You must add a reference to assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
----------------------------------------------------------------------------------------------------
Compiling transformation: 'System.CodeDom.Compiler.CompilerErrorCollection' does not contain a definition for 'Add'
----------------------------------------------------------------------------------------------------

   --- End of inner exception stack trace ---
   at Microsoft.Practices.RecipeFramework.Recipe.UndoExecutedActionsAndRethrow(Exception ex)
   at Microsoft.Practices.RecipeFramework.Recipe.ExecuteActions(IDictionaryService readOnlyArguments, IDictionaryService arguments, ITypeResolutionService resolution)
   at Microsoft.Practices.RecipeFramework.Recipe.Execute(Boolean allowSuspend)
   at Microsoft.Practices.RecipeFramework.GuidancePackage.Execute(String recipe, IAssetReference reference, IDictionary arguments)
   at Microsoft.Practices.RecipeFramework.GuidancePackage.Execute(IAssetReference reference)
   at Microsoft.Practices.RecipeFramework.RecipeReference.OnExecute()
   at Microsoft.Practices.RecipeFramework.VisualStudio.VsBoundReference.OnExecute()
   at Microsoft.Practices.RecipeFramework.AssetReference.Execute()
   at Microsoft.Practices.RecipeFramework.VisualStudio.RecipeMenuCommand.OnExec()
   at Microsoft.Practices.RecipeFramework.VisualStudio.AssetMenuCommand.Invoke()

解决方案


这篇关于食谱执行中的异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 08:44