admin管理员组文章数量:1123011
I've written custom msbuild content to run a T4 generation task. It's half-working; the biggest problem currently is that Visual Studio fails to invoke msbuild when dependent inputs change. This occurs both in the presence and absence of AccelerateBuildsInVisualStudio
.
Rebuild always works.
I tried to follow these guides, to no avail:
- Item metadata in task batching
- Build incrementally
After the first build (or any rebuild) and one of the .tt
files is modified, the only output on subsequent build is
========== Build: 0 succeeded, 0 failed, 2 up-to-date, 0 skipped ==========
The msbuild content responsible for the custom item group and task is
<ItemGroup>
<ProjectReference Include="..\Common\Common.csproj">
<Private>False</Private>
<ReferenceOutputAssembly>True</ReferenceOutputAssembly>
</ProjectReference>
<CppTemplates Include="Cpp\*.tt">
<Ext>h</Ext>
</CppTemplates>
<!-- will add other languages -->
<Templates Include="@(CppTemplates)" />
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent" Inputs="@(Templates)"
Outputs="@(Templates->'$(T4OutputDir)\%(Filename).%(Ext)')">
<MakeDir Directories="$(T4OutputDir)" />
<Exec Command="$(T4Command) -out @(Templates->'$(T4OutputDir)\%(Filename).%(Ext)') %(Templates.Identity)" />
</Target>
本文标签: Custom msbuild target doesn39t detect file changesStack Overflow
版权声明:本文标题:Custom msbuild target doesn't detect file changes - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736540704a1944383.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论