Force to run tests in test projects serially; (for integration or ui type of tests)
Add this to the xunit test project app.config file:
<?xml version="1.0" encoding="utf-8" ?>
<add key="xunit.methodDisplay" value="method" />
<add key="xunit.parallelizeAssembly" value="false" />
<add key="xunit.parallelizeTestCollections" value="false" />
<add key="xunit.maxParallelThreads" value="1" />
https://xunit.github.io/docs/configuring-with-json.html (.NET core)
How to run the default gulp tasks for a front end web project in Visual Studio 2015.
Open Task Runner Explorer window in Visual Studio.
Right-click Tasks > build (build should be the list of tasks needed) and Run. Css and js files will be created.
Have you ever found yourself wishing you could roll back a few hours to a piece of code you had working but have made changes to? This extension provides an early preview of an automatic, no-configuration history tracking facility for your local machine. Just install the extension, and whatever you do in your projects and solutions, it silently and efficiently tracks the changes you make to any files that you have opened in the Visual Studio Editor. Then, when you find yourself in need of back-tracking to
Source: AutoHistory – Visual Studio Marketplace
See this Channel 9 video: http://go.microsoft.com/fwlink/?LinkID=390499
If you get this alert message when debugging with the Selenium webdriver (v3.2) chromedriver (v2.27):
chromedriver.exe no disk
there is no disk in the drive. please insert a disk into drive e:
You need to set the path to chromedriver.exe to the constructor.
var driver = new ChromeDriver(chromeDriverPath);
Usage with helper class below:
//Create an instance of a driver. (web browser)
driver = new MyChromeDriver().GetChromeDriver();
public class MyChromeDriver
public ChromeDriver GetChromeDriver()
string chromeDriverPath = GetChromeDriverPath();
return new ChromeDriver(chromeDriverPath);
public string GetChromeDriverPath()
string solutionRelativePath = @"packages\Selenium.WebDriver.ChromeDriver.2.27.0\driver\";
string path = Path.Combine(GetSolutionDir().FullName, solutionRelativePath);
public DirectoryInfo GetSolutionDir()
DirectoryInfo baseDir = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory);
If you have a config file or something similar you change on your local computer but dont want it to get marked as “modified”.
Use this command:
git update-index --skip-worktree [filename]
If remote repo gets an update on that file you will get notified about this on a pull.
skip-worktree is useful when you instruct git not to touch a specific file ever. That is useful for an already tracked config file.
Upstream main repository hosts some production-ready config but you would like to change some settings in the config to be able to do some local testing. And you don’t want to accidentally check the changes in such file to affect the production config. In that case
skip-worktree makes perfect scene.
If you have skip-worktree on a file and the upstream changes, you get “please commit or stash” when you try to pull
More info here:
To trigger a xUnit test run after a successful build,
add this to the project “Build Events” / “Post-build event command line:”
(You need xUnit runner console nuget package installed for this, above is for the 2.2.0 version).
Will produce something similar to this in the Output window “Build”:
xUnit.net Console Runner (32-bit .NET 4.0.30319.42000)
=== TEST EXECUTION SUMMARY ===
MyApp.UnitTests Total: 8, Errors: 0, Failed: 0, Skipped: 0, Time: 1,120s
Simple comparison table for Attributes and Asserts xUnit vs NUnit and MSTest
Source: Comparing xUnit.net to other frameworks > xUnit.net
Your go-to .NET Toolbox. A collection of Awesome .NET libraries, tools & frameworks. 549 projects organized into 93 categories.
Great tool for searching .NET libraries.
Can for example compare 2 libraries to each other:
Source: Awesome .NET