Skip to content

Commit

Permalink
workaround publishing issue https://github.com/aspnet/websdk/issues/114
Browse files Browse the repository at this point in the history
  • Loading branch information
jincod committed Mar 6, 2017
1 parent 34e2365 commit 6bd4859
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -195,4 +195,4 @@ ModelManifest.xml
project.lock.json

node_modules
**/wwwroot/bundle.js
**/wwwroot/**/*
13 changes: 10 additions & 3 deletions src/AspNet5DemoApp/AspNet5DemoApp.csproj
Expand Up @@ -10,10 +10,12 @@
<RuntimeFrameworkVersion>1.1.0</RuntimeFrameworkVersion>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;portable-net45+win8</PackageTargetFallback>
<RootNamespace>AspNet5DemoApp</RootNamespace>
<GeneratedItemPatterns>wwwroot/**</GeneratedItemPatterns>
<DefaultItemExcludes>$(DefaultItemExcludes);$(GeneratedItemPatterns)</DefaultItemExcludes>
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<Content Include="wwwroot\**\*;Views\**\*;web.config">
<Content Include="Views\**\*;web.config">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
</ItemGroup>
Expand Down Expand Up @@ -51,13 +53,18 @@
</DotNetCliToolReference>
</ItemGroup>
<ItemGroup>
<Folder Include="obj\Release\netcoreapp1.1" />
<Folder Include="wwwroot" />
</ItemGroup>
<Target Name="PrePublishTarget" BeforeTargets="Publish">
<Target Name="PrePublishTarget" BeforeTargets="PrepareForPublish">
<Exec Command="npm run build" />
<ItemGroup>
<_GeneratedFiles Include="$(GeneratedItemPatterns)" />
<ContentWithTargetPath Include="@(_GeneratedFiles->'%(FullPath)')" RelativePath="%(_GeneratedFiles.Identity)" TargetPath="%(_GeneratedFiles.Identity)" CopyToPublishDirectory="PreserveNewest" />
</ItemGroup>
</Target>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
</Project>
Empty file.

0 comments on commit 6bd4859

Please sign in to comment.