Hello !
I'm facing an issue after the upgrade of a nuget dependency.
I'm using Specflow and the nuget SolidToken.SpecFlow.DependencyInjection to get dependency injection with the Microsoft IOC container.
After the upgrade of SolidToken.SpecFlow.DependencyInjection 0.4.0 to 0.6.0, the dll is not copied to the workspace anymore. This is an issue because Specflow won't load the plugin,
as explained here.
What I can't explain though, is why it works with 0.4.0 and not with 0.6.0. The only thing I can find that might explain the change of behavior seems to be
this PR. But that's just a guess.
With "Copy Referenced Assemblies To Workspace" enabled, it works again, as expected.
Can you please help me understanding why the behavior is different?
Here's some log from NCrunch that might help you.
Before the upgrade:
Quote:
ENGINE - [18:17:21.1983-ProcessOutputRedirectionErr-36] Process 28308: Processing TPA for deps entry [SolidToken.SpecFlow.DependencyInjection, 0.4.1, lib/netstandard2.0/SolidToken.SpecFlow.DependencyInjection.SpecFlowPlugin.dll]
ENGINE - [18:17:21.1983-ProcessOutputRedirectionErr-36] Process 28308: Considering entry [SolidToken.SpecFlow.DependencyInjection/0.4.1/lib/netstandard2.0/SolidToken.SpecFlow.DependencyInjection.SpecFlowPlugin.dll], probe dir [], probe fx level:0, entry fx level:0
ENGINE - [18:17:21.1983-ProcessOutputRedirectionErr-36] Process 28308: Local path query exists C:\Users\<redacted>\AppData\Local\NCrunch\21440\1\src\<redacted>.Testing\bin\QA\netcoreapp3.1\SolidToken.SpecFlow.DependencyInjection.SpecFlowPlugin.dll
ENGINE - [18:17:21.1983-ProcessOutputRedirectionErr-36] Process 28308: Probed deps dir and matched 'C:\Users\<redacted>\AppData\Local\NCrunch\21440\1\src\<redacted>.Testing\bin\QA\netcoreapp3.1\SolidToken.SpecFlow.DependencyInjection.SpecFlowPlugin.dll'
ENGINE - [18:17:21.1983-ProcessOutputRedirectionErr-36] Process 28308: Adding tpa entry: C:\Users\<redacted>\AppData\Local\NCrunch\21440\1\src\<redacted>.Testing\bin\QA\netcoreapp3.1\SolidToken.SpecFlow.DependencyInjection.SpecFlowPlugin.dll, AssemblyVersion: 0.4.1.1, FileVersion: 0.4.1.0
After the upgrade:
Quote:
ENGINE - [18:21:26.6494-ProcessOutputRedirectionErr-35] Process 32252: Processing TPA for deps entry [SolidToken.SpecFlow.DependencyInjection, 0.6.0, lib/netstandard2.0/SolidToken.SpecFlow.DependencyInjection.SpecFlowPlugin.dll]
ENGINE - [18:21:26.6494-ProcessOutputRedirectionErr-35] Process 32252: Considering entry [SolidToken.SpecFlow.DependencyInjection/0.6.0/lib/netstandard2.0/SolidToken.SpecFlow.DependencyInjection.SpecFlowPlugin.dll], probe dir [], probe fx level:0, entry fx level:0
ENGINE - [18:21:26.6494-ProcessOutputRedirectionErr-35] Process 32252: Local path query did not exist C:\Users\<redacted>\AppData\Local\NCrunch\21440\2\src\<redacted>.Testing\bin\QA\netcoreapp3.1\SolidToken.SpecFlow.DependencyInjection.SpecFlowPlugin.dll
ENGINE - [18:21:26.6494-ProcessOutputRedirectionErr-35] Process 32252: Skipping... not found in deps dir 'C:\Users\<redacted>\AppData\Local\NCrunch\21440\2\src\<redacted>.Testing\bin\QA\netcoreapp3.1\'
ENGINE - [18:21:26.6494-ProcessOutputRedirectionErr-35] Process 32252: Skipping... not found in probe dir ''
ENGINE - [18:21:26.6494-ProcessOutputRedirectionErr-35] Process 32252: Considering entry [SolidToken.SpecFlow.DependencyInjection/0.6.0/lib/netstandard2.0/SolidToken.SpecFlow.DependencyInjection.SpecFlowPlugin.dll], probe dir [C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.9], probe fx level:1, entry fx level:0
ENGINE - [18:21:26.6494-ProcessOutputRedirectionErr-35] Process 32252: Skipping... not found in deps json.
ENGINE - [18:21:26.6494-ProcessOutputRedirectionErr-35] Process 32252: Skipping... not found in probe dir 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.9'
ENGINE - [18:21:26.6494-ProcessOutputRedirectionErr-35] Process 32252: Considering entry [SolidToken.SpecFlow.DependencyInjection/0.6.0/lib/netstandard2.0/SolidToken.SpecFlow.DependencyInjection.SpecFlowPlugin.dll], probe dir [C:\nuget\global-packages], probe fx level:-1, entry fx level:0
ENGINE - [18:21:26.6494-ProcessOutputRedirectionErr-35] Process 32252: Relative path query exists C:\nuget\global-packages\solidtoken.specflow.dependencyinjection\0.6.0\lib\netstandard2.0\SolidToken.SpecFlow.DependencyInjection.SpecFlowPlugin.dll
ENGINE - [18:21:26.6494-ProcessOutputRedirectionErr-35] Process 32252: Probed package dir and matched 'C:\nuget\global-packages\solidtoken.specflow.dependencyinjection\0.6.0\lib\netstandard2.0\SolidToken.SpecFlow.DependencyInjection.SpecFlowPlugin.dll'
A repro can be as little as:
Quote:
// Project.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1" />
<!-- Copied to workspace -->
<PackageReference Include="SolidToken.SpecFlow.DependencyInjection" Version="0.4.0" />
<!-- Isn't copied to workspace -->
<!--<PackageReference Include="SolidToken.SpecFlow.DependencyInjection" Version="0.4.0" />-->
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0"/>
</ItemGroup>
</Project>
// UnitTest1.cs
using NUnit.Framework;
namespace NUnitTestProject1
{
public class Tests
{
[Test]
public void Test1()
{
Assert.Pass();
}
}
}
Thank you !