Template Code 无法使用 this.Host 报错
问题显示:
Error 6
Compiling transformation: 'Microsoft.VisualStudio.TextTemplatingBED07DAE3B6FD53FA947017E5A5F7A123173F8AEEBD8059AD94FFEA4200EC409BE022035F5E3463EFD6E2867E0DEFBDC09BAEEE8B986A775611AFBBB7D110480.GeneratedTextTransformation' does not contain a definition for 'Host'
and no extension method 'Host' accepting a first argument of type 'Microsoft.VisualStudio.TextTemplatingBED07DAE3B6FD53FA947017E5A5F7A123173F8AEEBD8059AD94FFEA4200EC409BE022035F5E3463EFD6E2867E0DEFBDC09BAEEE8B986A775611AFBBB7D110480.GeneratedTextTransformation'
could be found (are you missing a using directive or an assembly reference?)
e:\Projects\XYX\XYX.Server\MarketDataModuleClientInterface\api.helper.tt
24 50
IMarketDataModuleClientlLibrary
其实问题很简单:
<#@ template hostspecific="true" language="C#" #>
<#@ output extension=".txt" #>
<#@ import namespace="System.CodeDom.Compiler" #>
<#
string message = "test message";
this.Host.LogErrors(new CompilerErrorCollection()
{ new CompilerError(
this.Host.TemplateFile, // Identify the source of the error.
0, 0, "0", // Line, column, error ID.
message) }); // Message displayed in error window.
#>
注意第一行: hostspecific="true"
如果是 false就会出现最前面的那个错误
Template Code 无法使用 this.Host 报错的更多相关文章
- Django_重装系统后无法使用 sqlite 数据库报错:com.intellij.execution.ExecutionException: Exception in thread "main" java.lang.ClassNotFoundException: org.sqlite.JDBC
重装系统后无法使用 sqlite 数据库报错 报错 : com.intellij.execution.ExecutionException: Exception in thread "ma ...
- vs code调试console程序报错--preLaunchTask“build”
网上有其他大神给出的建议是注释掉launch.json中的 "preLaunchTask": "build", 但是这种方式也会造成一个问题,就是再使用F5调试 ...
- django.template.exceptions.TemplateDoesNotExist: login.html报错
前言 在某一次按以前的步骤使用Django “django.template.exceptions.TemplateDoesNotExist: login.html”错误,在以为是html文件出 ...
- Code::Blocks20.03 编译报错
Code::Blocks最近出了新版20.03,进入官网选择下载了附带MinGW版的安装包后,编译HelloWorld就报错(CB一直以来都有问题,新版还是这样...) 主要有两个问题: ld.exe ...
- Visual Studio Code 使用 Git插件报错 - Permission denied (publickey)
在使用GitHub的时候,为了避免每次输入用户名密码,都会使用SSH方式代替Https. 按网上教程,大多数使用SSH-KeyGen生成公私钥对,而后上传公钥至Github,并切换Repositori ...
- 使用Visual Studio Code调试React Native报错
报错信息: [Error] Error: Unknown error: not all success patterns were matched. It means that "react ...
- 'Error Domain=NSURLErrorDomain Code=-999' AFNetworking请求报错
早上请求app请求登录接口发现了下面的错误信息: Error Domain=NSURLErrorDomain Code=-999 "已取消" UserInfo={NSErrorFa ...
- python3 无法使用flask.ext.* 报错的解决方法
python3 使用flask的一些扩展功能的导入方法是 from flask_bootstrap import Bootstrapfrom flask_moment import Momentfro ...
- 执行opatch apply 报错 OPatch failed with error code 73
.执行opatch apply 报错 OPatch failed [oracle@ora_11g 14275605]$ /opt/oracle/product/db_1/OPatch/opatch a ...
随机推荐
- Meteor 从一个列表页进入详情页怎样高速显示详情
无论是做android开发,还是做网页web开发,都 会有列表,都须要点击列表进入列表项的详情页面,查看具体信息,能常情况下,我们都是将这一列表项的id传到详情页,由详情页再到数据库查询具体信息. 在 ...
- Indri和Terrier搜索引擎的使用
介绍 Indri和Terrier都是开源的搜索引擎,当中Indri作为Lemur项目的一个重要部分,具有强大的查询接口,易建索引,可扩展,高效率等长处.能够在SourceForge Lemur Pro ...
- poj2406--Power Strings(kmp:求循环串的次数)
Power Strings Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 33163 Accepted: 13784 D ...
- Codeforces 558C Amr and Chemistry
题意: n个数.每次能够选一个数 让其 *=2 或者 /=2 问至少操作多少次使得全部数相等. 思路: 对于每一个数,计算出这个数能够变成哪些数,以及变成那个数的最小步数,用两个数组保存 cnt[i] ...
- 《ASP.NET》数据绑定—DataList
DataList控件是.NET中的一个控件.DataList控件以表的形式呈现数据(在属性生成器中能够编辑),通过该控件,您能够使用不同的布局来显示数据记录(使用模板编辑).比如,将数据记录排成列或行 ...
- sessionFactory的创建和四种查询方式
1,关于sessionFactory的创建 5.0版本之前,下面这种方式在5.0及之后,可能会出问题,建议修改为5.0之后的方式 // 实例化Configuration Configuration c ...
- Golang 现有的哲学中,要求你尽量手工处理所有的错误返回
更优雅的 Golang 错误处理 - Go语言中文网 - Golang中文社区 https://studygolang.com/articles/9407
- Python 中的字节与字节数组
Python 中的字节与字节数组 - Python - 伯乐在线 http://python.jobbole.com/84839/
- Android开发环境搭建时遇到问题的解决方法
版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/linux_loajie/article/details/33823637 Android开发环境搭建 ...
- Latex 5: LaTeX资料下载
转: LaTeX资料下载 最全latex资料下载 LaTeX命令速查手册1