T4 code generation during build, custom assembly reference

我怕爱的太早我们不能终老 提交于 2019-12-05 03:47:37

I don't see where $(OutputPath) is defined by visual studio. did you try $(TargetDir) in your item w/in your project? Then you can remove the $(TargetDir)\ from your Assembly declaration in the T4 file.

I just worked through a slew of possibilities to get something similar to work, will be doing a blog post today or tomorrow.

So:

<ItemGroup>
    <T4ReferencePath Include="$(TargetDir)" />
</ItemGroup>

in your csproj, and

<#@ assembly name="MyDependency.dll" #>

in your T4 file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!