C# 发布Visual Studio 2013之前的ASP.NET MSBuild自定义任务
我正在ASP.NET web应用程序部署的app.ver文件中维护用户显示的应用程序版本号。在发布应用程序之前,我希望能够增加该文件中的版本号 如何挂接到MSBuild以运行在发布之前执行递增操作的任务C# 发布Visual Studio 2013之前的ASP.NET MSBuild自定义任务,c#,asp.net,msbuild,publish,C#,Asp.net,Msbuild,Publish,我正在ASP.NET web应用程序部署的app.ver文件中维护用户显示的应用程序版本号。在发布应用程序之前,我希望能够增加该文件中的版本号 如何挂接到MSBuild以运行在发布之前执行递增操作的任务 谢谢 在web项目中,使用BeforeTargets目标属性添加在发布目标之前执行的 <Target Name="PrePublish" BeforeTargets="Publish"> ... </Target> ... 根据 ... 我试过这个。在.
谢谢 在web项目中,使用BeforeTargets目标属性添加在发布目标之前执行的
<Target Name="PrePublish" BeforeTargets="Publish">
...
</Target>
...
根据
...
我试过这个。在.csproj文件末尾的targets Publish和MSDeployPublish之前,两者似乎都没有被调用..可能相关:
<Project>
...
<Target Name="BeforePublish">
<!-- Insert tasks to run before publish here -->
</Target>
<Target Name="AfterPublish">
<!-- Insert tasks to run after publish here -->
</Target>
</Project>