Created
March 12, 2017 12:49
-
-
Save matthewrwilton/0e17346f7118fe39eebe311853abad79 to your computer and use it in GitHub Desktop.
Example of Exec task usage to compile ASP.NET razor views and exclude the node_modules folder.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
... | |
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'"> | |
<Exec Command="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v temp -p $(WebProjectOutputDir) -x node_modules"/> | |
</Target> | |
... | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for this. This helped me a lot. However, I changed the hardcoded path to "$(FrameworkDir)$(FrameworkVersion)\aspnet_compiler.exe"