Subscribe: Scott Hanselman's Computer Zen
Added By: Feedage Forager Feedage Grade A rated
Language: English
app  bash  cloud  core  dotnet  google cloud  install  linux  net core  net  rails  studio  ubuntu  visual studio  windows 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Scott Hanselman's Computer Zen

Scott Hanselman's Blog

Scott Hanselman on Programming, User Experience, The Zen of Computers and Life in General


Penny Pinching in the Cloud: Lift and Shift vs App Services - When a VM in the Cloud isn't what you want

Tue, 25 Apr 2017 22:49:31 GMT

I got an interesting question today. This is actually an extremely common one so I thought I'd take a bit to explore it. It's worth noting that I don't know the result of this blog post. That is, I don't know if I'll be right or not, and I'm not going to edit it. Let's see how this goes! The individual emailed and said they were new to Azure and said: Question for you.  (and we may have made a mistake – some opinions and help needed)A month or so ago, we setup a full up Win2016 server on Azure, with the idea that it would host a SQL server as well two IIS web sites Long story short, they were mired in the setup of IIS on Win2k6, messing with ports, yada yada yada. ' All they wanted was: The ability to right-click publish from Visual Studio for two sites. Management of a SQL Database from SQL Management Studio. This is a classic "lift and shift" story. Someone has a VM locally or under their desk or in hosting, so they figure they'll move it to the cloud. They LIFT the site as a Virtual Machine and SHIFT it to the cloud. For many, this is a totally reasonable and logical thing to do. If you did this and things work for you, fab, and congrats. However, if, at this point, you're finding the whole "Cloud" thing to be underwhelming, it's likely because you're not really using the cloud, you've just moved a VM into a giant host. You still have to feed and water the VM and deal with its incessant needs. This is likely NOT what you wanted to do. You just want your app running. Making a VM to do Everything If I go into Azure and make a new Virtual Machine (Linux or Windows) it's important to remember that I'm now responsible for giving that VM a loving home and a place to poop. Just making sure you're still reading. NOTE: If you're making a Windows VM and you already have a Windows license you can save like 40%, so be aware of that, but I'll assume they didn't have a license. You can check out the Pricing Calculator if you like, but I'll just go and actually setup the VM and see what the Azure Portal says. Note that it's going to need to be beefy enough for two websites AND a SQL Server, per the requirements from before. For a SQL Server and two sites I might want the second or third choice here, which isn't too bad given they have SSDs and lots of RAM. But again, you're responsible for them. Not to mention you have ONE VM so your web server and SQL Server Database are living on that one machine. Anything fails and it's over. You're also possibly giving up perf as you're sharing resources. App Service Plans with Web Sites/Apps and SQL Azure Server An "App Service Plan" on Azure is a fancy word for "A VM you don't need to worry about." You can host as many Web Apps, Mobile Apps/Backends, Logic Apps and stuff in one as you like, barring perf or memory issues. I have between 19 and 20 small websites in one Small App Service Plan. So, to be clear, you put n number of App Services as you'd like into one App Service Plan. When you check out the pricing tier for an App Service Plan, be sure to View All and really explore and think about your options. Some includes support for custom domains and SSL, others have 50 backups a day, or support BizTalk Services, etc. They start at Free, go to Shared, and then Basic, Standard, etc. Best part is that you can scale these up and down. If I go from a Small to a Medium App Service Plan, every App on the Plan gets better. However, we don't need a SQL Server, remember? This is going to be a plan that we'll use to host those two websites. AND we can use the the same App Service Plan for staging slots (dev/test/staging/production) if we like. So just get the plan that works for your sites, today. Unlike a VM, you can change it whenever. SQL Server on Azure is similar. You make a SQL Server Database that is hosted on a SQL Server that supports the number of Database Throughput Units that I need. Again, because it's the capital-C Cloud, I can change the size anytime. I can even script it and turn it up and down on the weekends. Whatever saves me money! I can scale the SQL Server from $5 [...]

