Harrison Deng
ced027da17
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit
96 lines
4.9 KiB
XML
96 lines
4.9 KiB
XML
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
<!-- https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props for more information. -->
|
|
<!-- Publish arguments: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish -->
|
|
<!-- Single file docs: https://docs.microsoft.com/en-us/dotnet/core/deploying/single-file/overview -->
|
|
<PropertyGroup>
|
|
<TargetFramework>net8.0</TargetFramework>
|
|
<PublishSingleFile>true</PublishSingleFile>
|
|
<SelfContained>true</SelfContained>
|
|
<PublishTrimmed>false</PublishTrimmed>
|
|
<PublishReadyToRun>true</PublishReadyToRun>
|
|
<InvariantGlobalization>true</InvariantGlobalization>
|
|
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
|
|
<UserSecretsId>aspnet-Props-20A2A991-EC61-4C06-91D2-953482026A7B</UserSecretsId>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<None Update="app.db" CopyToOutputDirectory="PreserveNewest" ExcludeFromSingleFile="true" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.1" />
|
|
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.1" />
|
|
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.1" />
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.1">
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
<PrivateAssets>all</PrivateAssets>
|
|
</PackageReference>
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="6.0.1" />
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.1" />
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.1" />
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.1">
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
<PrivateAssets>all</PrivateAssets>
|
|
</PackageReference>
|
|
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.1" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\Props.Shop\Framework\Props.Shop.Framework.csproj" />
|
|
</ItemGroup>
|
|
|
|
<!-- Removing ASP.Net Core Identity static content -->
|
|
<!-- See https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity?view=aspnetcore-6.0&tabs=visual-studio#prevent-publish-of-static-identity-assets -->
|
|
<PropertyGroup>
|
|
<ResolveStaticWebAssetsInputsDependsOn>RemoveIdentityAssets</ResolveStaticWebAssetsInputsDependsOn>
|
|
</PropertyGroup>
|
|
<Target Name="RemoveIdentityAssets">
|
|
<ItemGroup>
|
|
<StaticWebAsset Remove="@(StaticWebAsset)" Condition="%(SourceId) == 'Microsoft.AspNetCore.Identity.UI'" />
|
|
</ItemGroup>
|
|
</Target>
|
|
|
|
<!-- For embedding content into single file. -->
|
|
<ItemGroup>
|
|
<Content Remove="wwwroot\**" />
|
|
<None Include="wwwroot\**" ExcludeFromSingleFile="false">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
<!-- Ignore client-side asset compilation configuration. -->
|
|
<Content Remove="package.json" />
|
|
<Content Remove="package-lock.json" />
|
|
</ItemGroup>
|
|
|
|
<!-- Modules for all the shops. -->
|
|
<ItemGroup>
|
|
<None Update="shops\**\*" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" ExcludeFromSingleFile="true" />
|
|
</ItemGroup>
|
|
|
|
<!-- Watch configurations. -->
|
|
<ItemGroup>
|
|
<Watch Include="assets\**\*.js;assets\**\*.scss" Exclude="wwwroot\**\*;node_modules\**\*;**\*.js.map;obj\**\*;bin\**\*" />
|
|
</ItemGroup>
|
|
|
|
|
|
<!-- Ensure Node.js is installed -->
|
|
<Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" !Exists('node_modules') ">
|
|
<Exec Command="node --version" ContinueOnError="false">
|
|
<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="./" Command="npm install" />
|
|
</Target>
|
|
|
|
<!-- Build static resources -->
|
|
<Target Name="BuildWebpack" BeforeTargets="Build">
|
|
<Message Importance="high" Text="Building client-side assets..." />
|
|
<Exec Command="npm run build:dev" Condition=" '$(Configuration)' == 'Debug' " LogStandardErrorAsError="true">
|
|
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
|
|
</Exec>
|
|
<Exec Command="npm run build:prod" Condition=" '$(Configuration)' == 'Release' " LogStandardErrorAsError="true">
|
|
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
|
|
</Exec>
|
|
<Error Condition="'$(ErrorCode)' != '0'" Text="There was an issue attempting to build the static assets. To continue, fix client-side asset errors and try again." />
|
|
</Target>
|
|
</Project> |