This article describes how to fix and tweak your pre-build directives in Visual Studio – just in case they refuse to work properly. Because yeah, apparently that sometimes just randomly happens. But fear not – there’s a stupid and ugly, but definitely thoughtful workaround available! Also, sorry for the confusing title. I’m taking suggestions for a more descriptive one – but this one was kind of difficult to word clearly. Anyway – on to the topic of the day! Problem So you’re either trying to…Continue reading How to fix a build configuration that’s not available as a build directive in Visual Studio?
This article explains how to restore any hidden windows in Visual Studio without resetting your whole window layout, by using a common keyboard shortcut. Problem We’ve all been there – you’re opening a new window in Visual Studio, but your keyboard shortcut or clicking the item in the menu simply seems to do nothing. The window doesn’t show up anywhere. Reason The reason for this (most of the time) is simple: you have the window popped-up and located outside your screen. This happens pretty much…Continue reading How to restore lost windows in Visual Studio?
I have just resolved a random issue that’s difficult enough to google so I thought it would be worth documenting! These seem to be popping up whenever you work with anything that’s fairly fresh out of the oven… This particular case revolves around Visual Studio being incredibly obnoxious and starting to throw a ton of errors on code that worked five minutes prior. In my case, the error happened after updates to Visual Studio. Always fun. Symptoms The errors started popping up in Visual Studio.…Continue reading How to fix “The type or namespace name ‘Services’ does not exist in the namespace ‘Microsoft.AspNetCore.Components’ (are you missing an assembly reference?)”
This post describes how to fix the “Could not load file or assembly ‘[assemblyname]’ or one of its dependencies. An attempt was made to load a program with an incorrect format.” error. The solution described in this post shows you how to resolve the issue when you’re deploying from Visual Studio but get an error somewhat like the above when deploying to IIS or when opening your website after the deployment. This applies to your local development environment. Problem Especially while installing a new dev…Continue reading Fixing the “Could not load file or assembly or one of its dependencies” error
This post describes one of the more no-brainerish ways of fixing a ‘System.OutOfMemoryException’ exception being thrown in your ASP.Net MVC application using C# and Entity Framework. Problem While developing a web project, for example, an ASP.NET MVC web application that is using EF, sometimes when handling a lot of data or complex entities on your dev machine, you encounter this error: This of course blocks you from debugging or even running at least this part of your code locally. What to do? Reason By default,…Continue reading Exception of type ‘System.OutOfMemoryException’ was thrown.
This post describes a few different ways of fixing the “The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.” error. One can encounter this issue when trying to package/publish a SharePoint solution, web site, or an Azure Webjob. Symptoms Visual Studio throws the following error when packaging a SharePoint solution to a .wsp file when deploying or publishing your web project (for example…Continue reading Fixing the error: “The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.”