Read and understand code faster with programming ligatures in Fira Code font | Making Visual Studio perfect

I was recently on a conference and spotted this nice code font:
Fira Code
which makes use of “ligatures” that takes common programming characters and make them more readable.

Such as >= ++ != and presents them in a more condensed and more readable way.

Read more here:
Read and understand code faster with programming ligatures in Fira Code font | Making Visual Studio perfect

To use in Visual Studio 2017, download from:
https://github.com/tonsky/FiraCode/releases/download/1.204/FiraCode_1.204.zip

Unzip ttf folder select all fonts, right click menu and install.
Open/Restart VS2017 -> Options -> Environment -> Fonts and colors -> Select “Fira Code” as font.

Fira Code on github:
https://github.com/tonsky/FiraCode

Scott Hanselman on Monospaced Programming Fonts with Ligatures:
https://www.hanselman.com/blog/MonospacedProgrammingFontsWithLigatures.aspx

See more code in VS2017 – Shrink Empty Lines Addon

Use this addon for VS 2017:

Source: Shrink Empty Lines – Visual Studio Marketplace

Shrinks empty line height in code editor by 25% to be able to see more lines of codes at a glance.

Read more:
https://visualstudioextensions.vlasovstudio.com/2014/06/04/see-more-lines-of-code-with-syntactic-line-compression/

Attach To All The Things – Visual Studio 2017 Addon

Great tool for attaching VS 2017 debug to IIS for instance.

It will add some menu options under the Tools menu.
After installing this addon its possible set a keyboard shortcut by searching for “tools.attach” in the VS keyboard shortcut window.

Source: Attach To All The Things – Visual Studio Marketplace

Elasticsearch for .NET and EPiServer developers

Ealasticsearch Tutorial:
https://www.toptal.com/dot-net/elasticsearch-dot-net-developers

Vulcan is an EPiServer lightweight (free) alternative to EPiServer find, based on Elasticsearch as well:
https://world.episerver.com/blogs/Dan-Matthews/Dates/2016/4/introducing-vulcan-the-lightweight-elasticsearch-client-for-episerver/

https://world.episerver.com/blogs/Dan-Matthews/Dates/2017/1/vulcan-comes-of-age/

Creating EPiServer admin tool plugins using MVC

Creating the tool:
EPiServer – How to create gui plugins using MVC – Dejan Caric
I had to configure the route initialization like this to make it work:

        public void Initialize(InitializationEngine context)
        {
            //ContentLanguagePlugin
            RouteTable.Routes.MapRoute("ContentLanguagePlugin", "admin-tools/content-language-plugin/{action}/{id}",
                new
                {
                    controller = "ContentLanguagePlugin",
                    action = "Index",
                    id = UrlParameter.Optional
                },
                new
                {
                    controller = "ContentLanguagePlugin"
                });

        }

I added EPiServer resources in <head> for EPiServer CSS feeling to it:
(_Layout.cshtml file)

@using EPiServer.Framework.Web.Resources
<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <title>Content Language Tool</title>

    <!-- Shell -->
    @Html.Raw(ClientResources.RenderResources("ShellCore"))
    @Html.Raw(ClientResources.RenderResources("ShellWidgets"))

    <!-- LightTheme -->
    @Html.Raw(ClientResources.RenderResources("ShellCoreLightTheme"))

    <!-- Navigation -->
    @Html.Raw(ClientResources.RenderResources("Navigation"))

    <!-- Dojo Dashboard -->
    @Html.Raw(ClientResources.RenderResources("DojoDashboardCompatibility", new[] { ClientResourceType.Style }))
    
    <style>
        a {
            color: blue !important;
        }
        a:hover {
            text-decoration: underline !important;
        }
    </style>
</head>

<body>
    <div class="epi-padding epi-contentArea">
        <div>
            @RenderBody()
        </div>

    </div>
</body>
</html>

Some info regarding the EPiServer CSS classes etc:
https://www.epinova.no/en/blog/creating-a-consistent-look-in-episerver-plugins/

 

How to Increase build agent execution time? (VSTS)

When running long running tests (perhaps UI tests with Selenium)
I got this error:

The job running on agent xAgentNamex has exceeded the maximum execution time of 01:00:00.

The default timeout for VSTS Agent is 60 minutes.
The solution was to increase Build job timeout in minutes, under settings of build definition in the VSTS dashboard.

Solution found here:
Source: tfsbuild – How to Increase build vnext build agent execution time? – Stack Overflow

Can I get detailed exception stacktrace in PowerShell? – Stack Overflow

There is a function up on the PowerShell Team blog called Resolve-Error which will get you all kinds of detailsNote that $error is an array of all the errors you have encountered in your PSSession. This function will give you details on the last error you encountered.

function Resolve-Error ($ErrorRecord=$Error[0])
{
$ErrorRecord | Format-List * -Force
$ErrorRecord.InvocationInfo |Format-List *
$Exception = $ErrorRecord.Exception
for ($i = 0; $Exception; $i++, ($Exception = $Exception.InnerException))
{ "$i" * 80
$Exception |Format-List * -Force
}
}

Source: Can I get detailed exception stacktrace in PowerShell? – Stack Overflow