Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converts a project to use centralised package management #398

Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,17 @@
"sonarlint.connectedMode.project": {
"connectionId": "guibranco-github",
"projectKey": "guibranco_CrispyWaffle"
}
},
"cSpell.words": [
"choco",
"cobertura",
"CODACY",
"codecov",
"Elmah",
"Fullname",
"lcov",
"opencover",
"pullrequest",
"sonarscanner"
]
}
18 changes: 15 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<Project>
<PropertyGroup Label="SDK Versions">
<DotNetVersions>netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0</DotNetVersions>
<DotNetTestVersion>net8.0</DotNetTestVersion>
</PropertyGroup>

<PropertyGroup Label="NuGet package">
<Authors>Guilherme Branco Stracini</Authors>
<Company>Guilherme Branco Stracini ME</Company>
Expand All @@ -17,6 +22,12 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<PropertyGroup Label="NuGet">
<NuGetAudit>true</NuGetAudit>
<NuGetAuditLevel>low</NuGetAuditLevel>
<NuGetAuditMode>all</NuGetAuditMode>
</PropertyGroup>

<PropertyGroup Label="Build">
<UpdateVersionProperties>true</UpdateVersionProperties>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand All @@ -43,8 +54,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" Condition="$(MSBuildProjectExtension) == '.csproj' And $(IsTestProject) != 'true'" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.25.0.90414" PrivateAssets="all" Condition="$(MSBuildProjectExtension) == '.csproj' And $(IsTestProject) != 'true'" />
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="all" Condition="$(MSBuildProjectExtension) == '.csproj' And $(IsTestProject) != 'true'" />
<PackageReference Include="SonarAnalyzer.CSharp" PrivateAssets="all"
Condition="$(MSBuildProjectExtension) == '.csproj' And $(IsTestProject) != 'true'" />
</ItemGroup>

<ItemGroup>
Expand All @@ -61,4 +73,4 @@
<PackagePath>\</PackagePath>
</None>
</ItemGroup>
</Project>
</Project>
26 changes: 26 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>false</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Elasticsearch.Net" Version="7.17.5" />
<PackageVersion Include="ElmahCore" Version="2.1.2" />
<PackageVersion Include="log4net" Version="2.0.17" />
<PackageVersion Include="NEST" Version="7.17.5" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="RabbitMQ.Client" Version="6.8.1" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="9.25.0.90414" />
<PackageVersion Include="StackExchange.Redis" Version="2.7.33" />
<PackageVersion Include="StackExchange.Redis.Extensions.Core" Version="9.1.0" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.1.118" />
<PackageVersion Include="System.Diagnostics.EventLog" Version="8.0.0" />
<PackageVersion Include="System.Text.Json" Version="8.0.3" />
<PackageVersion Include="coverlet.msbuild" Version="6.0.2" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageVersion Include="System.Text.Encoding.CodePages" Version="8.0.0" />
<PackageVersion Include="xunit" Version="2.8.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<ProjectGuid>0EB3767D-0830-4059-B54D-7AA26286F0BD</ProjectGuid>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>$(DotNetVersions)</TargetFrameworks>
<Description>The CrispyWaffle configuration package</Description>
<PackageTags>toolkit sdk framework library lib configuration</PackageTags>
<PackageReleaseNotes>Configuration release</PackageReleaseNotes>
Expand All @@ -11,9 +11,4 @@
<ItemGroup>
<ProjectReference Include="..\CrispyWaffle\CrispyWaffle.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp" Version="9.25.0.90414" />
</ItemGroup>

</Project>
18 changes: 6 additions & 12 deletions Src/CrispyWaffle.ElasticSearch/CrispyWaffle.ElasticSearch.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,19 @@

