Convert Database projects so they build installable Packages rather than deploy to bin and modify installation to deploy Databases on demand as needed.

This commit is contained in:
Charles Nurse
2021-05-20 12:39:09 -07:00
parent 4474d49c6a
commit 47c04dc150
81 changed files with 434 additions and 143 deletions

View File

@ -1,15 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>1.0.0</Version>
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
<PackageName>$(MSBuildProjectName).$(Version).nupkg</PackageName>
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.4" />
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>bin</OutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Oqtane.Shared\Oqtane.Shared.csproj" />
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>bin</OutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Oqtane.Server\Oqtane.Server.csproj" />
</ItemGroup>
<Target Name="CopyPackage" AfterTargets="Pack">
<Copy SourceFiles="$(OutputPath)..\$(PackageName)" DestinationFiles="..\Oqtane.Server\wwwroot\Packages\$(PackageName).bak" />
</Target>
</Project>