From 9448c0f2352e7891e1453a7095ccc53976cb8839 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 7 Sep 2025 23:51:27 +0000 Subject: [PATCH 1/2] Initial plan From 4e4825f230ae8fd0e7e55ac626b8915be4cd6e8b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Sep 2025 00:09:46 +0000 Subject: [PATCH 2/2] Fix NuGet package version configuration Co-authored-by: Arash-Sabet <26050123+Arash-Sabet@users.noreply.github.com> --- azure-pipelines.yml | 4 +- src/Abstracts/TestBedFactoryFixture.cs | 2 +- ...Xunit.Microsoft.DependencyInjection.csproj | 46 +++++++++++++------ src/package.nuspec | 17 ------- 4 files changed, 34 insertions(+), 35 deletions(-) delete mode 100644 src/package.nuspec diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b840175..c94c314 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -43,14 +43,14 @@ steps: arguments: '--configuration $(BuildConfiguration)' # Pack (with symbols & SourceLink) happens before publish to ensure packages are available as build artifacts -- script: echo Packing library with symbols and SourceLink metadata +- script: echo Packing library with symbols and SourceLink metadata - Version $(Major).$(Minor).$(Revision) displayName: 'Pre-Pack Info' - task: DotNetCoreCLI@2 displayName: 'Packing (nupkg + snupkg)' inputs: command: 'pack' packagesToPack: '**/Xunit.Microsoft.DependencyInjection.csproj' - arguments: '--configuration $(BuildConfiguration) /p:ContinuousIntegrationBuild=true /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg --output $(Build.ArtifactStagingDirectory)/packages' + arguments: '--configuration $(BuildConfiguration) /p:ContinuousIntegrationBuild=true /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:PackageVersion=$(Major).$(Minor).$(Revision) --output $(Build.ArtifactStagingDirectory)/packages' nobuild: true - task: DotNetCoreCLI@2 displayName: 'Running tests in example folder' diff --git a/src/Abstracts/TestBedFactoryFixture.cs b/src/Abstracts/TestBedFactoryFixture.cs index fc22384..4c8e473 100644 --- a/src/Abstracts/TestBedFactoryFixture.cs +++ b/src/Abstracts/TestBedFactoryFixture.cs @@ -110,7 +110,7 @@ private object CreateInstance(Type testType, IServiceProvider serviceProvider, I // Use the fixture's existing GetKeyedService method instead of reflection try { - var getKeyedServiceMethod = GetType().BaseType?.GetMethod("GetKeyedService",[typeof(string), typeof(ITestOutputHelper)])?.MakeGenericMethod(parameter.ParameterType); + var getKeyedServiceMethod = GetType().BaseType?.GetMethod("GetKeyedService", [typeof(string), typeof(ITestOutputHelper)])?.MakeGenericMethod(parameter.ParameterType); arg = getKeyedServiceMethod?.Invoke(this, [key, testOutputHelper]); } catch diff --git a/src/Xunit.Microsoft.DependencyInjection.csproj b/src/Xunit.Microsoft.DependencyInjection.csproj index fef840a..d1bbba7 100644 --- a/src/Xunit.Microsoft.DependencyInjection.csproj +++ b/src/Xunit.Microsoft.DependencyInjection.csproj @@ -4,21 +4,37 @@ latest enable enable - README.md - - true - - bin\$(Configuration)\$(TargetFramework)\Xunit.Microsoft.DependencyInjection.xml - - https://github.com/Umplify/xunit-dependency-injection - git - true - true - true - snupkg - true - - true + + + Xunit.Microsoft.DependencyInjection + Microsoft Dependency Injection utility for Xunit + Arash Sabet + Umplify Technologies Inc. + Xunit.Microsoft.DependencyInjection + This package contains the necessary classes and features to leverage Xunit's fixture class for Microsoft dependency injection framework. + 2025 - All rights reserved, Umplify Technologies Inc. + xunit;dependency-injection;microsoft-dependency-injection;xunit-dependency-injection + https://umplify.github.io/xunit-dependency-injection/ + MIT + true + README.md + + + true + + bin\$(Configuration)\$(TargetFramework)\Xunit.Microsoft.DependencyInjection.xml + + + https://github.com/Umplify/xunit-dependency-injection + git + true + true + true + snupkg + true + + + true diff --git a/src/package.nuspec b/src/package.nuspec deleted file mode 100644 index 3a46548..0000000 --- a/src/package.nuspec +++ /dev/null @@ -1,17 +0,0 @@ - - - - Xunit.Microsoft.DependencyInjection - Microsoft Dependency Injection utility for Xunit - 9.0 - Arash Sabet - Umplify Technologies Inc. - https://github.com/Umplify/xunit-dependency-injection/blob/main/LICENSE - https://umplify.github.io/xunit-dependency-injection/ - http://umplify.com/wp-content/uploads/2017/11/umplify_logo.png - true - This package contains the necessary classes and features to leverage Xunit's fixture class for Microsoft dependency inection framework. - 2025 - All rights reserved, Umplify Technologies Inc. - xunit dependency-injection microsoft-dependency-injection xunit-dependency-injection - -