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 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 machine,…Continue reading Fixing the “Could not load file or assembly or one of its dependencies” error
This post describes a quick solution to launching a new Visual Studio instance for debugging the code. There’s a lot of applications for this, but where I’ve found it exceptionally useful, has been in debugging the Entity Framework’s code-first migration’s (one of the ways for database initialization) Seed-method. It is by default undebuggable, as when you are running Update-Database you can’t really use a -debug switch or anything, and there’s really no way to launch the debugger. Hence the best you can do is using…Continue reading Launching a new debugger instance from code in Visual Studio
This post describes one of the more no-brainerish ways of fixing a ‘System.OutOfMemoryException’ exceptions 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 which 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 blog post is about fixing issues related to building a project with TypeScript files. Basically, if your jsx or tsx -files are not getting built to js-files (which is what the browser understands) in Visual Studio’s build, this post might solve the issue for you. Description While converting a project using React.js to TypeScript (and, hence, to use .ts and .tsx files instead of .js and .jsx) I stumbled upon this error: Cannot use JSX unless the ‘–jsx’ flag is provided The project would…Continue reading Fixed: Cannot use JSX unless the ‘–jsx’ flag is provided
This quick post describes how to get the Solution Explorer to actually track your currently open file. For some reason, this extremely useful feature is disabled by default in Visual Studio. Enabling it helps you to better conserve your context, and see which part of your solution you’re in, while you’re developing a complex piece of software. Give it a try, in case you haven’t already! It’s great and extremely useful! :) Posts Related to “Tip: Scroll Solution Explorer to current file in Visual Studio…Continue reading Tip: Scroll Solution Explorer to current file in Visual Studio 2012, 2013, 2015 and 2017
This post describes a few different ways of 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.” one can get encounter this issue at least 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…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.”