If anything can drive this Irishman into a fit of cursing, it's the need to create a regular expression quickly. With a little application, I know I could learn to create them myself but I figured some time back that the frequency with which I use them would not equate to the time invested in the study. So, I either have to rely on ones that I have, and can never locate, or turn to a good tool.

Well, I was reading Professional ASP.NET 3.5 in C# and VB by Scott Hansleman and others recently when I saw mention of a Regular Expression Editor in VS 2008. This was news to me! Then I noticed a regular expression facility in the Find and Replace tool (CTRL-F); how long has that one been around? Anyway, it was just what I needed for some basic regex's for email and phone numbers.

VS 2008 Regular Expression Editor

 

The only problem is trying to find the thing... they couldn't have hid it better if they tried. First, you have to be in design view to begin to locate it. Do people actually use design view? Then you have to refer to the control's properties window and click on the button next to the ValidationExpression property to launch the editor. Obvious, huh? :-|

VS 2008 Regular Expression Editor

 

Granted, it's pretty basic but if you're in a hurry this will save you some Googling time! I wonder is it possible to extend this tool to add in one's own custom regex's for reuse?

One more thing: Scott's book is a great reference with over 1600 pages of info. I have only two gripes about it: 1) If you read it in bed you'll need a hoist to avoid the hernia, and 2) The entire book is based on the Web Site template. What were they thinking of?

kick it on DotNetKicks.com   PHP, ASP, .NET, JSP Resources, Reviews



VS 2008 on Vista 64-Bit

by agrace 3. August 2008 19:58

Vista Desktop Carousel I've been uncharacteristically quiet lately but kept busy with the creation of a new County SharePoint Intranet. I've also been busy on the home front, building up a new development machine which is the topic of this posting.

Although I have been working with VMs for the last year or so, and find them amazingly powerful to work with, a couple of things contributed to ongoing hirsutical challenges. Firstly, external drives simply don't cut it performance-wise and secondly, you really need ample RAM, storage and raw horsepower to develop SharePoint on VM's and still carry out normal development on the host machine in Visual Studio. At work, my problem was solved by an investment in VM servers and a SAN. At home, I felt like the Slowsky snail in the Comcast ad :-S

I upgraded from an XP Pro machine with 2MB of Ram, half of which was added a few months back, to a new HP D5000t 64-bit PC with a Quad Q9450 2.66 GHz processor, 8 GB of RAM and a 500GB SATA drive. I've hooked up a 500GB external Western Digital drive, mainly for back-ups and graphics storage. And I have purchased an extra internal SATA Seagate 750GB drive which I will use for all my VM work. More than anything, I wanted to work with VS 2008 on my host PC and this was the main carrot on the stick for upgrading.

Here are a few things to remember if you are moving to VS 2008 on Vista:

1) You need to get a version above Vista Home or Home Premium, such as Vista Ultimate, if you want IIS7 to play nice. This is reminiscent of having to use XP Pro over XP Home with IIS 5.0. If you try to install SQL Server 2005 on anything less than Ultimate you will start getting install errors relating to missing IIS7 features. Ultimate is $319 off the shelf so it's cheaper to include the upgrade when purchasing the PC.

2) Add the required components to IIS7 by going to Control Panel, Programs and Features, and clicking on "Turn Windows features on or off" on the left of the screen. See here and here for more details.

3) Your development tools have to be installed in this order: SQL Server 2005, SQL Server 2005 SP2 service pack, and finally VS 2008. Do not open anything in SQL Server 2005 before the service pack is installed. If you do not follow this order of install, you will have real problems installing the SQL Server Management Studio (SSMS) IDE. After VS 2008 is installed open it once to initialize it before checking for any Windows updates.

4) When installing SQL Server 2005, you may start getting compatibility errors; ignore these. After everything is installed you may notice some errors in your event log like this code 10 error:

"Event filter with query "SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA "Win32_Processor" AND TargetInstance.LoadPercentage > 99" could not be reactivated in namespace "//./root/CIMV2" because of error 0x80041003. Events cannot be delivered through this filter until the problem is corrected."

KB 950375 contains a script to easily resolve this.

 

It was pretty painless to grab one of my existing 2.0 Web application projects from back-up and get it to work in VS 2008, using the multi-targeting feature.

Database Publishing Wizard 2.0

One of the lesser-known VS 2008 gems is the built-in Database Publishing Wizard 2.0. While developing with VS 2005 / SQL Server 2005, I have always used the standalone Database Publishing Wizard 1.1 to deploy SQL Server databases to production. It was a bit hacky but worked very well for a long time. Now the new wizard is built in and can be accessed in Server Explorer. Just add a connection, right-click it and select "Publish to Provider". You can use this to deploy complete databases both ways between a hosted server and your local IDE.... very nice :-)

kick it on DotNetKicks.com   PHP, ASP, .NET, JSP Resources, Reviews   vote it on Web Development Community