gpt4 book ai didi

asp.net-mvc - T4MVC 3.7.4 在 VS 2013 中不起作用(在 VS 2012 中它工作得很好)

转载 作者:行者123 更新时间:2023-12-04 02:24:21 24 4
gpt4 key购买 nike

我在 VS 2013 中创建了一个新的 ASP.NET MVC Web 应用程序项目,并通过 nuget 安装了 T4MVC 包。当我尝试在操作菜单中运行 T4MVC.tt 的自定义工具时,我收到以下错误。 T4MVC.tt 中的第 792 行如下所示:

if (method.Type.TypeKind != vsCMTypeRef.vsCMTypeRefCodeType || !(method.Type.CodeType is CodeClass2)) continue;

Error   1   Running transformation: System.Runtime.InteropServices.COMException (0x80004005): Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
at Microsoft.VisualStudio.CSharp.Services.Language.CodeModel.CCodeFunction.get_Type()
at EnvDTE80.CodeFunction2.get_Type()
at Microsoft.VisualStudio.TextTemplating98C322A13A6BCC1DAF8B2CBDB87780CF395EE5EDAD72B82A75D505BDDC8999456241B0D6A9EEE4B4EDBBFC85FFB857E4BED539824B09260C2453F2B9684ABF73.GeneratedTextTransformation.ProcessControllerActionMethods(ControllerInfo controllerInfo, CodeClass2 current) in c:\Users\Sergey\Documents\Visual Studio 2013\Projects\WebApplication3\WebApplication3\T4MVC.tt:line 792
at Microsoft.VisualStudio.TextTemplating98C322A13A6BCC1DAF8B2CBDB87780CF395EE5EDAD72B82A75D505BDDC8999456241B0D6A9EEE4B4EDBBFC85FFB857E4BED539824B09260C2453F2B9684ABF73.GeneratedTextTransformation.ProcessControllerType(CodeClass2 type, AreaInfo area, DateTime controllerLastWriteTime) in c:\Users\Sergey\Documents\Visual Studio 2013\Projects\WebApplication3\WebApplication3\T4MVC.tt:line 693
at Microsoft.VisualStudio.TextTemplating98C322A13A6BCC1DAF8B2CBDB87780CF395EE5EDAD72B82A75D505BDDC8999456241B0D6A9EEE4B4EDBBFC85FFB857E4BED539824B09260C2453F2B9684ABF73.GeneratedTextTransformation.ProcessControllersRecursive(ProjectItem projectItem, AreaInfo area) in c:\Users\Sergey\Documents\Visual Studio 2013\Projects\WebApplication3\WebApplication3\T4MVC.tt:line 625
at Microsoft.VisualStudio.TextTemplating98C322A13A6BCC1DAF8B2CBDB87780CF395EE5EDAD72B82A75D505BDDC8999456241B0D6A9EEE4B4EDBBFC85FFB857E4BED539824B09260C2453F2B9684ABF73.GeneratedTextTransformation.ProcessControllersRecursive(ProjectItem projectItem, AreaInfo area) in c:\Users\Sergey\Documents\Visual Studio 2013\Projects\WebApplication3\WebApplication3\T4MVC.tt:line 610
at Microsoft.VisualStudio.TextTemplating98C322A13A6BCC1DAF8B2CBDB87780CF395EE5EDAD72B82A75D505BDDC8999456241B0D6A9EEE4B4EDBBFC85FFB857E4BED539824B09260C2453F2B9684ABF73.GeneratedTextTransformation.ProcessAreaControllers(ProjectItems areaFolderItems, AreaInfo area) in c:\Users\Sergey\Documents\Visual Studio 2013\Projects\WebApplication3\WebApplication3\T4MVC.tt:line 591
at Microsoft.VisualStudio.TextTemplating98C322A13A6BCC1DAF8B2CBDB87780CF395EE5EDAD72B82A75D505BDDC8999456241B0D6A9EEE4B4EDBBFC85FFB857E4BED539824B09260C2453F2B9684ABF73.GeneratedTextTransformation.ProcessArea(ProjectItems areaFolderItems, String name) in c:\Users\Sergey\Documents\Visual Studio 2013\Projects\WebApplication3\WebApplication3\T4MVC.tt:line 576
at Microsoft.VisualStudio.TextTemplating98C322A13A6BCC1DAF8B2CBDB87780CF395EE5EDAD72B82A75D505BDDC8999456241B0D6A9EEE4B4EDBBFC85FFB857E4BED539824B09260C2453F2B9684ABF73.GeneratedTextTransformation.ProcessAreas(Project project) in c:\Users\Sergey\Documents\Visual Studio 2013\Projects\WebApplication3\WebApplication3\T4MVC.tt:line 541
at Microsoft.VisualStudio.TextTemplating98C322A13A6BCC1DAF8B2CBDB87780CF395EE5EDAD72B82A75D505BDDC8999456241B0D6A9EEE4B4EDBBFC85FFB857E4BED539824B09260C2453F2B9684ABF73.GeneratedTextTransformation.PrepareDataToRender(TextTransformation tt) in c:\Users\Sergey\Documents\Visual Studio 2013\Projects\WebApplication3\WebApplication3\T4MVC.tt:line 522
at Microsoft.VisualStudio.TextTemplating98C322A13A6BCC1DAF8B2CBDB87780CF395EE5EDAD72B82A75D505BDDC8999456241B0D6A9EEE4B4EDBBFC85FFB857E4BED539824B09260C2453F2B9684ABF73.GeneratedTextTransformation.TransformText() in c:\Users\Sergey\Documents\Visual Studio 2013\Projects\WebApplication3\WebApplication3\T4MVC.tt:line 40 c:\Users\Sergey\Documents\Visual Studio 2013\Projects\WebApplication3\WebApplication3\T4MVC.tt 792 1 WebApplication3

最佳答案

一些有助于调查的问题/建议:

  • 您的解决方案是完全未修改的新 MVC5 项目,还是有您的一些更改?
  • 即使在重新启动 VS 之后,这种情况是否一直发生?
  • 你看到我的 sample solution 有同样的问题吗? ?

关于asp.net-mvc - T4MVC 3.7.4 在 VS 2013 中不起作用(在 VS 2012 中它工作得很好),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20770492/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com