Skip to content

Commit

Permalink
Centralized versioning and package updates
Browse files Browse the repository at this point in the history
  • Loading branch information
NickCraver committed Nov 30, 2024
1 parent 50703d0 commit dfd08fe
Show file tree
Hide file tree
Showing 11 changed files with 75 additions and 56 deletions.
40 changes: 40 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="BuildBundlerMinifier" Version="3.2.449"/>
<PackageVersion Include="BuildWebCompiler" Version="1.12.405" />
<PackageVersion Include="Dapper" Version="2.1.35" />
<PackageVersion Include="Enums.NET" Version="5.0.0" />
<PackageVersion Include="Jil" Version="2.17.0" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="8.0.10" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.2.2" />
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.1.2" />
<PackageVersion Include="Microsoft.Net.Http.Headers" Version="8.0.10" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageVersion Include="MiniProfiler.AspNetCore.Mvc" Version="4.5.4" />
<PackageVersion Include="MiniProfiler.Shared" Version="4.5.4" />
<PackageVersion Include="Sigil" Version="5.0.0" />
<PackageVersion Include="StackExchange.Exceptional.AspNetCore" Version="3.0.1" />
<PackageVersion Include="StackExchange.Exceptional.Shared" Version="3.0.1" />
<PackageVersion Include="StackExchange.Redis" Version="2.8.22" />
<PackageVersion Include="StackExchange.Utils.Http" Version="0.3.48" />
<PackageVersion Include="System.DirectoryServices" Version="8.0.0" />
<PackageVersion Include="System.DirectoryServices.AccountManagement" Version="8.0.1" />
<PackageVersion Include="System.Management" Version="8.0.0" />
<PackageVersion Include="System.Runtime.Caching" Version="8.0.1" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
</ItemGroup>
<ItemGroup>
<GlobalPackageReference Condition="'$(TargetFramework)'!='net462'" Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" />
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.146" />
</ItemGroup>
</Project>
5 changes: 3 additions & 2 deletions Opserver.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29021.104
# Visual Studio Version 17
VisualStudioVersion = 17.12.35521.163 d17.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Opserver.Core", "src\Opserver.Core\Opserver.Core.csproj", "{C58AFF99-F4D9-4A83-866E-18DA0A633F6B}"
EndProject
Expand All @@ -12,6 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
appveyor.yml = appveyor.yml
azure-pipelines.yml = azure-pipelines.yml
Build.bat = Build.bat
Directory.Packages.props = Directory.Packages.props
global.json = global.json
nuget.config = nuget.config
readme.md = readme.md
Expand Down
1 change: 0 additions & 1 deletion nuget.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<configuration>
<packageSources>
<clear />
<add key="MyGet: Stack Overflow" value="https://www.myget.org/F/stackoverflow/api/v3/index.json" />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
5 changes: 0 additions & 5 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,10 @@
<DefaultLanguage>en-US</DefaultLanguage>
<IncludeSymbols>false</IncludeSymbols>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<!--<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>-->
</PropertyGroup>
<!-- File nesting! -->
<ItemGroup>
<ProjectCapability Include="DynamicDependentFile" />
<ProjectCapability Include="DynamicFileNesting" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.5.119" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/Opserver.Core/Data/SQL/SQLAzureServer.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;

namespace Opserver.Data.SQL
{
Expand Down
2 changes: 1 addition & 1 deletion src/Opserver.Core/Data/SQL/SQLInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Data.Common;
using System.Data.SqlClient;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Microsoft.Data.SqlClient;
using Opserver.Helpers;

namespace Opserver.Data.SQL
Expand Down
2 changes: 1 addition & 1 deletion src/Opserver.Core/Helpers/Connection.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Data.SqlClient;
using StackExchange.Profiling;
using StackExchange.Profiling.Data;

Expand Down
38 changes: 17 additions & 21 deletions src/Opserver.Core/Opserver.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,26 @@
<DebugType>embedded</DebugType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Dapper" Version="2.1.35" />
<PackageReference Include="Enums.NET" Version="5.0.0" />
<PackageReference Include="Jil" Version="2.17.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Net.Http.Headers" Version="8.0.10" />
<PackageReference Include="MiniProfiler.Shared" Version="4.3.13" />
<PackageReference Include="Sigil" Version="5.0.0" />
<PackageReference Include="StackExchange.Exceptional.Shared" Version="2.2.35" />
<PackageReference Include="StackExchange.Redis" Version="2.8.16" />
<PackageReference Include="StackExchange.Utils.Http" Version="0.3.48" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
<PackageReference Include="System.DirectoryServices" Version="8.0.0" />
<PackageReference Include="System.Management" Version="8.0.0" />
<PackageReference Include="System.Runtime.Caching" Version="8.0.1" />
<PackageReference Include="Dapper" />
<PackageReference Include="Enums.NET" />
<PackageReference Include="Jil" />
<PackageReference Include="Microsoft.Data.SqlClient"/>
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" />
<PackageReference Include="Microsoft.Net.Http.Headers" />
<PackageReference Include="MiniProfiler.Shared" />
<PackageReference Include="Sigil" />
<PackageReference Include="StackExchange.Exceptional.Shared" />
<PackageReference Include="StackExchange.Redis" />
<PackageReference Include="StackExchange.Utils.Http" />
<PackageReference Include="System.DirectoryServices" />
<PackageReference Include="System.Management" />
<PackageReference Include="System.Runtime.Caching" />
</ItemGroup>
<ItemGroup>
<Compile Update="Data\SQL\QueryPlans\ShowPlanXML.cs" SubType="Code" />
<Compile Update="Data\SQL\QueryPlans\ShowPlanXML.generated.cs" SubType="Code" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.143" />
</ItemGroup>
</Project>
17 changes: 6 additions & 11 deletions src/Opserver.Web/Opserver.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Opserver.Core\Opserver.Core.csproj" />
<PackageReference Include="BuildBundlerMinifier" Version="3.2.449" PrivateAssets="all" />
<PackageReference Include="BuildWebCompiler" Condition="'$(OS)' == 'Windows_NT'" Version="1.12.405" PrivateAssets="all" />
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.3.13" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.1.2" />
<PackageReference Include="StackExchange.Exceptional.AspNetCore" Version="2.2.35" />
<PackageReference Include="System.DirectoryServices.AccountManagement" Version="8.0.1" />
<Reference Include="System.Management" />
<PackageReference Include="BuildBundlerMinifier" PrivateAssets="all" />
<PackageReference Include="BuildWebCompiler" Condition="'$(OS)' == 'Windows_NT'" PrivateAssets="all" />
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" />
<PackageReference Include="StackExchange.Exceptional.AspNetCore" />
<PackageReference Include="System.DirectoryServices.AccountManagement" />
</ItemGroup>
<ItemGroup>
<Content Include="Config\*.config.example" />
Expand All @@ -23,8 +22,4 @@
<None Include="Config\*.example.json" />
<None Include="compilerconfig.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.143" />
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="xunit" Version="$(xUnitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(xUnitVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio" />
</ItemGroup>
</Project>
13 changes: 3 additions & 10 deletions tests/Opserver.Tests/Opserver.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,8 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../src/Opserver.Web/Opserver.Web.csproj" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.10" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Update="xunit" Version="2.9.2" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

<PackageReference Include="Microsoft.Extensions.Configuration.Json" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" />
</ItemGroup>
</Project>

0 comments on commit dfd08fe

Please sign in to comment.