diff --git a/benchmarks/Pure.DI.Benchmarks/Pure.DI.Benchmarks.csproj b/benchmarks/Pure.DI.Benchmarks/Pure.DI.Benchmarks.csproj
index 4737daae1..6db266627 100644
--- a/benchmarks/Pure.DI.Benchmarks/Pure.DI.Benchmarks.csproj
+++ b/benchmarks/Pure.DI.Benchmarks/Pure.DI.Benchmarks.csproj
@@ -17,13 +17,13 @@
-
+
-
+
diff --git a/build/CompatibilityCheckTarget.cs b/build/CompatibilityCheckTarget.cs
index 318f9cf93..6a077b95b 100644
--- a/build/CompatibilityCheckTarget.cs
+++ b/build/CompatibilityCheckTarget.cs
@@ -28,7 +28,8 @@ public async Task> RunAsync(CancellationToken cance
var libraries = await librariesTarget.RunAsync(cancellationToken);
DeleteNuGetPackageFromCache("Pure.DI", settings.NextVersion, Path.GetDirectoryName(generatorPackage.Path)!);
- await new DotNetCustom("new", "install", "Pure.DI.Templates")
+ await new DotNetNewInstall()
+ .WithPackage("Pure.DI.Templates")
.RunAsync(cancellationToken: cancellationToken).EnsureSuccess();
string[] frameworks =
@@ -81,47 +82,39 @@ private async Task CompatibilityCheckAsync(
try
{
tempDirectory = Path.Combine(tempDirectory, "src", framework);
- await new DotNetNew(
- "dilib",
- "-n",
- "MyApp",
- "-o",
- tempDirectory,
- "--force",
- "-f", framework)
- .WithShortName($"create project from the dilib template for {framework}")
+ await new DotNetNew()
+ .WithTemplateName("dilib")
+ .WithName("MyApp")
+ .WithOutput(tempDirectory)
+ .WithForce(true)
+ .WithFramework(framework)
+ .WithShortName($"creating the project from the dilib template for {framework}")
.RunAsync(cancellationToken: cancellationToken).EnsureSuccess();
await new DotNetRestore()
- .WithShortName($"restore project for {framework}")
+ .WithShortName($"restoring the project for {framework}")
.WithWorkingDirectory(tempDirectory)
.RunAsync(cancellationToken: cancellationToken).EnsureSuccess();
if (!framework.Contains('.'))
{
- await new DotNetCustom(
- "add",
- Path.Combine(tempDirectory),
- "package",
- "Microsoft.NETFramework.ReferenceAssemblies")
- .WithShortName($"add package Microsoft.NETFramework.ReferenceAssemblies for {framework}")
+ await new DotNetAddPackage()
+ .WithProject(tempDirectory)
+ .WithPackage("Microsoft.NETFramework.ReferenceAssemblies")
+ .WithShortName($"adding the package Microsoft.NETFramework.ReferenceAssemblies for {framework}")
.RunAsync(cancellationToken: cancellationToken).EnsureSuccess();
}
-
- await new DotNetCustom(
- "add",
- Path.Combine(tempDirectory),
- "package",
- "Pure.DI",
- "-v",
- settings.NextVersion.ToString(),
- "-s",
- Path.GetDirectoryName(generatorPackage)!)
- .WithShortName($"add the package {Path.GetFileName(generatorPackage)} for {framework}")
+
+ await new DotNetAddPackage()
+ .WithProject(tempDirectory)
+ .WithPackage("Pure.DI")
+ .WithVersion(settings.NextVersion.ToString())
+ .AddSources(Path.GetDirectoryName(generatorPackage)!)
+ .WithShortName($"adding the the package {Path.GetFileName(generatorPackage)} for {framework}")
.RunAsync(cancellationToken: cancellationToken).EnsureSuccess();
await new DotNetBuild().WithWorkingDirectory(tempDirectory)
- .WithShortName($"build sample project for {framework}")
+ .WithShortName($"building the sample project for {framework}")
.RunAsync(cancellationToken: cancellationToken).EnsureSuccess();
}
finally
@@ -144,48 +137,35 @@ private async Task CompatibilityCheckAsync(string generatorPackage, Library libr
Info($"Testing {library.Name} library under {framework}.");
var tempDirForFramework = tempDirectory + "_" + framework;
Directory.CreateDirectory(tempDirForFramework);
- await new DotNetNew(
- templateName,
- "-n",
- "MyApp",
- "-o",
- tempDirForFramework,
- "--force",
- "-f", framework)
- .WithShortName($"create project from the {templateName} template for {framework}")
+ await new DotNetNew()
+ .WithTemplateName(templateName)
+ .WithName("MyApp")
+ .WithOutput(tempDirForFramework)
+ .WithFramework(framework)
+ .WithShortName($"creating the project from the {templateName} template for {framework}")
.RunAsync(cancellationToken: cancellationToken).EnsureSuccess();
- await new DotNetCustom(
- "add",
- Path.Combine(tempDirForFramework),
- "package",
- "Pure.DI",
- "-n",
- "-v",
- settings.NextVersion.ToString(),
- "-f",
- framework,
- "-s",
- Path.GetDirectoryName(generatorPackage)!)
- .WithShortName($"add package {Path.GetFileName(generatorPackage)} for the {templateName} template for {framework}")
+ await new DotNetAddPackage()
+ .WithProject(tempDirForFramework)
+ .WithPackage("Pure.DI")
+ .WithNoRestore(true)
+ .WithVersion(settings.NextVersion.ToString())
+ .AddSources(Path.GetDirectoryName(generatorPackage)!)
+ .WithFramework(framework)
+ .WithShortName($"addong the package {Path.GetFileName(generatorPackage)} for the {templateName} template for {framework}")
.RunAsync(cancellationToken: cancellationToken).EnsureSuccess();
var libraryPackageDir = Path.GetDirectoryName(library.Package.Path)!;
DeleteNuGetPackageFromCache(library.Name, settings.NextVersion, libraryPackageDir);
-
- await new DotNetCustom(
- "add",
- Path.Combine(tempDirForFramework),
- "package",
- library.Name,
- "-n",
- "-v",
- settings.NextVersion.ToString(),
- "-s",
- libraryPackageDir,
- "-f",
- framework)
- .WithShortName($"add package {library.Name} for the {templateName} template for {framework}")
+
+ await new DotNetAddPackage()
+ .WithProject(tempDirForFramework)
+ .WithPackage(library.Name)
+ .WithNoRestore(true)
+ .WithVersion(settings.NextVersion.ToString())
+ .AddSources(libraryPackageDir)
+ .WithFramework(framework)
+ .WithShortName($"adding the package {library.Name} for the {templateName} template for {framework}")
.RunAsync(cancellationToken: cancellationToken).EnsureSuccess();
await new DotNetRestore()
@@ -198,7 +178,7 @@ private async Task CompatibilityCheckAsync(string generatorPackage, Library libr
await new DotNetBuild()
.WithWorkingDirectory(tempDirForFramework)
.WithNoRestore(true)
- .WithShortName($"build for the {templateName} template for {framework}")
+ .WithShortName($"building the {templateName} template for {framework}")
.RunAsync(cancellationToken: cancellationToken).EnsureSuccess();
}
}
diff --git a/build/DeployTarget.cs b/build/DeployTarget.cs
index bd30853b8..620f047c6 100644
--- a/build/DeployTarget.cs
+++ b/build/DeployTarget.cs
@@ -23,9 +23,9 @@ public async Task RunAsync(CancellationToken cancellationToken)
foreach (var package in packages.Where(i => i.Deploy))
{
await new DotNetNuGetPush()
- .WithSources("https://api.nuget.org/v3/index.json")
+ .WithSource("https://api.nuget.org/v3/index.json")
.WithPackage(package.Path).WithApiKey(settings.NuGetKey)
- .WithShortName($"pushing {package.Path}")
+ .WithShortName($"pushing the package {package.Path}")
.BuildAsync(cancellationToken: cancellationToken).EnsureSuccess();
}
diff --git a/build/TemplateTarget.cs b/build/TemplateTarget.cs
index 19943ec16..0dcade996 100644
--- a/build/TemplateTarget.cs
+++ b/build/TemplateTarget.cs
@@ -52,7 +52,7 @@ public async Task RunAsync(CancellationToken cancellationToken)
await new DotNetNuGetPush()
.WithPackage(targetPackage)
- .WithSources("https://api.nuget.org/v3/index.json")
+ .WithSource("https://api.nuget.org/v3/index.json")
.WithApiKey(settings.NuGetKey)
.BuildAsync(cancellationToken: cancellationToken).EnsureSuccess();
diff --git a/build/build.csproj b/build/build.csproj
index 751b081f9..5dc6550a3 100644
--- a/build/build.csproj
+++ b/build/build.csproj
@@ -8,7 +8,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/samples/AvaloniaApp/AvaloniaApp.csproj b/samples/AvaloniaApp/AvaloniaApp.csproj
index f7bc1d1a4..12fb923cb 100644
--- a/samples/AvaloniaApp/AvaloniaApp.csproj
+++ b/samples/AvaloniaApp/AvaloniaApp.csproj
@@ -14,12 +14,12 @@
-
-
-
-
+
+
+
+
-
+
diff --git a/samples/AvaloniaSimpleApp/AvaloniaSimpleApp.csproj b/samples/AvaloniaSimpleApp/AvaloniaSimpleApp.csproj
index eaa7ec6e1..5b312020e 100644
--- a/samples/AvaloniaSimpleApp/AvaloniaSimpleApp.csproj
+++ b/samples/AvaloniaSimpleApp/AvaloniaSimpleApp.csproj
@@ -11,11 +11,11 @@
-
-
-
-
+
+
+
+
-
+
diff --git a/samples/BlazorWebAssemblyApp/BlazorWebAssemblyApp.csproj b/samples/BlazorWebAssemblyApp/BlazorWebAssemblyApp.csproj
index 24d0afd67..904daa8ef 100644
--- a/samples/BlazorWebAssemblyApp/BlazorWebAssemblyApp.csproj
+++ b/samples/BlazorWebAssemblyApp/BlazorWebAssemblyApp.csproj
@@ -10,8 +10,8 @@
-
-
+
+
diff --git a/samples/Clock.Tests/Clock.Tests.csproj b/samples/Clock.Tests/Clock.Tests.csproj
index 566e896b6..8a4c288b4 100644
--- a/samples/Clock.Tests/Clock.Tests.csproj
+++ b/samples/Clock.Tests/Clock.Tests.csproj
@@ -9,7 +9,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/samples/GrpcService/GrpcService.csproj b/samples/GrpcService/GrpcService.csproj
index 0190e19c2..ea66f5faa 100644
--- a/samples/GrpcService/GrpcService.csproj
+++ b/samples/GrpcService/GrpcService.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/samples/SingleRootAvaloniaApp/SingleRootAvaloniaApp.csproj b/samples/SingleRootAvaloniaApp/SingleRootAvaloniaApp.csproj
index ac8a6701c..5698c707b 100644
--- a/samples/SingleRootAvaloniaApp/SingleRootAvaloniaApp.csproj
+++ b/samples/SingleRootAvaloniaApp/SingleRootAvaloniaApp.csproj
@@ -15,12 +15,12 @@
-
-
-
-
+
+
+
+
-
+
diff --git a/samples/WeatherForecast/WeatherForecast.csproj b/samples/WeatherForecast/WeatherForecast.csproj
index d1d1ac134..a776568af 100644
--- a/samples/WeatherForecast/WeatherForecast.csproj
+++ b/samples/WeatherForecast/WeatherForecast.csproj
@@ -5,7 +5,7 @@
-
+
diff --git a/samples/WebAPI/WebAPI.csproj b/samples/WebAPI/WebAPI.csproj
index 8fc9cb412..c0a2122f2 100644
--- a/samples/WebAPI/WebAPI.csproj
+++ b/samples/WebAPI/WebAPI.csproj
@@ -9,8 +9,8 @@
-
-
+
+
diff --git a/src/Pure.DI.MS/Pure.DI.MS.csproj b/src/Pure.DI.MS/Pure.DI.MS.csproj
index 4ae92a4ab..f7b1778ff 100644
--- a/src/Pure.DI.MS/Pure.DI.MS.csproj
+++ b/src/Pure.DI.MS/Pure.DI.MS.csproj
@@ -19,7 +19,7 @@
true
contentFiles/cs
-
+
diff --git a/tests/Pure.DI.IntegrationTests/Pure.DI.IntegrationTests.csproj b/tests/Pure.DI.IntegrationTests/Pure.DI.IntegrationTests.csproj
index ba2430b3d..b247ca4e2 100644
--- a/tests/Pure.DI.IntegrationTests/Pure.DI.IntegrationTests.csproj
+++ b/tests/Pure.DI.IntegrationTests/Pure.DI.IntegrationTests.csproj
@@ -7,7 +7,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/tests/Pure.DI.Tests/Pure.DI.Tests.csproj b/tests/Pure.DI.Tests/Pure.DI.Tests.csproj
index 9275e5d98..373d51a9d 100644
--- a/tests/Pure.DI.Tests/Pure.DI.Tests.csproj
+++ b/tests/Pure.DI.Tests/Pure.DI.Tests.csproj
@@ -4,7 +4,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/tests/Pure.DI.UsageTests/Pure.DI.UsageTests.csproj b/tests/Pure.DI.UsageTests/Pure.DI.UsageTests.csproj
index 1dccb1060..575ceaf32 100644
--- a/tests/Pure.DI.UsageTests/Pure.DI.UsageTests.csproj
+++ b/tests/Pure.DI.UsageTests/Pure.DI.UsageTests.csproj
@@ -17,8 +17,8 @@
-
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive