0 Comments

I used to code using Resharper previously and have gotten used to the F12 key to navigate to the next problem area / errors in my code and then pressing Alt+Enter to quickly fix the problem.

This is very useful and speed up my coding time considerably when doing TDD style development.

Missing Resharper in Visual Studio 2010, I was determine to find a way to replicate this.

After messing around a while with Tools, Options, Keyboard and Macro and what not, I found a way to do this.

It turned out my keyboard scheme was set to Visual Basic 6 for some reason instead of C# and the thing that I’m looking for was not bind to any key.

In C# scheme, the View.NextError command is bound to Ctrl+Shift+F12.

In VB6 scheme, View.NextError is not even bound.

After fixing the scheme, I was able to work much faster.

1. Code as usual per TDD, some squiggly lines will show up as you typed in class / method name that has not been defined yet.   Keep going until done.

2. Press Ctrl+Shift+F12, it will jump to the first squiggly.  Click Ctrl+. or Alt+Shift+F10 to show the smart tag options.

3. Choose the action that I want (Generate stub, etc.) and hit Enter.

4. Press Ctrl+Shift+F12 again to go to the next squiggly, repeat the process until I am done.

Awesome!!

I might remap the keyboard shortcut to how Resharper setting (F12 and Alt+Enter).  So used to those settings and less keystrokes involved.

0 Comments

I was playing around with the Northwind database, just to catch up on ASP.NET 2.0 stuffs.  I am not sure if it is just me or the web server that comes with VS 2005 is missing some features.  For example, it took me hour to find out why my page design is not displayed with the correct styles.

I have <link rel=”stylesheet” type=”text/css” href=”styles/global.css” /> tag in my <head> section of the aspx file.  I checked and rechecked that my tags are using the correct CSS class name... and they are.  But, to no avail, every time I ran the web app for debugging, it shows up w/ the wrong (default IE styles).  I had set my body tag to use Tahoma font, but yet the one that showed up in the browser is Times New Roman, etc.

At first, I suspected my Internet Explorer was misbehaving.  Spent an hour or so looking through the Internet Options...(everything OK, Accessibility features are all off), going through the registry entries...nothing suspicious there also.

Finally I decided to create just a plain HTML file with inline styles... lo and behold... it worked.  So I decided to try to do the same thing with the web app. page that I was testing (remove the <link> tag and move the CSS into inline <style> tag.  Well, that seems to work.

Instead of suspecting IE, I now begin to suspect the built in webserver.

To test my theory further I move the web application into full blown IIS and it seems to be working well from there (from the same browser on the same test machine).

I guess it was the built in web server after all?  Can it be that it does not support linked CSS?  Is it just me or this is the case? Hmm.. I will have to try on a different development machine sometime...

Oh btw, if you are running IIS with both ASP.NET 1.1 and ASP.NET 2.0 on the same machine, make sure you put your 2.0 in a different Application Pool / App. Domain or it won't run at all.