Created
November 8, 2017 22:37
-
-
Save zhilich/962b79a04a13e5daebb49585c33d92b7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- | |
@author: Raman Zhylich ([email protected]) | |
This project configures IISExpress in Visual Studio. | |
--> | |
<PropertyGroup> | |
<BuildDependsOn> | |
ConfigureIISExpress; | |
$(BuildDependsOn); | |
</BuildDependsOn> | |
<ApplicationHostConfig>$(SolutionDir).vs\config\applicationhost.config</ApplicationHostConfig> | |
</PropertyGroup> | |
<!-- Automatically configures IISExpress in Visual Studio. Updates virtual directory path in applicationhost.config to point to IISROOT --> | |
<Target Name="ConfigureIISExpress" Condition="Exists('$(ApplicationHostConfig)')"> | |
<PropertyGroup> | |
<VirtualDirectoryPath>$([System.IO.Path]::GetFullPath('$(SolutionDir)..\IISROOT'))</VirtualDirectoryPath> | |
</PropertyGroup> | |
<FileUpdate Files="$(ApplicationHostConfig)" | |
Regex="physicalPath="[^"]+"" | |
ReplacementText="physicalPath="$(VirtualDirectoryPath)"" /> | |
<Touch Files="$(ApplicationHostConfig)" ContinueOnError="True" Time="01/01/2000" /> | |
</Target> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment