首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >“DynamicTransform”在由T4Scaffolding生成CustomScaffolder时找不到

“DynamicTransform”在由T4Scaffolding生成CustomScaffolder时找不到
EN

Stack Overflow用户
提问于 2013-03-29 09:41:56
回答 1查看 300关注 0票数 0

我正试图在我当前的项目中使用T4Scaffolding,但它在一开始就失败了。

我在此链接上一步一步地学习如何在基本控制台应用程序中使用T4Scaffolding。

我做的步骤

1- i创建了一个新的控制台应用程序(.NET 4.0)

2- i通过使用包管理器控制台(Install t4scaffolding)成功地安装了T4Scaffholding

3-我尝试使用包管理器控制台创建一个自定义模板,如

Scaffold CustomScaffolder T4Demo

然后抛出下面的异常

代码语言:javascript
复制
Add-ProjectItemViaTemplate : c:\Users\ryu\Desktop\SpiderWeb\ConsoleApplication2\packages\T4Scaffolding.Core.1.0.0\tools\CustomScaffolder\DefaultPs1Script.ps1.t4(1,48) : error CS0246: Com
piling transformation: The type or namespace name 'DynamicTransform' could not be found (are you missing a using directive or an assembly reference?)
At C:\Users\ryu\Desktop\SpiderWeb\ConsoleApplication2\packages\T4Scaffolding.Core.1.0.0\tools\CustomScaffolder\T4Scaffolding.CustomScaffolder.ps1:15 char:1
+ Add-ProjectItemViaTemplate $outputPath -Template DefaultPs1Script -Model @{
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-ProjectItemViaTemplate], Exception
    + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.AddProjectItemViaTemplateCmdlet

Add-ProjectItemViaTemplate : c:\Users\ryu\Desktop\SpiderWeb\ConsoleApplication2\packages\T4Scaffolding.Core.1.0.0\tools\CustomScaffolder\DefaultT4Template.cs.t4(1,48) : error CS0246: Com
piling transformation: The type or namespace name 'DynamicTransform' could not be found (are you missing a using directive or an assembly reference?)
At C:\Users\ryu\Desktop\SpiderWeb\ConsoleApplication2\packages\T4Scaffolding.Core.1.0.0\tools\CustomScaffolder\T4Scaffolding.CustomScaffolder.ps1:22 char:1
+ Add-ProjectItemViaTemplate $outputPath -Template DefaultT4Template -Model @{
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-ProjectItemViaTemplate], Exception
    + FullyQualifiedErrorId : T4Scaffolding.Cmdlets.AddProjectItemViaTemplateCmdlet

我做错什么了?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-03-29 11:16:05

当我把我的windows区域设置从我的母语改为美国之后,问题就消失了。不要忘记重新启动Visual。

真是烦人的问题!

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15700764

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档