Visual Studio Code Settings

User Setings Below are few user preferences I use that defer from the default { // Controls the font family. "editor.fontFamily": "Fira Code Light, Consolas, monospace", // Enables font ligatures "editor.fontLigatures": true, // The number of spaces a tab is equal to. This setting is overriden based on the file contents when `editor.detectIndentation` is on. "editor.tabSize": 2, // Controls how lines should wrap. Can be: // - 'off' (disable wrapping), // - 'on' (viewport wrapping), // - 'wordWrapColumn' (wrap at `editor. [Read More]

Laravel Mix and Path Settings

A quick refernece for myself, when setting up new asp.net core spa and VueJS based project along with laravel mix the following setting helps in translating the path resolution correctly: mix.setResourceRoot('/dist/') .setPublicPath(path.normalize('wwwroot/dist')); so a typical laravel-mix webpack.mix.js file for asp.net core and vue js project (especially with admin-lte) would look like: mix.js('client-src/main.js','') .extract([ 'vue', 'vue-router', 'vuex', 'chart.js', 'admin-lte', 'bootstrap', 'jquery', ]) .autoload({ jquery: ['$','jQuery', 'window.jQuery'] }) .sass('client-src/assets/vendor.scss','') .sass('client-src/assets/main.scss','') .setResourceRoot('/dist/') . [Read More]

Publishing aspnet core web app to linux

Step 1 : Publish your project to a proper directory On researching a subfolder under /var seems to be a good candidate. So, create a suitable subfolder and copy the published app files to it. For future reference lets assume we have copied the app to /var/myproject folder. Step 2: Configure reverse proxy > sudo apt-get install nginx > sudo service nginx start update /etc/nginx/sites-available/default to server { listen 80; location / { proxy_pass http://localhost:<port_number>; proxy_http_version 1. [Read More]

Adding Service Account in Linux

useradd --system [--no-create-home] <account name> from the man pages If called with one non-option argument and the –system option, adduser will add a system user. By default, system users are placed in the nogroup group. To place the new system user in an already existing group, use the –gid or –ingroup options. To place the new system user in a new group with the same ID, use the –group option. [Read More]

NuFetch – Nuget package with dependency downloader

At last got some free time and got a chance to solve a problem I was having; downloading NuGet packages along with its dependencies for hosting them in an internal network NuGet server. It was a big pain to download a package along with its dependent packages till now, you have to either use Chrome/Firefox plugin or the NuGet package manager and download the depedencies one after another. To address this I spent the last week cooking up a package downloader which takes care of the dependencies along with the main package and stores them in a folder of your choice. [Read More]

Preparing Visual Studio 2015 and Windows SDK setup for Offline installation

There are 2 ways to get the Visual Studio 2015 installation for offline installation: Option 1 – ISO File: Download the ISO file for Community or Enterprise edition. Then virtual mount them to a drive or extract them using a tool (like 7Zip), and start your installation. When I tried this option, the visual studio seemed to miss few packages which it downloaded through an online feed during the installation. So, a better option is to use… [Read More]

Visual Studio 2015 Extensions

Plugin Description NuGet Packager Template for creating NuGet packages easily. SQL Server Compact/SQLite Toolbox This add-in adds several features to help your embedded database development efforts: Scripting of tables and data, import from SQL Server and CSV files and much, much more. Database .NET v16 Multiple database management tool Most stuff from Mads Kristensen * Web Compiler * Bundler & Minifier * Web Essentials 2015 * Add New File * CssCop – FxCop for Stylesheets * Image Optimizer * SideWaffle Template Pack * File Nesting ResXManager Manage localization of all ResX-Based resources in one place. [Read More]

EnsureBclBuildImported pre-build check causing build errors in Visual Studio 2014 Update 4

After the recent update to Update 4 creating a new web application is by default causing a build error. The real error message is as follows: This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567. Editing the project file revealed the following line: <Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''"> <Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. [Read More]

Migrating MS-SQL 2008 to 2012

Pre-migration Update the new servers to have the latest updates for both OS and MS-SQL Setup Windows Failsafe cluster Setup Always-On availability group, replicas and listener Setup shared folder for storing backups from the old database servers Setup shared folder for storing backup/synchronization data for the new database servers Create a copy of the stored procedures used by jobs, and update them to work with availability group Script the SQL server logins If you want to change the databases to read-only mode, remove existing mirroring functionality for the databases Migration Put up App_Offline. [Read More]

ASP.NET vNext, a quick look into the future

MVC Controllers and WebAPI Controllers are now merged to form single controller class No need for physical folders for Areas, just decorating a Controller with [Area(“AreaName”)] gets you the desired result. But the problem is rendering engines still look for Views in Areas/{area name}/Views/{controller} path. So I guess you are better of placing your Controllers also in Areas/{area name}/Controller folder for better organizing them Route mapping looks a bit better now with the following syntax // MVC 6 route routes. [Read More]