Skip to content

Commit e310e04

Browse files
authored
Cleanup project files (#156)
* Clean up project files * Include package specific props * Add Package License URL
1 parent 7b7caf9 commit e310e04

File tree

7 files changed

+74
-88
lines changed

7 files changed

+74
-88
lines changed

API/API.csproj

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
<Import Project="../Shared.props" />
23

34
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
5-
<Nullable>enable</Nullable>
6-
<ImplicitUsings>enable</ImplicitUsings>
7-
<AssemblyName>OpenShock.API</AssemblyName>
8-
<RootNamespace>OpenShock.API</RootNamespace>
9-
<AssemblyVersion>3.10.3</AssemblyVersion>
105
<GenerateDocumentationFile>true</GenerateDocumentationFile>
11-
<Company>OpenShock</Company>
12-
<Product>API</Product>
13-
<UserSecretsId>a2109c1e-fb11-44d7-8127-346ef60cb9a5</UserSecretsId>
146
</PropertyGroup>
157

168
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
17-
<NoWarn>1701;1702;IL2121;1591</NoWarn>
9+
<NoWarn>1701;1702;IL2121;1591</NoWarn>
1810
</PropertyGroup>
1911

2012
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
21-
<NoWarn>1701;1702;IL2121;1591</NoWarn>
13+
<NoWarn>1701;1702;IL2121;1591</NoWarn>
2214
</PropertyGroup>
2315

2416
<ItemGroup>
@@ -69,11 +61,10 @@
6961
<ProjectReference Include="..\Common\Common.csproj" />
7062
<None Include="devcert.pfx" CopyToPublishDirectory="Always" />
7163
<None Update="SmtpTemplates\PasswordReset.liquid">
72-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
64+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
7365
</None>
7466
<None Update="SmtpTemplates\EmailVerification.liquid">
7567
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
7668
</None>
7769
</ItemGroup>
78-
7970
</Project>

Common.Tests/Common.Tests.csproj

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,23 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="../Shared.props" />
23

3-
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
5-
<ImplicitUsings>enable</ImplicitUsings>
6-
<Nullable>enable</Nullable>
7-
<AssemblyName>OpenShock.Common.Tests</AssemblyName>
8-
<RootNamespace>OpenShock.Common.Tests</RootNamespace>
9-
<Company>OpenShock</Company>
10-
<Product>OpenShock.Common.Tests</Product>
11-
</PropertyGroup>
4+
<ItemGroup>
5+
<PackageReference Include="Testcontainers" Version="4.1.0" />
6+
<PackageReference Include="Testcontainers.PostgreSql" Version="4.1.0" />
7+
<PackageReference Include="Testcontainers.Redis" Version="4.1.0" />
8+
<PackageReference Include="TUnit" Version="0.10.4" />
9+
</ItemGroup>
1210

13-
<ItemGroup>
14-
<PackageReference Include="Testcontainers.PostgreSql" Version="4.1.0" />
15-
<PackageReference Include="Testcontainers.Redis" Version="4.1.0" />
16-
<PackageReference Include="TUnit" Version="0.10.4" />
17-
</ItemGroup>
18-
19-
<ItemGroup>
20-
<ProjectReference Include="..\Common\Common.csproj" />
21-
</ItemGroup>
22-
23-
<ItemGroup>
24-
<None Update="Validation\DataSets\BlackList.txt">
25-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
26-
</None>
27-
<None Update="Validation\DataSets\WhiteList.txt">
28-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
29-
</None>
30-
</ItemGroup>
11+
<ItemGroup>
12+
<ProjectReference Include="..\Common\Common.csproj" />
13+
</ItemGroup>
3114

15+
<ItemGroup>
16+
<None Update="Validation\DataSets\BlackList.txt">
17+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
18+
</None>
19+
<None Update="Validation\DataSets\WhiteList.txt">
20+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
21+
</None>
22+
</ItemGroup>
3223
</Project>

Common/Common.csproj

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
<Import Project="../Shared.props" />
23

34
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
5-
<ImplicitUsings>enable</ImplicitUsings>
6-
<Nullable>enable</Nullable>
7-
<AssemblyName>OpenShock.Common</AssemblyName>
8-
<RootNamespace>OpenShock.Common</RootNamespace>
9-
<Company>OpenShock</Company>
10-
<Product>OpenShock.Common</Product>
11-
<AssemblyVersion>3.1.0</AssemblyVersion>
12-
<FileVersion>3.1.0</FileVersion>
135
<OutputType>Library</OutputType>
146
</PropertyGroup>
157

168
<ItemGroup>
179
<PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
1810
<PackageReference Include="IDisposableAnalyzers" Version="4.0.8">
19-
<PrivateAssets>all</PrivateAssets>
20-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
11+
<PrivateAssets>all</PrivateAssets>
12+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2113
</PackageReference>
2214
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.1" />
2315
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.1">
@@ -54,5 +46,4 @@
5446
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="7.2.0" />
5547
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="9.103.7" />
5648
</ItemGroup>
57-
5849
</Project>

Cron/Cron.csproj

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
2-
3-
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
5-
<Nullable>enable</Nullable>
6-
<ImplicitUsings>enable</ImplicitUsings>
7-
<AssemblyName>OpenShock.Cron</AssemblyName>
8-
<RootNamespace>OpenShock.Cron</RootNamespace>
9-
<Company>OpenShock</Company>
10-
<AssemblyVersion>3.10.3</AssemblyVersion>
11-
<UserSecretsId>a2109c1e-fb11-44d7-8127-346ef60cb9a5</UserSecretsId>
12-
</PropertyGroup>
2+
<Import Project="../Shared.props" />
133

144
<ItemGroup>
155
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.17" />
@@ -18,12 +8,12 @@
188
</ItemGroup>
199

2010
<ItemGroup>
21-
<ProjectReference Include="..\Common\Common.csproj" />
11+
<ProjectReference Include="..\Common\Common.csproj" />
2212
</ItemGroup>
2313

2414
<ItemGroup>
25-
<None Update="devcert.pfx">
26-
<CopyToPublishDirectory>Always</CopyToPublishDirectory>
27-
</None>
15+
<None Update="devcert.pfx">
16+
<CopyToPublishDirectory>Always</CopyToPublishDirectory>
17+
</None>
2818
</ItemGroup>
2919
</Project>

LiveControlGateway/LiveControlGateway.csproj

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
2-
2+
<Import Project="../Shared.props" />
3+
34
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
5-
<Nullable>enable</Nullable>
6-
<ImplicitUsings>enable</ImplicitUsings>
7-
<AssemblyName>OpenShock.LiveControlGateway</AssemblyName>
8-
<RootNamespace>OpenShock.LiveControlGateway</RootNamespace>
9-
<Company>OpenShock</Company>
10-
<AssemblyVersion>3.10.3</AssemblyVersion>
11-
<Product>LiveControlGateway</Product>
125
<GenerateDocumentationFile>true</GenerateDocumentationFile>
13-
<UserSecretsId>a2109c1e-fb11-44d7-8127-346ef60cb9a5</UserSecretsId>
146
</PropertyGroup>
157

168
<ItemGroup>
@@ -39,14 +31,13 @@
3931
</Target>
4032

4133
<ItemGroup>
42-
<ProjectReference Include="..\Common\Common.csproj" />
43-
<FlatSharpSchema Include="Serialization\**\*.fbs" />
34+
<ProjectReference Include="..\Common\Common.csproj" />
35+
<FlatSharpSchema Include="Serialization\**\*.fbs" />
4436
</ItemGroup>
4537

4638
<ItemGroup>
47-
<None Update="devcert.pfx">
39+
<None Update="devcert.pfx">
4840
<CopyToPublishDirectory>Always</CopyToPublishDirectory>
49-
</None>
41+
</None>
5042
</ItemGroup>
51-
52-
</Project>
43+
</Project>
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="../Shared.props" />
23

34
<PropertyGroup>
45
<OutputType>Exe</OutputType>
5-
<TargetFramework>net9.0</TargetFramework>
6-
<ImplicitUsings>enable</ImplicitUsings>
7-
<Nullable>enable</Nullable>
86
</PropertyGroup>
97

108
<ItemGroup>
11-
<ProjectReference Include="..\Common\Common.csproj" />
9+
<ProjectReference Include="..\Common\Common.csproj" />
1210
</ItemGroup>
13-
1411
</Project>

Shared.props

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<Project>
2+
<PropertyGroup>
3+
<Company>OpenShock</Company>
4+
<Product>$(Company).$(MSBuildProjectName)</Product>
5+
<Version>3.10.3</Version>
6+
7+
<RepositoryUrl>https://github.com/OpenShock/API</RepositoryUrl>
8+
<PackageReadmeFile>README.md</PackageReadmeFile>
9+
<PackageLicenseFile>LICENSE</PackageLicenseFile>
10+
<PackageLicenseUrl>$(RepositoryUrl)/LICENSE</PackageLicenseUrl>
11+
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
12+
</PropertyGroup>
13+
14+
<ItemGroup>
15+
<None Include="../README.md">
16+
<Pack>True</Pack>
17+
<PackagePath>\</PackagePath>
18+
</None>
19+
<None Include="../LICENSE">
20+
<Pack>True</Pack>
21+
<PackagePath>\</PackagePath>
22+
</None>
23+
</ItemGroup>
24+
25+
<PropertyGroup>
26+
<TargetFramework>net9.0</TargetFramework>
27+
<ImplicitUsings>enable</ImplicitUsings>
28+
<Nullable>enable</Nullable>
29+
<AssemblyName>$(Product)</AssemblyName>
30+
<RootNamespace>$(Product.Replace(" ", "_"))</RootNamespace>
31+
<AssemblyVersion>$(Version)</AssemblyVersion>
32+
<FileVersion>$(Version)</FileVersion>
33+
<UserSecretsId>a2109c1e-fb11-44d7-8127-346ef60cb9a5</UserSecretsId>
34+
</PropertyGroup>
35+
</Project>

0 commit comments

Comments
 (0)