ASP.NET - Overposting/Mass Assignment Model Binding Security

Wed, 19 Apr 2017 03:31:13 GMT

This little post is just a reminder that while Model Binding in ASP.NET is very cool, you should be aware of the properties (and semantics of those properties) that your object has, and whether or not your HTML form includes all your properties, or omits some. OK, that's a complex - and perhaps poorly written - sentence. Let me back up. Let's say you have this horrible class. Relax, yes, it's horrible. It's an example. It'll make sense in a moment.public class Person{ public int ID { get; set; } public string First { get; set; } public string Last { get; set; } public bool IsAdmin { get; set; }} Then you've got an HTML Form in your view that lets folks create a Person. That form has text boxes/fields for First, and Last. ID is handled by the database on creation, and IsAdmin is a property that the user doesn't need to know about. Whatever. It's secret and internal. It could be Comment.IsApproved or Product.Discount. You get the idea. Then you have a PeopleController that takes in a Person via a POST:[HttpPost][ValidateAntiForgeryToken]public async Task Create(Person person){ if (ModelState.IsValid) { _context.Add(person); await _context.SaveChangesAsync(); return RedirectToAction("Index"); } return View(person);} If a theoretical EvilUser found out that Person had an "IsAdmin" property, they could "overpost" and add a field to the HTTP POST and set IsAdmin=true. There's nothing in the code here to prevent that. ModelBinding makes your code simpler by handling the "left side -> right side" boring code of the past. That was all that code where you did myObject.Prop = Request.Form["something"]. You had lines and lines of code digging around in the QueryString or Form POST. Model Binding gets rid of that and looks at the properties of the object and lines them up with HTTP Form POST name/value pairs of the same names. NOTE: Just a friendly reminder that none of this "magic" is magic or is secret. You can even write your own custom model binders if you like. The point here is that folks need to be aware of the layers of abstraction when you use them. Yes, it's convenient, but it's hiding something from you, so you should know the side effects. How do we fix the problem? Well, a few ways. You can mark the property as [ReadOnly]. More commonly, you can use a BindAttribute on the method parameters and just include (whitelist) the properties you want to allow for binding:public async Task Create([Bind("First,Last")] Person person) Or, the correct answer. Don't let models that look like this get anywhere near the user. This is the case for ViewModels. Make a model that looks like the View. Then do the work. You can make the work easier with something like AutoMapper. Some folks find ViewModels to be too cumbersome for basic stuff. That's valid. There are those that are "All ViewModels All The Time," but I'm more practical. Use what works, use what's appropriate, but know what's happening underneath so you don't get some scriptkiddie overposting to your app and a bit getting flipped in your Model as a side effect. Use ViewModels when possible or reasonable, and when not, always whitelist your binding if the model doesn't line up one to one (1:1) with your HTML Form. What are your thoughts? Sponsor: Check out JetBrains Rider: a new cross-platform .NET IDE. Edit, refactor, test, build and debug ASP.NET, .NET Framework, .NET Core, or Unity applications. Learn more and get access to early builds!© 2017 Scott Hanselman. All rights reserved.       [...]

Setting up a Shiny Development Environment within Linux on Windows 10

Thu, 13 Apr 2017 22:22:05 GMT

