如何在代码中使用$ safeprojectname $和其他代码? [英] How can i use $safeprojectname$ and others in my code?
问题描述
我正在尝试为c#和代码所在的名称空间声明创建项目模板:
I am trying to create a project template for c# and on the decalaration of the namespace where the code is this:
namespace $safeprojectname$
IDE会出现此错误:名称空间不能直接包含诸如字段或方法之类的成员.
the IDE gives this error: A namespace cannot directly contain members such as fields or methods.
我不明白为什么会出现此错误,因为恰好 告诉您在这里做什么:https://msdn.microsoft.com/en-us/library/eehb4faa.aspx
I don't understand why this error appears because this is exactly what is tells you to do here: https://msdn.microsoft.com/en-us/library/eehb4faa.aspx
请有人能指出我正确的方向吗?
Please can someone point me in the right direction?
非常感谢.
以撒.
推荐答案
艾萨克,
您是否忘记设置了 ReplaceParameters属性 是真的,在.vstemplate中?
Did you forget to set the ReplaceParameters attribute to true, in the .vstemplate?
此致
这篇关于如何在代码中使用$ safeprojectname $和其他代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!