VSCode, being extremely lightweight (at least compared to Visual Studio), does not come with its own web server. This can be a bit confusing for those of us used to just hitting F5 in Visual Studio and getting our website launch in a browser.
When using VSCode, you have to rely on the power of Node.js instead.
This is a tutorial of how to start a really small project, containing only a single HTML file in VSCode and edit it with live preview in a browser.
Continue reading Live preview of website when editing in Visual Studio Code
This is a super short introduction to start writing TypeScript in Visual Studio Code. This tutorial is written for Windows users, but it should be roughly the same procedure for Linux and OS X users, since all these tools are cross platform.
This post is not actually about writing TypeScript, it’s just a guide to set up VSCode correctly to be able to write and compile TypeScript. Continue reading Getting started with TypeScript in Visual Studio Code
(And handle revision numbers larger than 65534)
When using a system for continuous integration to automatically deploy your application, it is important to know what version of your code is deployed. This tutorial will show you how to automatically set the version number of the deployed .dll.
In a .NET project, the version number is defined in AssemblyInfo.cs, on the format 18.104.22.168. The numbers are MajorVersion.MinorVersion.Build.Revision. The two latter, build and revision numbers, should be set automatically by your CI system on each deploy.
Content of this tutorial
- How to create an MSBuild target to automatically insert the revision number on build
- What to do when your revision numbers are too large to use as .NET revision numbers
- How to use Bamboo to get the latest revision number from Subversion and use this as an input parameter to MSBuild
Continue reading Use Subversion revision number as version number with MSBuild
I’m currently working on a project where I have an AngularJS app (a form), that will be displayed on several different external websites. This means that I have to style the form to fit into several different page designs, with different existing stylesheets.
The form itself is styled using Bootstrap, one of the most commonly used front-end frameworks.
TL;DR: To style only a selected part of a website using a CSS framework, I create a container div around the app with a unique id, and then use LESS to change all the style definitions in the framework to only affect this particular id. This process is done automatically on build using .NET MVCs bundling framework.
Continue reading How to use Bootstrap or other CSS frameworks on a small part of a page without affecting the rest of the page’s style
I am working on a project where I have an AngularJS app on my own .NET MVC website, and I will display this app on several remote websites.
Why do I need to find a contact by display name?
In my app, I wanted to open a specific contact and add another phone number to it. I didn’t have the contact id of the contact, only the display name.
Continue reading Android: Find a contact by display name
Why would I want to add many content type aliases to a content organizer rule?
When creating a content organizer rule in SharePoint, the default is that the rule is only valid for a single content type. To get around this limitation, you can add other content type names to the field Aliases (also known as RoutingAliases), displayed as “List of alternate names” in the SharePoint editor.
Continue reading SharePoint: Create a content organizer rule with many content type aliases using PowerShell