aspnet / DependencyInjection

[Archived] Contains common DI abstractions that ASP.NET Core and Entity Framework Core use. Project moved to https://github.com/aspnet/Extensions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Microsoft.Extensions.DependencyInjection.Specification.Tests nuget does not have correct dependencies

opened this issue · comments

Hi

I installed this to get some tests going for my implementation of IServiceProvider using Castle Windsor as advised here.

The trouble is that it does not work in visual studio out of the box because it is missing some dependencies.

Can you please add the following so it works out of the box with resharper:

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="xunit" Version="2.2.0" />
<PackageReference Include="xunit.runner.console" Version="2.2.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />

Thanks

I'm not sure those should be added by default. Your trat project should pull in the things required to make it function (AKA the host). What if you wanted to use the UWP test runner? Shouldn't that be included too?

'm not sure those should be added by default. Your trat project should pull in the things required to make it function (AKA the host). What if you wanted to use the UWP test runner? Shouldn't that be included too?

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />

Without this you get weird errors anyway. And I would expect most people use the console on both windows and linux via dotnet test. Otherwise this is just a package with broken depedencies that creates bad UX for people who are new to the technology.

In the majority of the cases I would have thought Visual Studio was a thing. So perhaps we could create a new package for Visual Studio? Your UWP argument is a little contrived but not altogether off track. People might want to test new container implementations there too. Also given this is test project does it really matter? You have already imposed xunit, why not go all the way!

I know what is going on here, was just thinking of everyone else. Happy to close if there is no agreed action.