2020-11-30 19:16:20 +01:00
<Project Sdk= "Microsoft.NET.Sdk.Web" >
<PropertyGroup >
<TargetFramework > net5.0</TargetFramework>
<TypeScriptCompileBlocked > true</TypeScriptCompileBlocked>
<TypeScriptToolsVersion > Latest</TypeScriptToolsVersion>
<IsPackable > false</IsPackable>
<SpaRoot > ClientApp\</SpaRoot>
<DefaultItemExcludes > $(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
<!-- Set this to true if you enable server - side prerendering -->
<BuildServerSideRenderer > false</BuildServerSideRenderer>
</PropertyGroup>
2020-12-06 16:28:16 +01:00
<PropertyGroup Condition= "'$(Configuration)|$(Platform)'=='Debug|AnyCPU'" >
<DocumentationFile > SessionCompanion.xml</DocumentationFile>
</PropertyGroup>
2020-11-30 19:16:20 +01:00
<ItemGroup >
2020-12-06 11:28:57 +01:00
<PackageReference Include= "AutoMapper" Version= "10.1.1" />
<PackageReference Include= "AutoMapper.Extensions.Microsoft.DependencyInjection" Version= "8.1.0" />
2020-11-30 19:16:20 +01:00
<PackageReference Include= "Microsoft.AspNetCore.SpaServices.Extensions" Version= "5.0.0" />
2020-12-03 17:13:17 +01:00
<PackageReference Include= "Microsoft.EntityFrameworkCore" Version= "5.0.0" />
<PackageReference Include= "Microsoft.EntityFrameworkCore.Design" Version= "5.0.0" >
<PrivateAssets > all</PrivateAssets>
<IncludeAssets > runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
2020-12-06 16:28:16 +01:00
<PackageReference Include= "Swashbuckle.AspNetCore" Version= "5.6.3" />
<PackageReference Include= "Swashbuckle.AspNetCore.SwaggerUI" Version= "5.6.3" />
2020-11-30 19:16:20 +01:00
</ItemGroup>
<ItemGroup >
<!-- Don't publish the SPA source files, but do show them in the project files list -->
<Content Remove= "$(SpaRoot)**" />
<None Remove= "$(SpaRoot)**" />
<None Include= "$(SpaRoot)**" Exclude= "$(SpaRoot)node_modules\**" />
</ItemGroup>
2020-12-01 20:18:09 +01:00
<ItemGroup >
<Folder Include= "Controllers\" />
</ItemGroup>
2020-12-03 17:13:17 +01:00
<ItemGroup >
<ProjectReference Include= "..\SessionCompanion.Database\SessionCompanion.Database.csproj" />
2020-12-10 15:28:00 +01:00
<ProjectReference Include= "..\SessionCompanion.Extensions\SessionCompanion.Extensions.csproj" />
2020-12-05 21:58:45 +01:00
<ProjectReference Include= "..\SessionCompanion.Services\SessionCompanion.Services.csproj" />
2020-12-03 21:30:34 +01:00
<ProjectReference Include= "..\SessionCompanion.ViewModels\SessionCompanion.ViewModels.csproj" />
2020-12-03 17:13:17 +01:00
</ItemGroup>
2020-11-30 19:16:20 +01:00
<Target Name= "DebugEnsureNodeEnv" BeforeTargets= "Build" Condition= " '$(Configuration)' == 'Debug' And !Exists('$(SpaRoot)node_modules') " >
<!-- Ensure Node.js is installed -->
<Exec Command= "node --version" ContinueOnError= "true" >
<Output TaskParameter= "ExitCode" PropertyName= "ErrorCode" />
</Exec>
<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." />
<Message Importance= "high" Text= "Restoring dependencies using 'npm'. This may take several minutes..." />
<Exec WorkingDirectory= "$(SpaRoot)" Command= "npm install" />
</Target>
<Target Name= "PublishRunWebpack" AfterTargets= "ComputeFilesToPublish" >
<!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
<Exec WorkingDirectory= "$(SpaRoot)" Command= "npm install" />
<Exec WorkingDirectory= "$(SpaRoot)" Command= "npm run build -- --prod" />
<Exec WorkingDirectory= "$(SpaRoot)" Command= "npm run build:ssr -- --prod" Condition= " '$(BuildServerSideRenderer)' == 'true' " />
<!-- Include the newly - built files in the publish output -->
<ItemGroup >
<DistFiles Include= "$(SpaRoot)dist\**; $(SpaRoot)dist-server\**" />
<DistFiles Include= "$(SpaRoot)node_modules\**" Condition= "'$(BuildServerSideRenderer)' == 'true'" />
<ResolvedFileToPublish Include= "@(DistFiles->'%(FullPath)')" Exclude= "@(ResolvedFileToPublish)" >
<RelativePath > %(DistFiles.Identity)</RelativePath>
<CopyToPublishDirectory > PreserveNewest</CopyToPublishDirectory>
<ExcludeFromSingleFile > true</ExcludeFromSingleFile>
</ResolvedFileToPublish>
</ItemGroup>
</Target>
</Project>