Looking for the solution. Yes you are at the right place. Once I also faced the same issue when I was working on a MVC project, I got the error states that “The located assembly’s manifest definition does not match the assembly reference” .
When I ran the solution I saw the YSD (yellow screen of death) that simply gave me the assembly name which is causing the issue.
Could not load file or assembly ‘System.Web.Optimization, Version=220.127.116.11, Culture=neutral, PublicKeyToken=31BF3856AD364E35’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. HRESULT: 0x80131040
In my case I have several MVC projects referring to “System.Web.Optimization” , but I’m getting this issue only in newly added project. When I investigated the issue I found that the project referring to the higher version of “System.Web.Optimization”. This is because the dll has been included using nuget and nuget always downloads the latest version of dll.
FYI: The Microsoft.Web.Optimization package is now obsolete. With ASP.NET (MVC) 4 and higher you should install the Microsoft ASP.NET Web Optimization Framework.
Continue reading “The located assembly’s manifest definition does not match the assembly reference”
DLL Hell Problem
DLL Hell is a problem in which two different Application share a common assembly and If one Application changes the common assembly, the changes which are not backward compatible will cause another Application to crash. Let us understand this with an example.
Let say you have two Applications, we can call it as Application1 and Application2 and both Applications shares a common Assembly we can call it as Shared. Both Application consumes GetOperation().
Continue reading “DLL Hell Problem and Solution”
Web development is easier when you’ve got the right tools/extensions. There are various tools and extensions available for visual studio that will make your programming more efficient by saving your lots of time and make your life as a developer easier and more productive. The Visual Studio Gallery is the best place to find tools, controls, extensions and templates, so as my favorite place too.
In this article I’m publishing my personal favorite extension which I assume may helpful for you too as per my programming experience. This extensions may update time to time, so for now I am listing all those which are useful and must haves. You can comment those you find useful for you so we can keep this list updated and which will be useful for me and others too.
Continue reading “Must Haves Visual Studio Extensions”
How to change the icon of a Console App in Visual Studio
Compiling a console application will create an executable for your application, but with the default icon. You can change that icon and apply any ICO to your application which you want . In this article I’II show you in few simple steps.
- Right Click on your project and Click on Properties. (This will open a Properties Window for you)
- In bottom section you will find Resources as mention in the screenshot below.
- Check Icon and manifest option.
- Select and ICO file you want it as your application icon.
If you don’t have an ICO file than I found an Online tool that will convert an image into ICO file for you.
Happy Coding.. !!
How to sign third party assemblies
You need to sign assemblies if you want to put them in the GAC.
If you sign an executable, then any class libraries it links to also needs to be signed. This can be difficult if you’re using a third-party library.A very important reason to sign an assembly is so you can be sure it is your assembly. Since the private key is yours, nobody else can sign an assembly with that same key. This means that when the public key of an assembly is one you know.
Continue reading “How to sign third party assemblies”
C# Coding Standards
General Naming Conventions
Following a consistent set of naming conventions can be a major contribution to readability. Beyond consistency of form, names of application and framework elements must be easily understood and must convey the functions of each element.
It is important that the names of identifiers make sense on the first reading. Identifier names should clearly state what each member does and what each type and parameter represents. To this end, it is more important that the name be clear than that it be short. Names should correspond to scenarios, logical or physical parts of the system, and well-known concepts rather than to technologies or architecture.
Do choose easily readable identifier names. For example, a property named HorizontalAlignment is more readable in English than AlignmentHorizontal.
Do favour readability over brevity. The property name CanScrollHorizontally is better than ScrollableX (an obscure reference to the X-axis).
Continue reading “C# Coding Standards”