Skip to content

Commit bee4c6f

Browse files
Stop "dotnet new" from stripping out important parts of .csproj files
1 parent cc85930 commit bee4c6f

File tree

6 files changed

+18
-6
lines changed

6 files changed

+18
-6
lines changed

templates/AngularSpa/AngularSpa.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@
2121
<Content Remove="ClientApp\**" />
2222
</ItemGroup>
2323

24+
<!--/-:cnd:noEmit -->
2425
<Target Name="DebugRunWebpack" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('wwwroot\dist') ">
2526
<!-- In development, the dist files won't exist on the first run or when cloning to
2627
a different machine, so rebuild them if not already present. -->
2728
<Message Importance="high" Text="Performing first-run Webpack build..." />
2829
<Exec Command="node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js" />
2930
<Exec Command="node node_modules/webpack/bin/webpack.js" />
3031
</Target>
31-
32+
<!--/+:cnd:noEmit -->
33+
3234
<Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
3335
<!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
3436
<Exec Command="npm install" />

templates/AureliaSpa/AureliaSpa.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@
1616
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0-*" />
1717
</ItemGroup>
1818

19+
<!--/-:cnd:noEmit -->
1920
<Target Name="DebugRunWebpack" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('wwwroot\dist') ">
2021
<!-- In development, the dist files won't exist on the first run or when cloning to
2122
a different machine, so rebuild them if not already present. -->
2223
<Message Importance="high" Text="Performing first-run Webpack build..." />
2324
<Exec Command="node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js" />
2425
<Exec Command="node node_modules/webpack/bin/webpack.js" />
2526
</Target>
26-
27+
<!--/+:cnd:noEmit -->
28+
2729
<Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
2830
<!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
2931
<Exec Command="npm install" />

templates/KnockoutSpa/KnockoutSpa.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@
1616
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0-*" />
1717
</ItemGroup>
1818

19+
<!--/-:cnd:noEmit -->
1920
<Target Name="DebugRunWebpack" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('wwwroot\dist') ">
2021
<!-- In development, the dist files won't exist on the first run or when cloning to
2122
a different machine, so rebuild them if not already present. -->
2223
<Message Importance="high" Text="Performing first-run Webpack build..." />
2324
<Exec Command="node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js" />
2425
<Exec Command="node node_modules/webpack/bin/webpack.js" />
2526
</Target>
26-
27+
<!--/+:cnd:noEmit -->
28+
2729
<Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
2830
<!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
2931
<Exec Command="npm install" />

templates/ReactReduxSpa/ReactReduxSpa.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@
2121
<Content Remove="ClientApp\**" />
2222
</ItemGroup>
2323

24+
<!--/-:cnd:noEmit -->
2425
<Target Name="DebugRunWebpack" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('wwwroot\dist') ">
2526
<!-- In development, the dist files won't exist on the first run or when cloning to
2627
a different machine, so rebuild them if not already present. -->
2728
<Message Importance="high" Text="Performing first-run Webpack build..." />
2829
<Exec Command="node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js" />
2930
<Exec Command="node node_modules/webpack/bin/webpack.js" />
3031
</Target>
31-
32+
<!--/+:cnd:noEmit -->
33+
3234
<Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
3335
<!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
3436
<Exec Command="npm install" />

templates/ReactSpa/ReactSpa.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@
1616
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0-*" />
1717
</ItemGroup>
1818

19+
<!--/-:cnd:noEmit -->
1920
<Target Name="DebugRunWebpack" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('wwwroot\dist') ">
2021
<!-- In development, the dist files won't exist on the first run or when cloning to
2122
a different machine, so rebuild them if not already present. -->
2223
<Message Importance="high" Text="Performing first-run Webpack build..." />
2324
<Exec Command="node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js" />
2425
<Exec Command="node node_modules/webpack/bin/webpack.js" />
2526
</Target>
26-
27+
<!--/+:cnd:noEmit -->
28+
2729
<Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
2830
<!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
2931
<Exec Command="npm install" />

templates/VueSpa/VueSpa.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@
1616
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0-*" />
1717
</ItemGroup>
1818

19+
<!--/-:cnd:noEmit -->
1920
<Target Name="DebugRunWebpack" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('wwwroot\dist') ">
2021
<!-- In development, the dist files won't exist on the first run or when cloning to
2122
a different machine, so rebuild them if not already present. -->
2223
<Message Importance="high" Text="Performing first-run Webpack build..." />
2324
<Exec Command="node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js" />
2425
<Exec Command="node node_modules/webpack/bin/webpack.js" />
2526
</Target>
26-
27+
<!--/+:cnd:noEmit -->
28+
2729
<Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
2830
<!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
2931
<Exec Command="npm install" />

0 commit comments

Comments
 (0)