Jeremy Davis
Jeremy Davis
Sitecore, C# and web development
Page printed from: https://blog.jermdavis.dev/tags/visual-studio

Posts tagged Visual Studio

Attaching a debugger to Sitecore in Docker

The approach I read on how to "how to attach your debugger to Sitecore inside Docker" by running docker inspect to fetch the current IP address, and pasting it into Visual Studio can be a bit of a faff. So I got to wondering: Are there other ways to achieve the same result?

Docker Visual Studio ~2 min. read

I think I found my reason not to use VS2019 for everything..

I've been using VS2019 for all my personal development work pretty much since the first preview came out. For general coding and debugging it's been good so far – stable, and effective. And little things like git stash control from the UI make me happy... It got its full release recently, just before I spoke at SUGCON 2019 – where I said I'd blog something about how 2019 changed the performance measurement stuff that I was presenting. Having done some tests in the last few days, it's not looking so shiny any more...

Memory deltas in Visual Studio debugging

Working on a couple of personal projects recently, I've been reminded again how helpful I find the profiling tools that Visual Studio's debugger gives you. As you may have guessed from some of my previous posts, every so often I get to worry about the performance of .Net code at work – but it's useful for any sort of project, not just Sitecore. And investigating some issues in my own code, memory snapshots and deltas helped me out again. So maybe they could help you too?

Visual Studio ~2 min. read

Measure if you want to go faster!

I got the chance to speak at the Manchester Sitecore user group recently, introducing some tools and tricks that can be used to measure site performance while you're developing your Sitecore code. For anyone who wasn't there (and those who were but, want to refer back to what I said) here's a summary of the important bits of content from that talk...

(Re)Discovering Visual Studio Snippets

I've been using the built-in code snippets in Visual Studio for years, but for some reason until last week it had never crossed my mind to work out how to create my own. After getting bored writing the same chunk of code too often, I was reminded of the old saying "You should automate any task you have to do more than once". So I decided to have a go at some snippets. Turns out it's both a useful trick to know, and not hard to do:

Visual Studio ~3 min. read

Banging my head against Git, Visual Studio 15 and SSL

Recently the hard drive in my trusty old laptop failed. Annoying, but ultimately it was just an excuse to go shopping, ignore most of my backup of the old machine and re-install all my programs from scratch. As part of that I decided that I'd try experimenting with the latest pre-release version of Visual Studio 15, to see if it was stable enough for me to use for my personal projects and blog coding now.

So having worked out how you re-install a "free upgrade from Win7" copy of Windows 10 and gone through through Visual Studio's new installer, I tried to clone some code from my private git server. Having been greeted with some cryptic errors, I've spent some time working out how to resolve the issue. So as ever, I'm writing it all down in case it's of help to others...

Visual Studio ~3 min. read

Visual Studio hangs on Sitecore solution load?

It is quite possible that this issue is entirely down to some odd aspect of the setup of the Virtual Machine I'm developing on at the moment, but recently I've experienced quite a few hangs when loading Sitecore solutions. Starting up Visual Studio to be greeted with a never ending progress bar:

A question for the community: Development patterns

A bit of a change of tack this week. Rather than writing about something I've been doing, I'd like to ask for your ideas on something I've been thinking about. This issue is way to complex to compress into a tweet to ask on Twitter, and it seems too opinion based to be asked on Stack Overflow. So I'll ask it here, in the hope that some of you clever people might offer your opinions. Comment below, tweet me, write blog posts in response, send carrier pigeons or whatever. All thoughts appreciated...

So here's what I'm thinking about: How do you set up your projects for development?

Using Nuget for your references to Sitecore DLLs

NuGet is a really useful tool for managing external references for your .Net projects. It's also a tool that the Sitecore community are making good use of, with loads of useful Sitecore extensions available as packages. Plus it's been extended with the ability to deploy things into a Sitecore instance. Another potential use in Sitecore projects (that I've not found much discussion of) is for your references to the Sitecore DLLs themselves. I've been experimenting with this on some of my projects, so thought I'd write down what I've tried.

Bonus chatter: Using the Visual Studio diff window to compare any files

A neat little trick I discovered recently, and promptly forgot to share is that you can make use of Visual Studio's diff window for any pair of files, without the need for a project or solution. All you need is a little command line trickery.

Visual Studio ~½ min. read