<PropertyGroup>
<ProjectGuid>A4C3BBE2-F33F-4752-97C4-206D7C4D6DDD</ProjectGuid>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>$(DotNetVersions)</TargetFrameworks>
<Description>The CrispyWaffle.ElasticSearch package</Description>
<PackageTags>toolkit sdk framework library lib elasticsearch nosql database log provider</PackageTags>
<Company>Guilherme Branco Stracini ME</Company>
<PackageReleaseNotes>ElasticSearch release</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\CrispyWaffle.Configuration\CrispyWaffle.Configuration.csproj" />
<ProjectReference Include="..\CrispyWaffle\CrispyWaffle.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Elasticsearch.Net" Version="7.17.5" />
<PackageReference Include="NEST" Version="7.17.5" />
<PackageReference Include="Elasticsearch.Net" />
<PackageReference Include="NEST" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp" Version="9.25.0.90414" />
</ItemGroup>

<ProjectReference Include="..\CrispyWaffle.Configuration\CrispyWaffle.Configuration.csproj" />
<ProjectReference Include="..\CrispyWaffle\CrispyWaffle.csproj" />
</ItemGroup>
</Project>
12 changes: 3 additions & 9 deletions Src/CrispyWaffle.Elmah/CrispyWaffle.Elmah.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,17 @@

<PropertyGroup>
<ProjectGuid>687F6153-2295-40A6-8673-1359482F928B</ProjectGuid>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>$(DotNetVersions)</TargetFrameworks>
<Description>The CrispyWaffle ELMAH bridge package</Description>
<PackageTags>toolkit sdk framework library lib ELMAH bridge log provider exception handler</PackageTags>
<PackageReleaseNotes>ELMAH release</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\CrispyWaffle\CrispyWaffle.csproj" />
</ItemGroup>

<ItemGroup>
<!-- ReSharper disable once VulnerablePackage -->
<PackageReference Include="ElmahCore" Version="2.1.2" />
<PackageReference Include="ElmahCore" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp" Version="9.25.0.90414" />
<ProjectReference Include="..\CrispyWaffle\CrispyWaffle.csproj" />
</ItemGroup>

</Project>
11 changes: 3 additions & 8 deletions Src/CrispyWaffle.Eventlog/CrispyWaffle.Eventlog.csproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<ProjectGuid>{0E0F2FA2-88CE-46FA-9D0B-27F184BD4F24}</ProjectGuid>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>$(DotNetVersions)</TargetFrameworks>
<Description>The CrispyWaffle EventLog bridge package</Description>
<PackageTags>toolkit sdk framework library lib event log provider</PackageTags>
<PackageReleaseNotes>EventLog release</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Diagnostics.EventLog" Version="8.0.0" />
<PackageReference Include="System.Diagnostics.EventLog" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\CrispyWaffle\CrispyWaffle.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp" Version="9.25.0.90414" />
</ItemGroup>

</Project>
9 changes: 2 additions & 7 deletions Src/CrispyWaffle.I18n.PtBr/CrispyWaffle.I18n.PtBr.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<ProjectGuid>0EB3767D-0830-5559-B54D-7AA26286F0BD</ProjectGuid>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>$(DotNetVersions)</TargetFrameworks>
<Description>The CrispyWaffle i18n pt-br package</Description>
<PackageTags>toolkit sdk framework library lib i18n pt-br</PackageTags>
<PackageReleaseNotes>i18n pt-br release</PackageReleaseNotes>
Expand All @@ -11,9 +11,4 @@
<ItemGroup>
<ProjectReference Include="..\CrispyWaffle\CrispyWaffle.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp" Version="9.25.0.90414" />
</ItemGroup>

</Project>
11 changes: 3 additions & 8 deletions Src/CrispyWaffle.Log4Net/CrispyWaffle.Log4Net.csproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<ProjectGuid>D6164E04-F1C9-4D86-9B9C-41036B816C4A</ProjectGuid>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>$(DotNetVersions)</TargetFrameworks>
<Description>The CrispyWaffle Log4Net bridge package</Description>
<PackageTags>toolkit sdk framework library lib log4net bridge log provider</PackageTags>
<PackageReleaseNotes>Log4Net release</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="log4net" Version="2.0.17" />
<PackageReference Include="log4net" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\CrispyWaffle\CrispyWaffle.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp" Version="9.25.0.90414" />
</ItemGroup>

</Project>
9 changes: 2 additions & 7 deletions Src/CrispyWaffle.RabbitMQ/CrispyWaffle.RabbitMQ.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,18 @@