While I was getting Ruby on Rails to work nicely under Ubuntu on Windows 10 I took the opportunity to set up my *nix bash environment, which was largely using defaults. Yes, I know I can use zsh or fish or other shells. Yes, I know I can use emacs and screen, but I am using Vim and tmux. Fight me. Anyway, once my post was done, I starting messing around with open source .NET Core on Linux (it runs on Windows, Mac, and Linux, but here I'm running on Linux on Windows. #Inception) and tweeted a pic of my desktop. By the way, I feel totally vindicated by all the interest in "text mode" given my 2004 blog post "Windows is completely missing the TextMode boat." ;)' Also, for those of you who are DEEPLY NOT INTERESTED in the command line, that's cool. You can stop reading now. Totally OK. I also use Visual Studio AND Visual Studio Code. Sometimes I click and mouse and sometimes I tap and type. There is room for us all. WHAT IS ALL THIS LINUX ON WINDOWS STUFF? Here's a FAQ on the Bash/Windows Subsystem for Linux/Ubuntu on Windows/Snowball in Hell and some detailed Release Notes. Yes, it's real, and it's spectacular. Can't read that much text? Here's a video I did on Ubuntu on Windows 10. A number of people asked me how they could set up their WSL (Windows Subsystem for Linux) installs to be something like this, so here's what I did. Note that will I've been using *nix on and off for 20+ years, I am by no means an expert. I am, and have been, Permanently Intermediate in my skills. I do not dream in RegEx, and I am offended that others can bust out an awk script without googling. So there's a few things going on in this screenshot. Running .NET Core on Linux (on Windows 10) Cool VIM theme with >256 colors Norton Midnight Commander in the corner (thanks Miguel) Desqview-esque tmux splitter (with mouse support) Some hotkey remapping, git prompt, completion Ubuntu Mono font Nice directory colors (DIRCOLORS/LS_COLORS) Let's break them down one at a time. And, again, your mileage may vary, no warranty express or implied, any of this may destroy your world, you read this on a blog. Linux is infinitely configurable and the only constant is that my configuration rocks and yours sucks. Until I see something in yours that I can steal. Running .NET Core on Linux (on Windows 10) Since Linux on Windows 10 is (today) Ubuntu, you can install .NET Core within it just like any Linux. Here's the Ubuntu instructions for .NET Core's SDK. You may have Ubuntu 14.04 or 16.04 (you can upgrade your Linux on Windows if you like). Make sure you know what you're running by doing a:~ $ lsb_release -aNo LSB modules are available.Distributor ID: UbuntuDescription: Ubuntu 16.04.2 LTSRelease: 16.04Codename: xenial~ $ If you're not on 16.04 you can easily remove and reinstall the whole subsystem with these commands at cmd.exe (note the /full is serious and torches the Linux filesystem):> lxrun /uninstall /full> lxrun /install Or if you want you can run this within bash (will take longer but maintain settings). NOTE that you'll need Windows 10 Creators Edition build 16163 or greater to run Ubuntu 16.04. Type "winver" to check your build.sudo do-release-upgrade Know what Ubuntu your Windows 10 has when you install .NET Core within it. The other thing to remember is that now you have two .NET Cores, one Windows and one Ubuntu, on the same (kinda) machine. Since the file systems are separated it's not a big deal. I do my development work within Ubuntu on /mnt/d/github (which is a Windows drive). It's OK for the Linux subsystem to edit files in Linux or Windows, but don't "reach into" the Linux file system from Windows. Cool Vim theme with >256 colors That Vim theme is gruvbox and I installed it like this. Thanks to Rich Turner for turning me on to this theme.$ cd ~/$ mkdir .vim$ cd .vim$ mkdir colors$ cd colors$ curl -O$ cd ~/$ vim .vimrc Paste the following (hit ‘i’ for insert and the[...]

Ruby on Rails on Azure App Service (Web Sites) with Linux (and Ubuntu on Windows 10)

Wed, 12 Apr 2017 21:27:11 GMT

Running Ruby on Rails on Windows has historically sucked. Most of the Ruby/Rails folks are Mac and Linux users and haven't focused on getting Rails to be usable for daily development on Windows. There have been some heroic efforts by a number of volunteers to get Rails working with projects like RailsInstaller, but native modules and dependencies almost always cause problems. Even more, when you go to deploy your Rails app you're likely using a Linux host so you may run into differences between operating systems. Fast forward to today and Windows 10 has the Ubuntu-based "Linux Subsystem for Windows" (WSL) and the native bash shell which means you can run real Linux elf binaries on Windows natively without a Virtual you should do your Windows-based Rails development in Bash on Windows. Ruby on Rails development is great on Windows 10 because you've Windows 10 handling the "windows" UI part and bash and Ubuntu handling the shell. After I set it up I want to git deploy my app to Azure, easily. Developing on Ruby on Rails on Windows 10 using WSL Rails and Ruby folks can apt-get update and apt-get install ruby, they can install rbenv or rvm as they like. These days rbenv is preferred. Once you have Ubuntu on Windows 10 installed you can quickly install "rbenv" like this within Bash. Here I'm getting 2.3.0.~$ git clone ~/.rbenv~$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc~$ echo 'eval "$(rbenv init -)"' >> ~/.bashrc~$ exec $SHELL~$ git clone ~/.rbenv/plugins/ruby-build~$ echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc~$ exec $SHELL~$ rbenv install 2.3.0~$ rbenv global 2.3.0~$ ruby -v~$ gem install bundler~$ rbenv reshash Here's a screenshot mid-process on my SurfaceBook. This build/install step takes a while and hits the disk a lot, FYI. At this point I've got Ruby, now I need Rails, as well as NodeJs for the Rails Asset Pipeline. You can change the versions as appropriate.@ curl -sL | sudo -E bash -$ sudo apt-get install -y nodejs$ gem install rails -v 5.0.1 You will likely also want either PostgresSQL or MySQL or Mongo, or you can use a Cloud DB like Azure DocumentDB. When you're developing on both Windows and Linux at the same time, you'll likely want to keep your code in one place or the other, not both. I use the automatic mount point that WSL creates at /mnt/c so for this sample I'm at /mnt/c/Users/scott/Desktop/RailsonAzure which maps to a folder on my Windows desktop. You can be anywhere, just be aware of your CR/LF settings and stay in one world. I did a "rails new ." and got it running locally. Here you can se Visual Studio Code with Ruby Extensions and my project open next to Bash on Windows. After I've got a Rails app running and I'm able to develop cleanly, jumping between Visual Studio Code on Windows and the Bash prompt within Ubuntu, I want to deploy the app to the web. Since this is a simple "Hello World" default rails app I can't deploy it somewhere where the Rails Environment is Production. There's no Route in routes.rb (the Yay! You're on Rails message is development-time only) and there's no SECRET_KEY_BASE environment variable set which is used to verify signed cookies. I'll need to add those two things. I'll change routes.rb quickly to just use the default Welcome page for this demo, like this:Rails.application.routes.draw do # For details on the DSL available within this file, see get '/' => "rails/welcome#index" end And I'll add the SECRET_KEY_BASE in as an App Setting/ENV var in the Azure portal when I make my backend, below. Deploying Ruby on Rails App to Azure App Service on Linux From the New menu in the Azure portal, choose to Web App on Linux (in preview as of the time I wrote this) from the Web + Mobile option. This will make an App Service Plan that has an App [...]

How to control PowerPoint on Windows with a Bluetooth Nintendo Switch JoyCon controller! (or a Surface Pen)

Mon, 10 Apr 2017 19:39:07 GMT

I usually use a Logitech Presentation Clicker to control PowerPoint presentations, but I'm always looking for new ways. Michael Samarin has a great app called KeyPenX that lets you use a Surface pen to control PowerPoint! However, I've also got this wonderful Nintendo Switch and two JoyCon controllers. Rachel White reminded me that they are BlueTooth! So why not pair them to your machine and map some of their buttons to keystrokes? Let's do it! First, hold the round button on the black side of the controller between the SL and SR buttons, then go into Windows Settings and Add Bluetooth Device. You can add them both if you like! They show up like Game Controllers to Windows: Ah, but these are Joysticks. We need to map JoyStick Actions to Key Presses. Enter JoyToKey. If you keep using it (even though you can use it free) it's Shareware, you can buy JoyToKey for just $7. Hold down a button on your Joystick/Joycon to see what it maps to. For example, here I'm clicking in on the stick and I can see that's Button 12. Map them anyway you like. I mapped left and right to PageUp and PageDown so now I can control PowerPoint! And here it is in action: ZOMG YOU CAN CONTROL POWERPOINT WITH THE #NintendoSwitch JoyCon! /ht @ohhoe A post shared by Scott Hanselman (@shanselman) on Apr 10, 2017 at 12:38pm PDT So fun! Enjoy! Sponsor: Did you know VSTS can integrate closely with Octopus Deploy? Watch Damian Brady and Brian A. Randell as they show you how to automate deployments from VSTS to Octopus Deploy, and demo the new VSTS Octopus Deploy dashboard widget. Watch now© 2017 Scott Hanselman. All rights reserved.       [...]

Writing and debugging Linux C++ applications from Visual Studio using the "Windows Subsystem for Linux"

Mon, 03 Apr 2017 19:52:37 GMT

I've blogged about the "Windows Subsystem for Linux" (also known as "Bash on Ubuntu on Windows") many times before. Response to this Windows feature has been a little funny because folks try to: Minimize it - "Oh, it's just Cygwin." (It's actually not, it's the actual Ubuntu elf binaries running on a layer that abstracts the Linux kernel.) Design it - "So it's a docker container? A VM?" (Again, it's a whole subsystem. It does WAY more than you'd think, and it's FASTer than a VM.) Here's a simple explanation from Andrew Pardoe: 1. The developer/user uses a bash shell.2. The bash shell runs on an install of Ubuntu3. The Ubuntu install runs on a Windows subsystem. This subsystem is designed to support Linux. It's pretty cool. WSL has, frankly, kept me running Windows because I can run cmd, powershell, OR bash (or zsh or Fish). You can run vim, emacs, tmux, and run Javascript/node, Ruby, Python, C/C++, C# & F#, Rust, Go, and more. You can also now run sshd, MySQL, Apache, lighttpd as long as you know that when you close your last console the background services will shut down. Bash on Windows is for developers, not background server apps. And of course, you apt-get your way to glory. Bash on Windows runs Ubuntu user-mode binaries provided by Canonical. This means the command-line utilities are the same as those that run within a native Ubuntu environment. I wanted to write a Linux Console app in C++ using Visual Studio in Windows. Why? Why not? I like VS. Setting up Visual Studio 2017 to compile and debug C++ apps on Linux I've got Visual Studio Community, which is free for small groups and open source. If you already have it installed, make sure you run the Visual Studio Installer again (it's fast, don't worry) and select Linux: I make sure my Windows 10 is up to date and has Bash on Ubuntu installed. The "Windows 10 Creators Edition" is out April 11th but if you're a Windows Insider or use the Update Assistant you can get it on April 5th. It includes a bunch of improvements to Bash on Windows (release notes) Then, from the bash shell make sure you have build-essential, gdb's server, and openssh's server:$ sudo apt update$ sudo apt install -y build-essential$ sudo apt install -y gdbserver$ sudo apt install -y openssh-server Then open up /etc/ssh/sshd_config with vi (or nano) likesudo nano /etc/ssh/sshd_config and for simplicity's sake, set PasswordAuthentication to yes. Remember that it's not as big a security issue as you'd think as the SSHD daemon closes when your last console does, and because WSL's subsystem has to play well with Windows, it's privy to the Windows Firewall and all its existing rules, plus we're talking localhost also. Now generate SSH keys and manually start the service:$ sudo ssh-keygen -A$ sudo service ssh start Create a Linux app in Visual Studio (or open a Makefile app): Make sure you know your target (x64, x86, ARM): In Visual Studio's Cross Platform Connection Manager you can control your SSH connections (and set up ones with private keys, if you like.) Boom. I'm writing C++ for Linux in Visual Studio on Windows...running, compiling and debugging on the local Linux Subsystem BTW, for those of you, like me, who love your Raspberry Pi tiny Linux computers...this is a great way to write C++ for those little devices as well. There's even a Blink example in File | New Project to start. Also, for those of you who are very advanced, stop using Mingw-w64 and do cool stuff like compiling gcc 6.3 from source under WSL and having VS use that! I didn't realize that Visual Studio's C++ support lets you choose between a number of C++ compilers including both GCC and Clang. Sponsor: Thanks to Redgate! Track every change to your database! See who made changes, what they did, & why, with SQL Source Control. Get a full version history in your source control system. See how. © 2017 Scott Hanselman. All rights reserved.     [...]

