Clearing browser cache is a common occurrence when testing and debugging web applications. It’s useful to be able to do this with one click or keyboard shortcut rather than open the browser’s ‘Clear browsing data’ menu. I am using Google Chrome so I will install the extension Clear Cache.
Once enabled a Keyboard shortcut can be configured at the bottom of the Chrome Extensions page.
Now cache can easily be cleared in one command rather than accessing any other menus.
Manually removing and sorting Usings can become a tedious process when working with many classes and files. Handle this automatically when saving any file in Visual Studio 2017 using the Productivity Power Tools 2017 extension bundle installer, specifically the Power Commands extension. These can be installed directly by navigating to Tools | Extensions and Updates … in Visual Studio.
After installing the extension, go to Tools | Options | Productivity Power Tools | Power Commands. Check Remove and Sort Usings on save.
Test this by editing a code file and saving (Ctrl+S). Any unused Usings should be automatically removed and existing ones sorted.
For ReSharper users, there is a chance that this setting does not work. This is a known issue. As a work-around, deselect Hide overridden VS menu items in ReSharper options.
Navigate to ReSharper | Options | Environment | Keyboard & Menus. Uncheck Hide overridden VS menu items.
The Power Commands extension should be working again.
Heroku is a cloud platform that supports a number of languages. .NET Core has yet to be officially supported. The options for deploying .NET Core applications to Heroku are using Third Party buildpacks or container support. It can take some digging to find a buildpack that is well maintained and working properly for the version of .NET Core you are using.
For my purposes, I am deploying a brand new ASP.NET Core Web Application using Version 1.1. In order to get this deploying successfully to Heroku, first download the Heroku CLI.
From the command prompt, login to your Heroku account to get started.
Navigate to the project’s root directory and create the app you will be deploying to.
Use the set:buildpacks command to point the app to the desired buildpack:
heroku buildpacks:set https://github.com/jincod/dotnetcore-buildpack#v1.0.4
From here all that is left is to deploy the application to Heroku.
git push heroku master
See a demo application here.