diff --git a/Directory.Build.props b/Directory.Build.props index b00104c3..ef6d81c8 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 2.1.36 + 2.1.37 Pure.DI latest net8.0 @@ -19,6 +19,7 @@ Copyright (C) $([System.DateTime]::Now.Year) Nikolay Pianikov true False + NETSDK1215;NETSDK1057;NU3005;NU5128;NU1902;NU1903;NU1904;NU1108;CS8321;CA1050;NU1801;CS1591 diff --git a/build/ReadmeTarget.cs b/build/ReadmeTarget.cs index ed12c89a..8c4aeb9a 100644 --- a/build/ReadmeTarget.cs +++ b/build/ReadmeTarget.cs @@ -8,6 +8,7 @@ namespace Build; internal class ReadmeTarget( Commands commands, + Settings settings, Env env, Versions versions, [Tag(typeof(BenchmarksTarget))] ITarget benchmarksTarget) @@ -60,22 +61,29 @@ public async Task RunAsync(CancellationToken cancellationToken) Directory.Delete(generatedFiles, true); } - var usageTestsProjects = Path.Combine(solutionDirectory, "tests", "Pure.DI.UsageTests", "Pure.DI.UsageTests.csproj"); + var usageTestsProject = Path.Combine(solutionDirectory, "tests", "Pure.DI.UsageTests", "Pure.DI.UsageTests.csproj"); var projects = new[] { - usageTestsProjects, + usageTestsProject, Path.Combine(solutionDirectory, "benchmarks", "Pure.DI.Benchmarks", "Pure.DI.Benchmarks.csproj") }; + var msbuild = new MSBuild() + .WithTarget("clean;rebuild") + .WithProps(("Configuration", settings.Configuration)); + foreach (var project in projects) { - await new MSBuild() + await msbuild .WithProject(project) - .WithTarget("clean;rebuild") .BuildAsync(cancellationToken: cancellationToken).EnsureSuccess(); } - await new DotNetTest(usageTestsProjects).RunAsync(cancellationToken: cancellationToken).EnsureSuccess(); + await new DotNetTest() + .WithProject(usageTestsProject) + .WithNoBuild(true) + .WithConfiguration(settings.Configuration) + .RunAsync(cancellationToken: cancellationToken).EnsureSuccess(); await using var readmeWriter = File.CreateText(ReadmeFile); diff --git a/readme/Avalonia.md b/readme/Avalonia.md index b17b54f6..c10ca779 100644 --- a/readme/Avalonia.md +++ b/readme/Avalonia.md @@ -176,7 +176,7 @@ The [project file](/samples/AvaloniaApp/AvaloniaApp.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/BlazorServerApp.md b/readme/BlazorServerApp.md index c7b5acd3..3c7306df 100644 --- a/readme/BlazorServerApp.md +++ b/readme/BlazorServerApp.md @@ -70,7 +70,7 @@ The [project file](/samples/BlazorServerApp/BlazorServerApp.csproj) looks like t - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/BlazorWebAssemblyApp.md b/readme/BlazorWebAssemblyApp.md index aa3f3e64..8be9b5df 100644 --- a/readme/BlazorWebAssemblyApp.md +++ b/readme/BlazorWebAssemblyApp.md @@ -69,7 +69,7 @@ The [project file](/samples/BlazorWebAssemblyApp/BlazorWebAssemblyApp.csproj) lo - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/Console.md b/readme/Console.md index cc08346c..6f03d0e9 100644 --- a/readme/Console.md +++ b/readme/Console.md @@ -89,7 +89,7 @@ The [project file](/samples/ShroedingersCat/ShroedingersCat.csproj) looks like t - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/ConsoleNativeAOT.md b/readme/ConsoleNativeAOT.md index 4fa141f9..842dfb93 100644 --- a/readme/ConsoleNativeAOT.md +++ b/readme/ConsoleNativeAOT.md @@ -16,7 +16,7 @@ The [project file](/samples/ShroedingersCatNativeAOT/ShroedingersCatNativeAOT.cs - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/ConsoleTopLevelStatements.md b/readme/ConsoleTopLevelStatements.md index 91a9aabe..c6793796 100644 --- a/readme/ConsoleTopLevelStatements.md +++ b/readme/ConsoleTopLevelStatements.md @@ -74,7 +74,7 @@ The [project file](/samples/ShroedingersCatTopLevelStatements/ShroedingersCatTop - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/GrpcService.md b/readme/GrpcService.md index 8220f741..3b7140c4 100644 --- a/readme/GrpcService.md +++ b/readme/GrpcService.md @@ -55,7 +55,7 @@ The [project file](/samples/GrpcService/GrpcService.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/Maui.md b/readme/Maui.md index 0fe88b79..c3a690a0 100644 --- a/readme/Maui.md +++ b/readme/Maui.md @@ -211,7 +211,7 @@ The [project file](/samples/MAUIApp/MAUIApp.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/MinimalWebAPI.md b/readme/MinimalWebAPI.md index 7f9d6f57..688a463c 100644 --- a/readme/MinimalWebAPI.md +++ b/readme/MinimalWebAPI.md @@ -78,7 +78,7 @@ The [project file](/samples/WebAPI/WebAPI.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/WebAPI.md b/readme/WebAPI.md index e6661b5b..10fe3e6e 100644 --- a/readme/WebAPI.md +++ b/readme/WebAPI.md @@ -53,7 +53,7 @@ The [project file](/samples/WebAPI/WebAPI.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/WebApp.md b/readme/WebApp.md index 1eed1dae..e32c31e2 100644 --- a/readme/WebApp.md +++ b/readme/WebApp.md @@ -53,7 +53,7 @@ The [project file](/samples/WebApp/WebApp.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/WinFormsApp.md b/readme/WinFormsApp.md index 482db49c..1f291de4 100644 --- a/readme/WinFormsApp.md +++ b/readme/WinFormsApp.md @@ -60,7 +60,7 @@ The [project file](/samples/WinFormsApp/WinFormsApp.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/WinFormsAppNetCore.md b/readme/WinFormsAppNetCore.md index c590a5a7..2cbac39f 100644 --- a/readme/WinFormsAppNetCore.md +++ b/readme/WinFormsAppNetCore.md @@ -66,7 +66,7 @@ The [project file](/samples/WinFormsAppNetCore/WinFormsAppNetCore.csproj) looks - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/Wpf.md b/readme/Wpf.md index 6e50b1a2..d10ab607 100644 --- a/readme/Wpf.md +++ b/readme/Wpf.md @@ -112,7 +112,7 @@ The [project file](/samples/WpfAppNetCore/WpfAppNetCore.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/samples/AvaloniaApp/AvaloniaApp.csproj b/samples/AvaloniaApp/AvaloniaApp.csproj index 12fb923c..f53c68cc 100644 --- a/samples/AvaloniaApp/AvaloniaApp.csproj +++ b/samples/AvaloniaApp/AvaloniaApp.csproj @@ -6,7 +6,6 @@ true app.manifest true - NU1801 diff --git a/samples/ShroedingersCatNativeAOT/ShroedingersCatNativeAOT.csproj b/samples/ShroedingersCatNativeAOT/ShroedingersCatNativeAOT.csproj index 160c6144..2ceedbbd 100644 --- a/samples/ShroedingersCatNativeAOT/ShroedingersCatNativeAOT.csproj +++ b/samples/ShroedingersCatNativeAOT/ShroedingersCatNativeAOT.csproj @@ -7,7 +7,6 @@ Exe Sample false - CS8321;CA1050 diff --git a/samples/ShroedingersCatTopLevelStatements/ShroedingersCatTopLevelStatements.csproj b/samples/ShroedingersCatTopLevelStatements/ShroedingersCatTopLevelStatements.csproj index d4fc81af..0f5086f9 100644 --- a/samples/ShroedingersCatTopLevelStatements/ShroedingersCatTopLevelStatements.csproj +++ b/samples/ShroedingersCatTopLevelStatements/ShroedingersCatTopLevelStatements.csproj @@ -4,7 +4,6 @@ $(BaseTargetFramework) Exe Sample - CS8321;CA1050 diff --git a/samples/SingleRootAvaloniaApp/SingleRootAvaloniaApp.csproj b/samples/SingleRootAvaloniaApp/SingleRootAvaloniaApp.csproj index 5698c707..ba78ef40 100644 --- a/samples/SingleRootAvaloniaApp/SingleRootAvaloniaApp.csproj +++ b/samples/SingleRootAvaloniaApp/SingleRootAvaloniaApp.csproj @@ -6,7 +6,6 @@ true app.manifest true - NU1801 AvaloniaApp diff --git a/src/Pure.DI.Abstractions/Pure.DI.Abstractions.csproj b/src/Pure.DI.Abstractions/Pure.DI.Abstractions.csproj index e1219de0..ea516b59 100644 --- a/src/Pure.DI.Abstractions/Pure.DI.Abstractions.csproj +++ b/src/Pure.DI.Abstractions/Pure.DI.Abstractions.csproj @@ -7,7 +7,6 @@ $(BasePackageId).Abstractions Abstractions of $(BasePackageId). $(Description) $(DefineConstants);PUREDI_NET_ANY - NU1902;NU1903;NU3005 diff --git a/src/Pure.DI.Core/Components/Api.g.cs b/src/Pure.DI.Core/Components/Api.g.cs index 78a002df..7da11dc6 100644 --- a/src/Pure.DI.Core/Components/Api.g.cs +++ b/src/Pure.DI.Core/Components/Api.g.cs @@ -1,5 +1,5 @@ // -#if !PUREDI_API_SUPPRESSION || PUREDI_API_V1 +#if !PUREDI_API_SUPPRESSION || PUREDI_API_V2 #pragma warning disable #if !PUREDI_API_FUNC_SUPPRESSION diff --git a/src/Pure.DI.Core/Components/GenericTypeArguments.g.cs b/src/Pure.DI.Core/Components/GenericTypeArguments.g.cs index 5e7bdbc7..a2433b61 100644 --- a/src/Pure.DI.Core/Components/GenericTypeArguments.g.cs +++ b/src/Pure.DI.Core/Components/GenericTypeArguments.g.cs @@ -1,5 +1,5 @@ // -#if !PUREDI_API_SUPPRESSION || PUREDI_API_V1 +#if !PUREDI_API_SUPPRESSION || PUREDI_API_V2 #pragma warning disable namespace Pure.DI { diff --git a/src/Pure.DI.Core/Features/Default.g.cs b/src/Pure.DI.Core/Features/Default.g.cs index 9c220f5b..9abd4203 100644 --- a/src/Pure.DI.Core/Features/Default.g.cs +++ b/src/Pure.DI.Core/Features/Default.g.cs @@ -1,5 +1,5 @@ // -#if !PUREDI_API_SUPPRESSION || PUREDI_API_V1 +#if !PUREDI_API_SUPPRESSION || PUREDI_API_V2 #pragma warning disable namespace Pure.DI diff --git a/src/Pure.DI.Core/Pure.DI.Core.csproj b/src/Pure.DI.Core/Pure.DI.Core.csproj index ccb232ab..22f0cf0f 100644 --- a/src/Pure.DI.Core/Pure.DI.Core.csproj +++ b/src/Pure.DI.Core/Pure.DI.Core.csproj @@ -3,7 +3,7 @@ netstandard2.0 $(BasePackageId) - $(DefineConstants);PUREDI_API_SUPPRESSION;PUREDI_API_V1 + $(DefineConstants);PUREDI_API_SUPPRESSION;PUREDI_API_V2 diff --git a/src/Pure.DI.Templates/Pure.DI.Templates.csproj b/src/Pure.DI.Templates/Pure.DI.Templates.csproj index acd758c7..c66ad5fb 100644 --- a/src/Pure.DI.Templates/Pure.DI.Templates.csproj +++ b/src/Pure.DI.Templates/Pure.DI.Templates.csproj @@ -7,7 +7,6 @@ Pure DI project templates Pure DI Templates di;pure;ioc;templates;dotnet-new - NU5128 true false diff --git a/tests/Pure.DI.Example/Pure.DI.Example.csproj b/tests/Pure.DI.Example/Pure.DI.Example.csproj index e3d9f61c..8f988766 100644 --- a/tests/Pure.DI.Example/Pure.DI.Example.csproj +++ b/tests/Pure.DI.Example/Pure.DI.Example.csproj @@ -2,7 +2,6 @@ true - CS1591 Pure.DI.Integration diff --git a/tests/Pure.DI.UsageTests/Pure.DI.UsageTests.csproj b/tests/Pure.DI.UsageTests/Pure.DI.UsageTests.csproj index 575ceaf3..3571c0a4 100644 --- a/tests/Pure.DI.UsageTests/Pure.DI.UsageTests.csproj +++ b/tests/Pure.DI.UsageTests/Pure.DI.UsageTests.csproj @@ -4,7 +4,6 @@ true true ../../.logs - CS1591