Call Visual Studio 2017 Task Runner from MSBuild?

做~自己de王妃 提交于 2019-12-24 07:57:46

问题


I am using the Bundler & Minifier VS2017 extension for JavaScript and CSS minification and MSBuild for other components of my ASP.NET 4.0 Web Forms solution. Using Task Runner, I created an "After Build" binding so the minification happens after MSBuild. This extension updates the bundle in real time when source file changes are saved so I would like the extension to do its work only when a Release build is created.

I suppose there is no way to configure the binding so it only activates for a Release build so instead, is it possible to call Task Runner from MSBuild? Maybe something like:

<Exec Condition="'$(Configuration)' == 'Release'" Command="<Task Runner Command Here>" />

Also, besides the Visual Studio Marketplace page for the previous release and this blog page, is there any real documentation for the Task Runner that is included in VS2017?

UPDATE: I found this CLI WIKI & this article but when I install NuGet pkg I get "Could not install package 'BundlerMinifier.Core 2.0.238'. You are trying to install this pkg into a project that targets .NETFramework,Ver=v4.0" This approach not viable for a 4.0 target Web Forms solution? Not sure why it matters since minify happens at build time and not runtime.

来源:https://stackoverflow.com/questions/43324556/call-visual-studio-2017-task-runner-from-msbuild

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