September 2008 - Posts
If you are building a default template for your custom control , then you would define it in a file called Generic.xaml and include it as a resource. When you do so , make sure that the custom tool and Custom tool namespace entries are cleared .Other wise , the template will not show up
If it looks like below ( note the Custom Tool entry), it does not work

This is how the properties should look for it to work

Note the entry for custom tool is cleared
Silverlight Release Candidate is now available.
There are some changes from Beta 2 to RC . Changes are listed here There are also 3 new controls namely
1.Combobox
2.Progressbar
3.PasswordBox
For more information.. see this indepth post from Scott Guthrie
Scenario: You have a TFS.proj file that builds a solution file and you want to pass a dynamically generated property to the solution file you are building. Eg it could be the version number that had to be passed over to the solution / say web deployment project.
<SolutionToBuild Include="MySolution.sln">
<Properties>Version=$(Version)</Properties>
</SolutionToBuild>
The above code snippet will not work .Instead you have to make use of the CustomPropertiesForBuild reserved property and do something like this
<PropertyGroup> <CustomPropertiesForBuild>$(CustomPropertiesForBuild);Version=$(Version)</CustomPropertiesForBuild> </PropertyGroup>
This will ensure that the property Version is passed on to every solution that the Team foundation Build calls.
If you want to pass custom properties into every solution when the TFS Build calls the Clean Target then you should be using the reserved property CustomPropertiesForClean
See this post for some more info
Trika from Microsoft Learning has a nice post on the exam availability and the road map for Visual Studio 2008 certifications if you are planning to appear for some of them. Here is another post from Jorgen that details the path.
Did you know that in C#, the anonymous types are immutable ie they cannot be changed. However in VB.NET this is not the case.
The following example illustrates the difference
In C#
var customAnonymoustType = new { Name = "Some Name", Age = 12 };
customAnonymoustType.Name = "New Name"; //This will not compile
You will get the following error message "Property or indexer 'AnonymousType#1.Name' cannot be assigned to -- it is read only" .Let us now try the same thing in VB.NET
Dim customAnonymoustType = New With {.Name = "Some Name", .Age = 12}
customAnonymoustType.Name =
"New Name" 'compiles fine
Just one of the differences between VB.NET and C#
There was a question today on how many types are there in the .NET framework and I remembered reading about that on Brad Abram's blog. As of .NET 3.5 there are 11,417. This is the link to his post with much more detail
I am a big fan of portable apps that gives me the flexibility to run applications from my USB stick. I was on the look out to see if there was a portable version for the new chrome browser from google . They don't have it there but I did find one here
Just down load the exe , unzip the contents and copy the folder to your zip drive and voila you have chrome running from your USB stick. All the profile information etc gets stored to the folder on the usb drive.
Being an active member of the asp.net community and the forums at www.asp.net, I have been toying with the idea to start a blog to document some of the commonly asked questions over there and also post some of the interesting stuff that I come across during my work and readings.Some how I just kept putting it off for another day. But this labor day week end I decided that I have procrastinated enough and decided to take the plunge. so here I am
I do have to thank my friend and colleague Tom Fischer for the "final push" :-)
More Posts