aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Timeline.csproj
diff options
context:
space:
mode:
Diffstat (limited to 'Timeline/Timeline.csproj')
-rw-r--r--Timeline/Timeline.csproj112
1 files changed, 79 insertions, 33 deletions
diff --git a/Timeline/Timeline.csproj b/Timeline/Timeline.csproj
index 739f79dd..8231cfa8 100644
--- a/Timeline/Timeline.csproj
+++ b/Timeline/Timeline.csproj
@@ -4,8 +4,16 @@
<UserSecretsId>1f6fb74d-4277-4bc0-aeea-b1fc5ffb0b43</UserSecretsId>
<Authors>crupest</Authors>
+ <IsPackable>false</IsPackable>
+
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
+
+ <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
+ <TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
+ <SpaRoot>ClientApp\</SpaRoot>
+
+ <DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
</PropertyGroup>
<ItemGroup>
@@ -17,25 +25,63 @@
<ItemGroup>
<PackageReference Include="AutoMapper" Version="9.0.0" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="7.0.0" />
- <PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
+ <PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="3.1.4" />
+ <PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
- <PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.2" />
- <PackageReference Include="Microsoft.EntityFrameworkCore.Analyzers" Version="3.1.2" />
- <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.2" />
- <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.2">
+ <PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.4" />
+ <PackageReference Include="Microsoft.EntityFrameworkCore.Analyzers" Version="3.1.4" />
+ <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.4" />
+ <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
- <PackageReference Include="SixLabors.ImageSharp" Version="1.0.0-unstable0934" />
- <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.6.0" />
+ <PackageReference Include="SixLabors.ImageSharp" Version="1.0.0-rc0001" />
+ <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.6.0" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\Timeline.ErrorCodes\Timeline.ErrorCodes.csproj" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\Timeline.ErrorCodes\Timeline.ErrorCodes.csproj" />
+ <!-- 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>
+ <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." />
+ <Exec Command="yarn --version" ContinueOnError="true">
+ <Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
+ </Exec>
+ <Error Condition="'$(ErrorCode)' != '0'" Text="Yarn is required to build and run this project. To continue, please install yarn from https://yarnpkg.com/, and then restart your command prompt or IDE." />
+ <Message Importance="high" Text="Restoring dependencies using 'yarn'. This may take several minutes..." />
+ <Exec WorkingDirectory="$(SpaRoot)" Command="yarn" />
+ </Target>
+
+ <Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
+ <!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
+ <Exec WorkingDirectory="$(SpaRoot)" Command="yarn" />
+ <Exec WorkingDirectory="$(SpaRoot)" Command="yarn run build" />
+
+ <!-- Include the newly-built files in the publish output -->
+ <ItemGroup>
+ <DistFiles Include="$(SpaRoot)dist\**" />
+ <ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
+ <RelativePath>%(DistFiles.Identity)</RelativePath>
+ <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
+ <ExcludeFromSingleFile>true</ExcludeFromSingleFile>
+ </ResolvedFileToPublish>
+ </ItemGroup>
+ </Target>
+
<ItemGroup>
<Compile Update="Resources\Authentication\AuthHandler.Designer.cs">
<DesignTime>True</DesignTime>
@@ -43,9 +89,9 @@
<DependentUpon>AuthHandler.resx</DependentUpon>
</Compile>
<Compile Update="Resources\Controllers\ControllerAuthExtensions.Designer.cs">
- <DesignTime>True</DesignTime>
- <AutoGen>True</AutoGen>
- <DependentUpon>ControllerAuthExtensions.resx</DependentUpon>
+ <DesignTime>True</DesignTime>
+ <AutoGen>True</AutoGen>
+ <DependentUpon>ControllerAuthExtensions.resx</DependentUpon>
</Compile>
<Compile Update="Resources\Controllers\TimelineController.Designer.cs">
<DesignTime>True</DesignTime>
@@ -73,9 +119,9 @@
<DependentUpon>Filters.resx</DependentUpon>
</Compile>
<Compile Update="Resources\Helper\DataCacheHelper.Designer.cs">
- <DesignTime>True</DesignTime>
- <AutoGen>True</AutoGen>
- <DependentUpon>DataCacheHelper.resx</DependentUpon>
+ <DesignTime>True</DesignTime>
+ <AutoGen>True</AutoGen>
+ <DependentUpon>DataCacheHelper.resx</DependentUpon>
</Compile>
<Compile Update="Resources\Messages.Designer.cs">
<DesignTime>True</DesignTime>
@@ -103,9 +149,9 @@
<DependentUpon>Validator.resx</DependentUpon>
</Compile>
<Compile Update="Resources\Services\DataManager.Designer.cs">
- <DesignTime>True</DesignTime>
- <AutoGen>True</AutoGen>
- <DependentUpon>DataManager.resx</DependentUpon>
+ <DesignTime>True</DesignTime>
+ <AutoGen>True</AutoGen>
+ <DependentUpon>DataManager.resx</DependentUpon>
</Compile>
<Compile Update="Resources\Services\Exception.Designer.cs">
<DesignTime>True</DesignTime>
@@ -113,9 +159,9 @@
<DependentUpon>Exception.resx</DependentUpon>
</Compile>
<Compile Update="Resources\Services\TimelineService.Designer.cs">
- <DesignTime>True</DesignTime>
- <AutoGen>True</AutoGen>
- <DependentUpon>TimelineService.resx</DependentUpon>
+ <DesignTime>True</DesignTime>
+ <AutoGen>True</AutoGen>
+ <DependentUpon>TimelineService.resx</DependentUpon>
</Compile>
<Compile Update="Resources\Services\UserAvatarService.Designer.cs">
<DesignTime>True</DesignTime>
@@ -128,9 +174,9 @@
<DependentUpon>UserService.resx</DependentUpon>
</Compile>
<Compile Update="Resources\Services\UserTokenService.Designer.cs">
- <DesignTime>True</DesignTime>
- <AutoGen>True</AutoGen>
- <DependentUpon>UserTokenService.resx</DependentUpon>
+ <DesignTime>True</DesignTime>
+ <AutoGen>True</AutoGen>
+ <DependentUpon>UserTokenService.resx</DependentUpon>
</Compile>
</ItemGroup>
@@ -140,8 +186,8 @@
<LastGenOutput>AuthHandler.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Controllers\ControllerAuthExtensions.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>ControllerAuthExtensions.Designer.cs</LastGenOutput>
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>ControllerAuthExtensions.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Controllers\TimelineController.resx">
<Generator>ResXFileCodeGenerator</Generator>
@@ -165,8 +211,8 @@
<LastGenOutput>Filters.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Helper\DataCacheHelper.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>DataCacheHelper.Designer.cs</LastGenOutput>
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>DataCacheHelper.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Messages.resx">
<Generator>ResXFileCodeGenerator</Generator>
@@ -189,16 +235,16 @@
<LastGenOutput>Validator.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Services\DataManager.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>DataManager.Designer.cs</LastGenOutput>
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>DataManager.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Services\Exception.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Exception.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Services\TimelineService.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>TimelineService.Designer.cs</LastGenOutput>
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>TimelineService.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Services\UserAvatarService.resx">
<Generator>ResXFileCodeGenerator</Generator>
@@ -209,8 +255,8 @@
<LastGenOutput>UserService.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Services\UserTokenService.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>UserTokenService.Designer.cs</LastGenOutput>
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>UserTokenService.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>