Trying ASP.NET Core on the Google Cloud Platform "App Engine Flexible Environment"

Thu, 30 Mar 2017 08:03:19 GMT

Last week I used Zeit and "now" to deploy an ASP.NET Core app (via a container) to the Zeit cloud. Tonight the kids are asleep so I thought I'd deploy to the Google Cloud. They've got beta support for open source ASP.NET so it's a perfect time. Google even has Google Cloud Tools for Visual Studio (2015). I'll install the Google Cloud SDK. I checked "beta" as well. Install it, login to your Google account and setup/select a project. I make a new folder and put an "app.yaml" in there with this inside as a directive to the Google Cloud Platform.runtime: aspnetcoreenv: flex Here's a gratuitous screenshot: I did a dotnet new, dotnet restore, and finally a:dotnet publish -c Release which makes a publish folder that will get sent up to the cloud. IMPORTANT NOTE: I initially tried to push a .NET Core app using the .NET Core 1.1 runtime but Google Cloud's beta support in the flexible environment is set up for the 1.0.3 runtime (using their own custom docker base image) as of the time of this blog post, so you'll want to "dotnet new mvc --framework netcoreapp1.0" and set the "RuntimeFrameworkVersion" to get that specific shared LTS (Long Term Support) version. As soon as the Google Cloud flex runtime has the latest LTS (1.0.4, at the time of this writing) then apps would just roll forward. netcoreapp1.0 1.0.3 Otherwise you'll get errors. Fortunately those errors are very clear. The walkthrough on Google Cloud suggests you copy the app.yaml file using a standard CLI copy command. However, since you're going to need that app.yaml EVERY publish, just add it to the csproj like this: This way it'll end up in publish automatically. You can then publish to the "AppEngine flexible environment:dotnet restoredotnet publish -c Releasegcloud beta app deploy .\bin\Release\netcoreapp1.0\publish\app.yamlgcloud app browse // THIS IS JUST TO VISIT IT AFTER IT'S PUBLISHED NOTE: You may get an ERROR that billing isn't enabled, or that the aren't enabled. You'll need to ensure you have an active Free Trial, then go to the API Manager in the Google Cloud Platform dashboard and enable "Google Cloud Container Builder API." I also had to manually enable the API for the "Flexible" Environment and confirm I had a valid billing account. Once I enabled a few APIs, I just did a standard "gcloud beta app deploy" as above: Pretty cool stuff! Here is my ASP.NET Core app running on GCP's Flex engine: You can "tail" your app with "gcloud app logs tail -s default" and you'll see the output from .NET Core and ASP.NET (and Kestrel) in the Google Cloud! Or online in the Google "Stackdriver" logging page: Go read up more on the Google Cloud Platform Blog. They even support Kubernetes clusters with ASP.NE Core apps packaged as Docker containers. Sponsor: Thanks to Redgate! Track every change to your database! See who made changes, what they did, & why, with SQL Source Control. Get a full version history in your source control system. See how.© 2017 Scott Hanselman. All rights reserved.       [...]

