Thursday, August 8, 2013

vs 2012 - The primary reference could not be resolved because it has an indirect dependency on the framework assembly

I started getting this error after changing the target framework in build configuration for my web application in Visual Studio 2012.












To resolve this I had to unload the project and reload it into the solution.Right Click on the application in VS 2012 solution and select Unload Project in the context menu.

























Reload the project by right clicking on the project that is not available



asp.net - Method not found: 'Void System.Web.UI.ScriptResourceDefinition.set_LoadSuccessExpression(System.String)'.

You will get this error if you try to host your application on IIS Application pool running on .Net. 4.0 and your web application is built in .Net 4.5.By default the selected target framework for Visual Studio 2012 is .Net 4.5.

Right Click on your application in Visual Studio 2012, select the build configuration and choose .Net 4.0 framework.



Wednesday, August 7, 2013

asp.net - System.BadImageFormatException: Could not load file or assembly '' or one of its dependencies. An attempt was made to load a program with an incorrect format

You will get this error if you try to host a 32 bit web application on IIS7.To fix this error set "Enable 32 bit applications" flag to true in AppPool Advance Settings.