Showing posts with label VS2010. Show all posts
Showing posts with label VS2010. Show all posts

Wednesday, September 29, 2010

How to resolve unresolved type System.Web.Security.MembershipCreateStatus which appears after converting from vs2008 to vs2010

I upgraded a project I was working on from vs2008 to vs2010 and started getting an error for an unresolved type: System.Web.Security.MembershipCreateStatus.

My project was targeting the .NET Framework 3.5 and during the conversion, I selected not to change the target to the .NET Framework 4.0.

This issue was occurring in my Test project which was generated automatically when I created an MVC 2 project in vs2008. In vs2010, test projects cannot target the 3.5 Framework (by design). The quick fix was to delete AccountController.cs in the test project.

A better solution would be create another MVC2 project in vs2010 and use the generated Test project.

Saturday, September 18, 2010

How to copy color syntax from VS2010 to Blogger

Update: I just noticed that this is working in Chrome (which is what I usually use), but on in Internet Explorer 8

Step 1: Install Productivity Power Tools (which include HTML copy)
Step 2: Highlight some code and copy to the clipboard with [Ctrl][c]
Step 3: In Blogger, paste with [Ctrl][v]

If pasting HTML, you'll need to encode your less than signs. (Change < to &lt;)

               switch (pricedisplaytype)
{
case (int)ProductPriceDisplayType.DontShowPrice:
item.ItemTitle = description;
break;
case (int)ProductPriceDisplayType.ShowPriceEach:
item.ItemTitle = String.Format("{0} (${1:n3} each)", description, qty.Price / qty.Quantity);
break;
case (int)ProductPriceDisplayType.ShowTotalPrice:
item.ItemTitle = String.Format("{0} (${1:n2})", description, qty.Price);
break;
}