Split Directory.Packages.props: shared versions in root, per-product in src/

Move product-local package versions out of the root Directory.Packages.props
into per-product props files under src/<Product>/. The root file now only
contains versions for packages declared by two or more top-level products,
which is the actual shared set.

Each per-product Directory.Packages.props imports the root via
GetPathOfFileAbove so that the shared versions are inherited; this is
necessary because the .NET SDK picks the closest Directory.Packages.props
in the hierarchy and does not merge multiple ones.

Per-product file contents:
- src/cli/                    Microsoft.AspNetCore.Razor.Language,
                              Microsoft.Extensions.{CommandLineUtils,Configuration,Hosting}
- src/PostIt/                 Avalonia* and CommunityToolkit.Mvvm
- src/PostIt.Tests/           Avalonia.Headless{,XUnit}
- src/Yavsc.Org/              AsciiDocSharp*, Google.Apis.Compute.v1,
                              HigginsSoft.IdentityServer8.AspNetIdentity,
                              IdentityServer8.EntityFramework.Storage,
                              IdentityServer8.Security, IdentityServer8.Storage,
                              Microsoft.AspNetCore.Antiforgery, Authentication.Google,
                              Diagnostics.EntityFrameworkCore, Mvc.NewtonsoftJson,
                              SignalR, EntityFrameworkCore.Tools, Swashbuckle,
                              System.Security.Cryptography.Pkcs, YamlDotNet
- src/Yavsc.Org.Tests/        Microsoft.AspNetCore.Hosting,
                              Extensions.Caching.Memory, Options,
                              Options.ConfigurationExtensions,
                              Selenium.WebDriver, xunit.v3.{common,extensibility.core}
- src/Yavsc.Server/           Anthropic.SDK, Google.Apis.Calendar.v3,
                              Magick.NET-Q8-AnyCPU, MailKit, MimeKit,
                              Microsoft.AspNetCore.Http.Features, StaticFiles,
                              EntityFrameworkCore.SqlServer,
                              Npgsql.EntityFrameworkCore.PostgreSQL,
                              PayPalMerchantSDK, pazof.rules, RazorEngine.NetCore
- src/Yavsc.Web/              IdentityModel.AspNetCore

No per-product file is created for Yavsc.Api, Yavsc.Blogs, Yavsc.Abstract,
or templateWeb: Api and Blogs only declare the shared JwtBearer, Abstract
and templateWeb declare no package references at all.

Also includes a minor cosmetic update to FirstUIStript.cs (Firefox -> Chrome
driver, dedent, comment header). Tests previously failing on DataProtection
keyset / SMTP were unrelated environment issues (resolved by fixing the
SMTP password locally).
This commit is contained in:
Paul Schneider 2026-06-19 18:51:18 +01:00
commit 002f8cc7e4
9 changed files with 126 additions and 68 deletions

View file

@ -0,0 +1,15 @@
<Project>
<!-- Pull in shared package versions from the repository root. -->
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Packages.props', '$(MSBuildThisFileDirectory)../'))" />
<!-- Yavsc.Org.Tests-specific versions -->
<ItemGroup>
<PackageVersion Include="Microsoft.AspNetCore.Hosting" Version="2.3.11" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="10.0.9" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="10.0.9" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="10.0.9" />
<PackageVersion Include="Selenium.WebDriver" Version="4.45.0" />
<PackageVersion Include="xunit.v3.common" Version="3.2.2" />
<PackageVersion Include="xunit.v3.extensibility.core" Version="3.2.2" />
</ItemGroup>
</Project>

View file

@ -1,16 +1,16 @@
/* Buggy
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Firefox;
namespace yavscTests.ServerFixtures;
[Collection("Yavsc Server")]
public class FirstScript : BaseTestContext
{
public readonly WebServerFixture _serverFixture;
readonly ITestOutputHelper _output;
@ -24,10 +24,10 @@ public class FirstScript : BaseTestContext
[Fact]
public void DoTestSeleniumWebSite()
{
var firefoxOptions = new FirefoxOptions();
var firefoxOptions = new ChromeOptions();
firefoxOptions.AcceptInsecureCertificates = true;
var driver = new FirefoxDriver(firefoxOptions);
firefoxOptions.AddArgument("--headless=new");
var driver = new ChromeDriver(firefoxOptions);
driver.Navigate()
.GoToUrl(_serverFixture.Addresses.FirstOrDefault(u => u.StartsWith("http:")));
@ -59,7 +59,7 @@ driver.Navigate().GoToUrl("http://localhost:5000/Home/About");
var navbar = driver.FindElement(By.Id("navbar"));
Assert.NotNull(navbar);
/*
*//*
var textBox = driver.FindElement(By.Name("my-text"));
var submitButton = driver.FindElement(By.TagName("button"));
@ -68,9 +68,9 @@ driver.Navigate().GoToUrl("http://localhost:5000/Home/About");
var message = driver.FindElement(By.Id("message"));
var value = message.Text;
*/
*//*
driver.Quit();
}
}
*/