Reputation: 500
I have a question about AspNetCompiler task. My project file has the following code:
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
</Target>
I read this article https://learn.microsoft.com/en-us/aspnet/web-forms/overview/older-versions-getting-started/deploying-web-site-projects/precompiling-your-website-cs to understand why pre-compilation is required and advantages of precompiling a WSP project. These are the drawbacks of automatic compilation:
However, one thing I cannot understand is what is the use of executing this task without specifying "TargetPath"? Where does the task stores the precompiled contents of the WSP project that helps in reducing the delay when an ASP.NET page is requested for the first time after being deployed?
Upvotes: 0
Views: 65
Reputation: 500
I read about ASP Net pre-compilation again and also this article. One of the advantages of using pre-compilation is to identify compile-time bugs on markup code files (.aspx, .ashx) which does not require a targetpath. The targetpath is required only when publishing the the site to remote whe server using visual studio as explained here or to copy the precompiled version from the target location to production environment through some file copy mechanism.
Upvotes: 0