<PropertyGroup>
<ProjectGuid>D0B119A8-91C1-4350-AB68-CDD831D2F9BE</ProjectGuid>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>$(DotNetVersions)</TargetFrameworks>
<Description>The CrispyWaffle.RabbitMQ package</Description>
<PackageTags>toolkit sdk framework library lib rabbitmq queueing queue message broker messaging log provider</PackageTags>
<PackageReleaseNotes>RabbitMQ release</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="RabbitMQ.Client" Version="6.8.1" />
<PackageReference Include="RabbitMQ.Client" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\CrispyWaffle.Configuration\CrispyWaffle.Configuration.csproj" />
<ProjectReference Include="..\CrispyWaffle\CrispyWaffle.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp" Version="9.25.0.90414" />
</ItemGroup>

</Project>
26 changes: 3 additions & 23 deletions Src/CrispyWaffle.Redis/CrispyWaffle.Redis.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,20 @@

<PropertyGroup>
<ProjectGuid>47DB173E-BC2B-4C16-B2A9-9506E57D6D9E</ProjectGuid>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>$(DotNetVersions)</TargetFrameworks>
<Description>The CrispyWaffle Redis package</Description>
<PackageTags>toolkit sdk framework library lib redis cache telemetry log provider</PackageTags>
<Company>Guilherme Branco Stracini ME</Company>
<PackageReleaseNotes>Redis release</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="StackExchange.Redis" Version="2.7.33" />
<PackageReference Include="StackExchange.Redis.Extensions.Core" Version="9.1.0" />
<PackageReference Include="StackExchange.Redis" />
<PackageReference Include="StackExchange.Redis.Extensions.Core" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\CrispyWaffle.Configuration\CrispyWaffle.Configuration.csproj" />
<ProjectReference Include="..\CrispyWaffle\CrispyWaffle.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\LICENSE">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Include="..\..\logo.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Include="..\..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp" Version="9.25.0.90414" />
</ItemGroup>

</Project>
7 changes: 1 addition & 6 deletions Src/CrispyWaffle.Utils/CrispyWaffle.Utils.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<ProjectGuid>C86C7297-1E8D-4611-B01A-08FC4FDF1D62</ProjectGuid>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>$(DotNetVersions)</TargetFrameworks>
<Description>The CrispyWaffle Utils package</Description>
<PackageTags>toolkit sdk framework library lib utils communications mail smtp ftp</PackageTags>
<PackageReleaseNotes>Utils release</PackageReleaseNotes>
Expand All @@ -12,9 +12,4 @@
<ProjectReference Include="..\CrispyWaffle.Configuration\CrispyWaffle.Configuration.csproj" />
<ProjectReference Include="..\CrispyWaffle\CrispyWaffle.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp" Version="9.25.0.90414" />
</ItemGroup>

</Project>
15 changes: 5 additions & 10 deletions Src/CrispyWaffle/CrispyWaffle.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<ProjectGuid>9A19103F-16F7-4668-BE54-9A1E7A4F7556</ProjectGuid>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>$(DotNetVersions)</TargetFrameworks>
<Description>The CrispyWaffle toolkit for .NET projects</Description>
<PackageTags>toolkit sdk framework library lib</PackageTags>
<PackageReleaseNotes>CancellationToken support in ServiceLocator</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Security.Permissions" Version="[6.0.0,7.0.0)" />
<PackageReference Include="System.Text.Json" Version="8.0.3" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="System.Security.Permissions" />
<PackageReference Include="System.Text.Json" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="SonarAnalyzer.CSharp" Version="9.25.0.90414" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,21 @@

<PropertyGroup>
<ProjectGuid>DAE04EC0-911F-11D3-BF4B-00C04F79EFBC</ProjectGuid>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>$(DotNetTestVersion)</TargetFramework>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<Compile Remove="ElasticSearch\**" />
<EmbeddedResource Remove="ElasticSearch\**" />
<None Remove="ElasticSearch\**" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PackageReference Include="coverlet.msbuild">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
<PackageReference Include="xunit" Version="2.8.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
<PackageReference Include="FluentAssertions" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="System.Text.Encoding.CodePages" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Loading
Loading