Command Line: Using dotnet watch test for continuous testing with .NET Core 1.0 and

Mon, 27 Mar 2017 04:28:03 GMT

I've installed .NET Core 1.0 on my machine. Let's see if I can get a class library and tests running and compiling automatically using only the command line. (Yes, some of you are freaked out by my (and other folks') appreciation of a nice, terse command line. Don't worry. You can do all this with a mouse if you want. I'm just enjoying the CLI. NOTE: This is considerably updated from the project.json version in 2016. First, I installed from This should all work on Windows, Mac, or Linux.C:\> md testexample & cd testexampleC:\testexample> dotnet new slnContent generation time: 33.0582 msThe template "Solution File" created successfully.C:\testexample> dotnet new classlib -n mylibrary -o mylibraryContent generation time: 40.5442 msThe template "Class library" created successfully.C:\testexample> dotnet new xunit -n mytests -o mytestsContent generation time: 87.5115 msThe template "xUnit Test Project" created successfully.C:\testexample> dotnet sln add mylibrary\mylibrary.csprojProject `mylibrary\mylibrary.csproj` added to the solution.C:\testexample> dotnet sln add mytests\mytests.csprojProject `mytests\mytests.csproj` added to the solution.C:\testexample> cd mytestsC:\testexample\mytests> dotnet add reference ..\mylibrary\mylibrary.csprojReference `..\mylibrary\mylibrary.csproj` added to the project.C:\testexample\mytests> cd ..C:\testexample> dotnet restore Restoring packages for C:\Users\scott\Desktop\testexample\mytests\mytests.csproj... Restoring packages for C:\Users\scott\Desktop\testexample\mylibrary\mylibrary.csproj... Restore completed in 586.73 ms for C:\Users\scott\Desktop\testexample\mylibrary\mylibrary.csproj. Installing System.Diagnostics.TextWriterTraceListener 4.0.0....SNIP... Installing Microsoft.NET.Test.Sdk 15.0.0. Installing xunit.runner.visualstudio 2.2.0. Installing xunit 2.2.0. Generating MSBuild file C:\Users\scott\Desktop\testexample\mytests\obj\mytests.csproj.nuget.g.props. Generating MSBuild file C:\Users\scott\Desktop\testexample\mytests\obj\mytests.csproj.nuget.g.targets. Writing lock file to disk. Path: C:\Users\scott\Desktop\testexample\mytests\obj\project.assets.json Installed: 16 package(s) to C:\Users\scott\Desktop\testexample\mytests\mytests.csprojC:\testexample> cd mytests & dotnet testBuild started, please wait...Build completed.Test run for C:\testexample\mytests\bin\Debug\netcoreapp1.1\mytests.dll(.NETCoreApp,Version=v1.1)Microsoft (R) Test Execution Command Line Tool Version (c) Microsoft Corporation. All rights reserved.Starting test execution, please wait...[ 00:00:00.5539676] Discovering: mytests[ 00:00:00.6867799] Discovered: mytests[ 00:00:00.7341661] Starting: mytests[ 00:00:00.8691063] Finished: mytestsTotal tests: 1. Passed: 1. Failed: 0. Skipped: 0.Test Run Successful.Test execution time: 1.8329 Seconds Of course, I'm testing nothing yet but pretend there's a test in the tests.cs and something it's testing (that's why I added a reference) in the library.cs, OK? Now I want to have my project build and tests run automatically as I make changes to the code. I can't "dotnet add tool" yet so I'll add this line to my test's project file: Like this: Then I just dotnet restore to bring in the tool. In order to start the tests, I don't write dotnet test, I run "dotnet watch test." The main command is watch, and then WATCH calls TEST. You can also dotnet watch run, etc. NOTE: There's a color bug using only cmd.exe so on "DOS" you'll see some ANSI chars. That should be fixed in a minor release soon - the PR is in and waiting. On bash or PowerShell things look fin. In this screenshot, you can see as I make change[...]