Friday, October 27, 2006 7:17:39 AM (GMT Daylight Time, UTC+01:00)
I've had a really fun class this week. Norway is a beautiful place and the people are also very intelligent which makes for a very fun week of training. I want to thank Zsolt Ujvari who arranged the training her for Compello Software - http://www.compello.no/
BTW - If you are a reader of my blog you are probably interested in Windows Workflow Foundation - if you live in Norway and are interested in working on a next generation system using Windows Workflow Foundation (WF) - send Zsolt an email - they are hiring and I think it looks like a very interesting opportunity to learn new stuff and work with a cool team.
VS.NET | WF
Thursday, August 05, 2004 10:40:31 PM (GMT Daylight Time, UTC+01:00)
So VS.NET 2005 has been so super stable I was really suprised when it seemed like out of the blue it was crashing every time I opened the server explorer or tried to use the Data source designer in ASP.NET.
I fixed this by renaming the DefaultView.SEView file in my Application Data\Microsoft\VisualStudio\8.0\ServerExplorer folder to DefaultView.SEView.old - something in that file got corrupted. Since I only had two data connection in my view - replacing them wasn't so hard, and after I renamed the old file I got a new one, and no more crashes. Yipeee! Hopefully this might help someone else.
ASP.NET 2.0 | VS.NET
Wednesday, June 02, 2004 9:55:52 PM (GMT Daylight Time, UTC+01:00)
Perhaps no one else is having this problem, but fairly regularly when I am working in VS.NET 2005 (the March version) doing Web Site projects, the Add New Item dialog is empty (there are no templates to select). Sometimes closing devenv.exe fixes this, sometimes not. So I wrote a macro that can be called from the Command Window that will add those items. Another interesting thing (which I don't remember from 2002/2003) is that the only macros that will appear in the Command Window are macros that only have one parameter (perhaps I just missed this before).
Anyway - here is the macro in case anyone else needs it:
Public Sub Add(ByVal subdir As String, ByVal templateName As String, ByVal fileName As String)
Dim p As Project = DTE.Solution.Projects.Item(1)
templateName = String.Format("C:\Program Files\Microsoft Visual Studio 8\Web\WebNewFileItems\{0}{1}", subdir, templateName)
Dim newFileName As String = fileName
p.ProjectItems.AddFromTemplate(templateName, newFileName)
End Sub
Usage is :
Macros.MyMacros.Module1.AddASPX "|HtmlPage.htm|TableTest.htm"
or
Macros.MyMacros.Module1.AddASPX "CSharp|WebForm.aspx|Foo.aspx"
ASP.NET | VS.NET
Monday, March 01, 2004 3:54:29 PM (GMT Standard Time, UTC+00:00)
Stan (who always has great posts even if you aren't into MC++ ) has some posts about changes to MC++ in Whidbey relating to boxing.
For the most part boxing and unboxing aren't a big concern, and as he rightly points out, it is mostly hidden from us C#/VB.NET developers. One thing I try to point out when I am teaching, mostly by the way I write code is that whenever I have a value type (even things like an int), and I need to convert it to a string, I always explicitly call ToString(). I've had more than one student ask me why I do that, because the compiler will certainly sometimes make that call for me if a value type has to be converted to a string and I forget, most often in calls to Console.WriteLine.
So this:
Console.WriteLine(v);
essentially turns into this:
Console.WriteLine(v.ToString());
But one important difference is that when I don't *explicitly* call v.ToString(), the compiler has to box the value type (essentially meaning a second copy of the value type is made on the managed heap). When I do explicitly call ToString(), *if* the value type has overriden ToString() (which most value types do) I avoid the box instruction (and the copy). With statement completion in VS.NET doing this on a regular basis is as easy as typing v.To and then hitting CTRL-SpaceBar to cause VS.NET to fill in the rest of the call.
For those of you writing in VB.NET, remember to go to Tools-Options-Text Editor-Basic and unclick "Hide advanced members" , regardless of what the VB.NET team seems to think, I find it insulting and a continuation of the negative stereotyping of VB.NET developers to not allow them to see ToString on the statement completion list
VS.NET | .NET
Monday, February 16, 2004 8:00:00 AM (GMT Standard Time, UTC+00:00)
I love teaching because I always learn things, either by being asked questions or just directly from my students.
As a follow-up to my last post, two of my students last week (thanks Jeff and Scott) showed me two other short cut keys which are extremely useful.
Ctrl-K,Ctrl-C which comments out a block of selected code.
Ctrl-K,Ctrl-U which uncomments out a block of selected code.
Another useful set of keystrokes to add to my arsenal.
VS.NET