Nunit tests not running after upgrading from .NET Framework to .NET 5 - unit-testing

I just upgraded a project from .NET Framework 4.7.2 to .NET 5.0, and now when I open Test Explorer and try to run my NUnit unit tests, they silently do nothing - can't find any logging info either. My environment:
Visual Studio Pro 2019 16.11.7
NUnit 3 Test Adapter (v. 3.17.0) extension installed
NUnit (v. 3.13.1) nuget package installed in the relevant test project
TFM for the test project and lib to be tested are both net5.0-windows
Thanks for any pointers.

You are missing Microsoft.NET.Test.Sdk NuGet package.

Related

Cannot add jquery using NuGet Package Manager in VS 2017

I tried to add jquery to an asp.net core project using NuGet Package Manager of Visual Studio Community 2017 (version 15.5.2), but there is no jquery js files added to my project. Here is the screenshot:
Tried with Bower Package Manager, then the files are downloaded to bower_components folder but not to wwwroot as many people said.
Same thing for jquery-ui, bootstrap, etc.
Anyone experienced the same problem. Is there any work-around?
BTW, this accepted solution doesn't work for me: Where are jQuery-UI scripts stored in MVC6 project?
For ASP.NET Core in Visual Studio 2017:
NuGet shouldn't be used for client-side libraries.
After that Bower was used for this purpose, but now it is deprecated.
Currently the supported tool for managing client-side libraries is LibMan. Here is very good explanation how to use it in VS2017.

NuGet Package Manager not working in Visual Studio 2017 - for a.NET Core 1.1 web application

I just created a .NET Core Web Application in VS2017 and I wanted to be able to serve a single page application. In order to be able to do that I tried to install the nuget package Microsoft.AspNetCore.StaticFiles. But my NuGet installer failed and threw the following error
Severity Code Description Project File Line Suppression State
Package restore failed. Rolling back package changes for 'MyApp'.
Right click on the project=>Properties and set TargetFramework to .net core 2.0(less than or equal to the packages version you are using)
build the project and then install whatever you want from nuget.

Not able to install NUnit 3 test adapter in Visual Studio 2013 Professional edition

I am starting to work on the Selenium Webdriver in C# using NUnit Framework. I watched a lot of videos for the best installation and configuration steps so that I don't need to bother much about checkin of everything into TFS. I am using Visual Studio 2013 Professional edition and .NET Framework 4.5. Below are the steps that I followed till now:
Created a new Unit test project in Visual Studio 2013.
By default, [TestClass] and [TestMethod] annotations got created and default using statement was present for Visual Studio Unit testing framework, but since I want to use NUnit framework I removed these two annotations.
I installed Selenium webdriver (version 3.0.1) by right clicking on the solution -> Manage NuGet packages for the solution option.
Installed NUnit (3.5.0) in the same way from Manage NuGet packages option
Tried to install the NUnit Test adapter from menu Tools → Extensions and updates → Online → searched for NUnit test adapter. Only one option, "NUnit Test Adapter", (version 2.0.0) is visible which is not correct. Ideally I should also see "NUnit3 Test Adapter" in the search result.
I tried to do install locally the latest version of NUnit package, but even that is not getting installed.
How can I do this?

TFS2010 & VS2012 which SDK should be placed on the server?

I have a WebService made in vs2012 on 3.5fwk which uses programatically dlls of TFS to make workItems.
The since I've been working on vs2012 TFS's dlls are version 11.0.0.0, and not 10.0.0.0 as if I would work on a vs2010.
Oddly It works, on a machine with vs2012 installed and without TFS2010 installed, even when adding the dlls couldn't be done while the WebService project was on 3.5fwk (I had to make it 4.5 to be able to find the assemblies, and after adding them change it back to 3.5).
There's only 1 Gb left on the server so I can't install the whole VS on the server (and if we don't talk about licencing, this problem would be over).
I need to install an SDK Package on the server then, but, which one?
Framework 4.5 fwk?
TFS2010 sdk?
TFS2012 sdk?
TIA!
You'd need to install:
Team Foundation Server 2012 Object Model
.NET Framework 4.5
And optionally Visual Studio 2012 update 3 to bring the object model up to the latest version. This should only install the updated version of the object model.
Or recompile against the 2010 binaries and install:
Team Foundation Server 2010 Object Model SP1

Running NUnit tests in TeamCity 6.5.X with NUnit addins

We are using TeamCity 6.5.1 to manage the compilation, testing and deployment of our builds. Up until now we have been using the NUnit Build Runner from TeamCity to run our tests with NUnit 2.5.8 and had great success.
http://confluence.jetbrains.com/display/TCD65/NUnit
All of our tests are written in C# and .Net 4.0 using Visual Studio 2010. The test projects are compiled into an assembly that we reference through the TeamCity interface.
Now we are adding in a new test project for UI tests that require a custom NUnit addin that we developed to extend the native NUnit functionality. When running the tests in a local development environment with NUnit 2.5.8 installed we are able to place the custom addin in the NUnit addins directory. When NUnit is loaded our addin is picked up automatically.
C:\Program Files (x86)\NUnit 2.5.8\bin\net-2.0\addins
Using the NUnit Build Runner in TeamCity 6.5.1 we cannot see of a way to install our addin. Unlike the native installation of NUnit, TeamCity does not appear to pick up an addin just by placing it inside a sub directory of the NUnit installation.
Does anyone know of a way to install/use an addin using the NUnit Build Runner? Existing documentation discusses the NUnit command line console runner which we are not using. We are using the NUnit Build Runner as the method to run all of our tests so it would be most ideal if we could maintain a standard testing mechanism.
Thank you!
I was trying to solve the same problem.
As I found out TeamCity uses its assembly Nunit.
Therefore there is no possibility of expansion. You can use the command line to run tests via Nunit. And TeamCity use step "Build Failure Conditions" for reading logs and view the results.