You might get this error while doing update-database -verbose via Package Manager Console:
No pending code-based migrations.
Applying automatic migration: 201310081433521_AutomaticMigration.
Automatic migration was not applied because it would result in data loss.
This error happens when your data model is not in synch with your database. There are two ways to fix this: The first approach is by adding/deleting the columns that you added/dropped manually to your table and then re-running update-database again. […]
A Singleton, in software engineering, is a design pattern that is used when you only want/need to allow one instance of a class. This is specifically useful when the class instantiation of the said class is resource expensive (e.g. database connection, graphics driver, network resource and file streams…). Below is a UML describing the implementation details of a […]
I was working on a sample project today when I encountered this error after adding a new Console Application project to my Visual Studio solution that references other Class Library projects contained in the solution: The referenced assembly “C:devcenterdotnetpersonalKeithRull.BibliaKeithRull.Biblia.Service.RepositorybinDebugKeithRull.Biblia.Service.Repository.dll” could not be resolved because it has a dependency on “System.Web, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” which is […]
I received this error while deploying a WCF 4.0 service to a newly created virtual directory. Could not load file or assembly ‘KeithRull.Biblia.Service’ or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. Description: An unhandled exception occurred during the execution of […]
While working on RIA Services and Silverlight you might get an error like this: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; HPNTDF; InfoPath.3; .NET4.0C; .NET4.0E; MS-RTC LM 8) Timestamp: Fri, 18 Feb 2011 18:20:46 […]
I was working on a prototype application today when I needed to use a BulletList. At first I thought it existed on the toolkit controls but to my surprise it wasn’t so I ended up creating an ItemsControl template that mimics how a BulletList would behave. I wanted to post it here to show you how I […]
Everyday you learn something new. You do. That is if you let yourself to be taught everyday. I didn’t know that you could solve this expression string in .NET in one line of code: “4 + 5 + 10 – 4 / 5 * 2”
static void Main(string args)
string expressionToEvaluate = "4 + 5 + 10 - 4 / 5 * 2";
var result = new DataTable().Compute(expressionToEvaluate, null);
The result is 17.4. Nifty huh? You can […]
Just in case you missed it, Tim Heuer has announced that Silverlight 4 Tools for Visual Studio 2010, WCF RIA Services and 3 new SL themes have been released today. This is an exciting news for Silverlight aficionados who have been waiting for the RTM version of SL4 Tools since the last RC who are […]
Sometimes its the basic things that we tend to forget. It’s true. One example is encrypting the ViewState. Someone asked me this question today and I had to admit that I wasn’t able to answer on top of my head. Whats funny is that I’ve been doing it all along but never told myself to […]
Just in case you need to freshen up on the keyboard shortcuts for VS 2010 you can get them here.