Skip to content
Permalink
Browse files

Include PublishToIIS.pubxml in template

  • Loading branch information...
mythz committed Nov 3, 2017
1 parent eac72d4 commit 185e1e483de937f4ba11a88cb9d6f09dc06453d7
@@ -6,6 +6,7 @@
# Custom
dist/
coverage/
#*.pubxml

# User-specific files
*.suo
@@ -154,7 +155,6 @@ publish/
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj

# Microsoft Azure Web App publish settings. Comment the next line if you want to
@@ -20,7 +20,7 @@ public class MyServices : Service
//Return index.html for unmatched requests so routing is handled on client
public object Any(FallbackForClientRoutes request) =>
new PageResult(Request.GetPage("/"));
//new HttpResult(VirtualFileSources.GetFile("index.html")); //Use instead if index.html is just static HTML
//new HttpResult(VirtualFileSources.GetFile("index.html")); //Use instead if index.html contains just static HTML

public object Any(Hello request)
{
@@ -20,15 +20,15 @@ public AppHost()
/// </summary>
public override void Configure(Container container)
{
Plugins.Add(new TemplatePagesFeature());

SetConfig(new HostConfig
{
DebugMode = AppSettings.Get("DebugMode", false),
WebHostPhysicalPath = MapProjectPath("~/wwwroot"),
AddRedirectParamsToQueryString = true,
UseCamelCase = true,
});

Plugins.Add(new TemplatePagesFeature());
}
}
}
@@ -88,6 +88,9 @@
<DependentUpon>Global.asax</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<None Include="Properties\PublishProfiles\PublishToIIS.pubxml">
<SubType>Designer</SubType>
</None>
<Content Include="Web.config" />
<None Include="Web.Release.config">
<DependentUpon>Web.config</DependentUpon>
@@ -121,22 +124,6 @@
<Content Include="webpack.config.js" />
<Content Include="webpack.config.vendor.js" />
</ItemGroup>
<ItemGroup />
<PropertyGroup>
<CopyAllFilesToSingleFolderForMSDeployDependsOn>
OnPublish;
$(CopyAllFilesToSingleFolderForMSDeployDependsOn);
</CopyAllFilesToSingleFolderForMSDeployDependsOn>
</PropertyGroup>
<Target Name="OnPublish">
<ItemGroup>
<Exec Command="npm run publish" />
<wwwroot Include="wwwroot\**\*" />
<FilesForPackagingFromProject Include="%(wwwroot.Identity)">
<DestinationRelativePath>wwwroot\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<MSDeployServiceURL>MyApp.example.org</MSDeployServiceURL>
<DeployIisAppPath>MyApp</DeployIisAppPath>
<UserName>deploy</UserName>
<_SavePWD>True</_SavePWD>
<SiteUrlToLaunchAfterPublish>MyApp.example.org</SiteUrlToLaunchAfterPublish>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<ExcludeApp_Data>False</ExcludeApp_Data>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
</PropertyGroup>
<PropertyGroup>
<CopyAllFilesToSingleFolderForMSDeployDependsOn>
IncludeFiles;
$(CopyAllFilesToSingleFolderForMSDeployDependsOn);
</CopyAllFilesToSingleFolderForMSDeployDependsOn>
</PropertyGroup>
<Target Name="IncludeFiles">
<ItemGroup>
<PublishFiles Include="wwwroot\**\*" />
<FilesForPackagingFromProject Include="@(PublishFiles)">
<DestinationRelativePath>wwwroot\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
</Project>

0 comments on commit 185e1e4

Please sign in to comment.
You can’t perform that action at this time.