1- <Project ToolsVersion =" 15.0" Sdk =" Microsoft.NET.Sdk.Web" >
1+ <Project Sdk =" Microsoft.NET.Sdk.Web" >
2+
23 <PropertyGroup >
3- <TargetFramework >netcoreapp1.1</TargetFramework >
4+ <TargetFramework Condition =" '$(TargetFrameworkOverride)' == ''" >netcoreapp2.0</TargetFramework >
5+ <TargetFramework Condition =" '$(TargetFrameworkOverride)' != ''" >TargetFrameworkOverride</TargetFramework >
46 <TypeScriptCompileBlocked >true</TypeScriptCompileBlocked >
7+ <TypeScriptToolsVersion >Latest</TypeScriptToolsVersion >
58 <IsPackable >false</IsPackable >
6- <TypeScriptToolsVersion >2.3</TypeScriptToolsVersion >
79 </PropertyGroup >
8- <ItemGroup >
9- <PackageReference Include =" Microsoft.AspNetCore" Version =" 1.1.0" />
10- <PackageReference Include =" Microsoft.AspNetCore.Mvc" Version =" 1.1.1" />
11- <PackageReference Include =" Microsoft.AspNetCore.SpaServices" Version =" 1.1.0" />
12- <PackageReference Include =" Microsoft.AspNetCore.StaticFiles" Version =" 1.1.0" />
13- <PackageReference Include =" Microsoft.Extensions.Logging.Debug" Version =" 1.1.0" />
10+
11+ <ItemGroup Condition =" '$(TargetFrameworkOverride)' == ''" >
12+ <PackageReference Include =" Microsoft.AspNetCore.All" Version =" 2.0.0" />
1413 </ItemGroup >
14+ <ItemGroup Condition =" '$(TargetFrameworkOverride)' != ''" >
15+ <PackageReference Include =" Microsoft.AspNetCore" Version =" 2.0.0" />
16+ <PackageReference Include =" Microsoft.AspNetCore.Mvc" Version =" 2.0.0" />
17+ <PackageReference Include =" Microsoft.AspNetCore.SpaServices" Version =" 2.0.0" />
18+ <PackageReference Include =" Microsoft.AspNetCore.StaticFiles" Version =" 2.0.0" />
19+ </ItemGroup >
20+
1521 <ItemGroup >
16- <!-- Files not to show in IDE -->
17- <None Remove =" yarn.lock" />
22+ <DotNetCliToolReference Include =" Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version =" 2.0.0" />
1823 </ItemGroup >
19- <Target Name =" RunWebpack" AfterTargets =" ComputeFilesToPublish" >
24+
25+ <!-- /-:cnd:noEmit -->
26+ <Target Name =" DebugRunWebpack" BeforeTargets =" Build" Condition =" '$(Configuration)' == 'Debug' And !Exists('wwwroot\dist') " >
27+ <!-- Ensure Node.js is installed -->
28+ <Exec Command =" node --version" ContinueOnError =" true" >
29+ <Output TaskParameter =" ExitCode" PropertyName =" ErrorCode" />
30+ </Exec >
31+ <Error Condition =" '$(ErrorCode)' != '0'" Text =" Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE." />
32+
33+ <!-- In development, the dist files won't exist on the first run or when cloning to
34+ a different machine, so rebuild them if not already present. -->
35+ <Message Importance =" high" Text =" Performing first-run Webpack build..." />
36+ <Exec Command =" node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js" />
37+ <Exec Command =" node node_modules/webpack/bin/webpack.js" />
38+ </Target >
39+ <!-- /+:cnd:noEmit -->
40+
41+ <Target Name =" PublishRunWebpack" AfterTargets =" ComputeFilesToPublish" >
2042 <!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
2143 <Exec Command =" npm install" />
2244 <Exec Command =" node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod" />
3153 </ResolvedFileToPublish >
3254 </ItemGroup >
3355 </Target >
34- </Project >
56+
57+ </Project >
0 commit comments