Quantcast
Channel: Unable to find testhost.dll. Please publish your test project and retry - Stack Overflow
Browsing latest articles
Browse All 29 View Live

Image may be NSFW.
Clik here to view.

Answer by Thierry Brémard for Unable to find testhost.dll. Please publish...

Thanks! solved the issue of my testing project targeting netcore3.1projects installed:

View Article



Answer by Ognyan Dimitrov for Unable to find testhost.dll. Please publish...

As of today 18.05.2023 with VS 2022 you have to install the following in addition to xunit because otherwise VS will not be able to detect the tests.Microsoft.NET.Test.Sdk - this will solve the...

View Article

Answer by Pellet for Unable to find testhost.dll. Please publish your test...

I was receiving the error due to multiple dlls being picked up by the filter instead of just the one dll which contained the tests.

View Article

Answer by vmb100 for Unable to find testhost.dll. Please publish your test...

Restart Visual Studio and do a rebuild. Visual Studio seems to get confused sometimes after switching branches.

View Article

Answer by Estifanos Bireda for Unable to find testhost.dll. Please publish...

In my case Microsoft.NET.Test.Sdk was already installed, I had to reinstall it on Nuget Package Manager and the issue got fixed.

View Article


Answer by Furki4_4 for Unable to find testhost.dll. Please publish your test...

I downloaded .Net.Test.SDK and .Testplatform.TestHost via Nuget to my project but test kept not working. xunit.runner.visualstudio did the trick.

View Article

Answer by tmndungu for Unable to find testhost.dll. Please publish your test...

I was using .NET Core Framework 6.0 I had to downgrade Microsoft.NET.Test.Sdk from Version 17.1.0 to 16.5.0 to resolve the issue.

View Article

Answer by ihebiheb for Unable to find testhost.dll. Please publish your test...

In my case it was a silly mistake. I was referencing xunit also in my source project (not only in my test project)Deleting the xunit dependency in my source project fixed the problem.

View Article


Answer by Jpsy for Unable to find testhost.dll. Please publish your test...

I found 5 factors to be crucial.(3 of whom were spread throughout the other answers here in mixed variations.)1 to 4:Add these Nuget Packages in versions that work for your .NET Core...

View Article


Answer by Aislan Gelatti Rocha for Unable to find testhost.dll. Please...

In my case, it was necessary to include a reference to MsTest.TestAdapter module using nuget.A fresh project with MSTest.TestFramework and Microsoft.Net.Test.Sdk was not enough to run a single unit...

View Article

Answer by Äkwav for Unable to find testhost.dll. Please publish your test...

Had to add Microsoft.TestPlatform.TestHost to get testhost.dll.I found that in this answer https://github.com/dotnet/sdk/issues/7171#issuecomment-261506546

View Article

Answer by Blisco for Unable to find testhost.dll. Please publish your test...

This error can occur if you upgrade xunit.runner.visualstudio to a version greater than 2.4.1. Versions up to and including 2.4.1 include a reference to Microsoft.NET.Test.Sdk but later ones don't, so...

View Article

Answer by Venu for Unable to find testhost.dll. Please publish your test...

Got this error, when trying to debug a unit test. Below are the steps I tried.Step 1: Installed Microsof.TestPlatform.TestHost and tried to run the test but no luck.Step 2: Changed Target framework...

View Article


Answer by reim for Unable to find testhost.dll. Please publish your test...

This could also be caused by inadvertently trying to run a non-test project, this usually happens when your test files filter is too wide.

View Article

Answer by Dev Leader for Unable to find testhost.dll. Please publish your...

I've encountered this a couple of times and I always forget what's up. Most recently I had:Class Library -> Targeting .NET Core 3.0Test Project -> Targeting .NET Core 3.1Packages for my test...

View Article


Answer by Shawon Barua for Unable to find testhost.dll. Please publish your...

If you are running a project by cloning than Solution is to install the Microsoft.NET.Test.Sdk.How to :Tools>Nuget Package Manager>Manage Nuget Packages For Solution...>Search for...

View Article

Answer by Maximiliano Rios for Unable to find testhost.dll. Please publish...

I found a very interesting compatibility issue with a version. I did upgrade just as a normal practice, my code, and I switched to xUnit.runner.visualstudio 2.4.2. It stopped working for .Net Core 3.1....

View Article


Answer by SaifAli Sanadi for Unable to find testhost.dll. Please publish your...

same issue i faced for Nunit (.net core 3.1) project .I was using Microsoft.NET.Test.SDK v16.6.1, I downgraded the version to 15.9.0.And it start working

View Article

Answer by Hakakou for Unable to find testhost.dll. Please publish your test...

If you are targeting netstandard2.0 this will not work. If are using .NET Core. make sure the .csproj contains the following lines:<TargetFramework>netcoreapp3.0</TargetFramework>and also...

View Article

Answer by Michael Armitage for Unable to find testhost.dll. Please publish...

I was building a netcoreapp2.2 test project and then trying to run dotnet vstest from the bin folder. I noticed that the Microsoft Test DLLs from: <PackageReference Include="Microsoft.NET.Test.Sdk"...

View Article

Answer by Raj Kumar - rajkrs for Unable to find testhost.dll. Please publish...

If you are using xUnit, make sure your project type is not as netstanderd. As xUnit doesn't support netstanderd, change it to coreapp2.0 or others.

View Article


Answer by Andreas for Unable to find testhost.dll. Please publish your test...

In my case, the problem was that I was targeting .NET Core 2.0 and switching to .NET Core 2.1 solved the problem. However I was using Microsoft.NET.Test.SDK v16.4.0 instead of 15.9.0.

View Article


Answer by SteveHansen for Unable to find testhost.dll. Please publish your...

This happened to me after updating Microsoft.NET.Test.Sdk from v16.2.0 to v16.4.0 with <TargetFramework>netcoreapp2.0</TargetFramework>. Updating to...

View Article

Answer by S1r-Lanzelot for Unable to find testhost.dll. Please publish your...

Ran into this error, the root cause was the tests were hitting the maximum length for a Windows path (MAX_PATH), which is defined as 260 characters.

View Article

Answer by Willy Van den Driessche for Unable to find testhost.dll. Please...

In my case the problem was that I have an extension project for xunit. There is also a test project to test the extensions. When I ran dotnet test on my solution, my extension project was also picked...

View Article


Answer by Eugene Ihnatsyeu for Unable to find testhost.dll. Please publish...

Fixed it by installing xunit.runner.visualstudio.

View Article

Answer by Arvind Chourasiya for Unable to find testhost.dll. Please publish...

Installing Microsoft.NET.Test.Sdk package from nuget package manager solved my issue.

View Article

Answer by Matt W for Unable to find testhost.dll. Please publish your test...

I had created a class library and tried to use the XUnit NuGet package in it.What I should have done was created an XUnit project using this command: dotnet new xunit -n TestProjectI found this helpful...

View Article

Unable to find testhost.dll. Please publish your test project and retry

I have a simple dotnet core class library with a single XUnit test method:TestLib.csproj:<Project...

View Article


Browsing latest articles
Browse All 29 View Live




Latest Images