Visual Studio.NET 2008 and Windows Server 2008 Community Launch

Yesterday Lebdev held the Visual Studio.NET 2008 and Windows Server 2008 Community launch. We had some great demos and presentations.

Maral Topalian did a great presentation on Windows Server 2008.

Bilal Haidar did an awesome demo showing the new features of Visual Studio.NET 2008, ASP.NET 3.5, ASP.NET AJAX and Linq. You can download the demo code from his blog, its worth checking.

I came last in this event, showing a very simple demo using SilverLight 2.0, ADO.NET Entity Framework and ADO.NET Data services. I then created a WPF application by simply copy/pasting the code I used to create the Silverlight application into the WPF application. You can download the demo project here.

TFS Beta 2 upgraded to RTM

So I finally got around to upgrading our TFS server from Beta 2 to RTM (a little late, I know). The upgrade process went (unexpectedly) smooth. Here are the steps that I took to do the upgrade

Uninstall Team Foundation Server 2008 Beta 2
Uninstall Team Foundation Server 2008 Build Server Beta 2
Microsoft .NET Framework 3.5 PreRelease
Uninstall Compact Framework 3.5 PreRelease
Microsoft Web Authoring tool

After the uninstall process, I installed TFS and the Build Server, with no issues what so ever...sweet.

IE8 Beta 1 is out

Visual Studio .NET 2008 has been RTMed

Visual Studio .NET 2008 Team Suite has been RTMed, its available for MSDN Subscribers.

Since we are blessed with a very "(put a word of your choice to describe a terrible bandwidth connection)" bandwidth connection in this part of the world, I won't be able to experience the RTM before tomorrow :S.

My Super Laptop Battery

A couple of days ago I found out that I have a super laptop battery.

battery

So if 10% of the battery means 4 hours and 45 minutes of work, then 100% of the battery would mean around 40 hours of work.

How cool is that?? ;)

Windows Live Writer, missing?

Is it just me, or is Windows Live Writer missing.
I can't find it any where, try going to writer.live.com, it takes you to get.live.come/writer/overview, but it shows you a page saying Page Not Found.

wlw missing

Am I missing something here?

Team foundation server 2008 and Offline Mode

Recently I installed Team Foundation Server 2008 Beta 2 to use it as my main source control system.

One of the new features that I found out and started using regularly is the Offline mode.
Basically, when Team Explorer detects that there is no connection to the team foundation server, it switches to offline mode.

Once you connect back to TFS, you can click the Go Online button on the team explorer, it will scan all your files, compare them with the latest version on the source control, and shows you a list of changes that were made offline, and gives you the option to check the changes into source control.

A very welcomed addition, something that was missing in TFS 2005.

 

VS.NET 2008 Beta 2 and Javascript Intellisense

This time it's javascript's intellisense. It was working fine, untill I installed the TFS Team Explorer for VS.NET 2008, intellisense for javascript stopped working, and even code coloring for javascript was gone. Javascript appeared like a block of normal black text in both external JS files and in ASPX files. After a bit of googling, I found nothing....then my friend Bilal pointed me to a blog post that had a solution for the problem. Here's the link for that blog post

http://blogs.msdn.com/webdevtools/archive/2007/07/30/workaround-for-beta-2-javascript-intellisense-and-colorization-issue.aspx

Life's good again.

ScriptManager, AjaxControlsToolkit and .NET Framework 3.5

 

This might save you some head hitting on the wall.

I'm working on a Web App using VS.NET 2005. I'm using ASP.NET AJAX and the AJAX Controls Toolkit in the application. I have a lot of javascript to write, so I decided to use VS.NET 2008 instead of VS.NET 2005 so I can make use of all the javascript intellisense candy that comes with it.

I open the solution in VS.NET 2008, it tells me that my Web App is configured to run on .NET 2.0 and asks me if I would like to update it to run on .NET 3.5. I said sure, no problem, click Next..Finish, and the conversion is complete. Build the solution, everything builds fine…great.

Ok so now its time to run the app, rightclick on the page and click View In Browser….the browser opens, and I get greeted with the following error message

 

The control with ID 'ValidatorCalloutExtender1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.

 

(I'm using the ValidatorCalloutExtender control on this specific page).

Weird, that same page is working fine if I browse it using VS.NET 2005. So I think probably it's loading the wrong version of System.Web.Extensions assembly. I open the web.config file and confirm that the correct version (3.5) is being referenced…I removed the ScriptManager control from the page and readded it, still the same error. Did a bit of googling, got nothing.

After a lot of tries and attempts to try to figure out what was going wrong, the idea hit me….I might be using the wrong version of the Ajax Control Toolkit assembly…I checked the CodePlex site, and there it was, AjaxControlToolkit assembly for the .NET Framework 3.5. Downloaded and copied the assembly to the bin folder, every thing went back to normal…..

 

Its so easy to miss something like that, especially if you're upgrading from .NET 2.0 to .NET 3.5, where you expect everything to just "work".

Community Thinking -- Its all about the Community

At last, we're back. Lebdev in collaboration with Microsoft is holding a Community Night on Tuesday the 11th of September 2007. The main theme will be Community thinking, but there will be a couple of technical presentations, covering ASP.NET AJAX Extensions and Visual Studio.NET 2008 and .NET Framework 3.5.

This community night will be the first in the series of community nights that are planned for the comming period. In the past few months, we were not able to hold any events partly due to the delicate situation in the country, and also due to the lack of appropriate place to hold such events. But we at Lebdev are working hard with the local Microsoft office to setup a place that is available whenever we want to hold such events.

This community night will be different than the past ones. The previous community nights where strictly technical. Although there will be two technical presentations in this community night, but it's main theme will be about the community, we want to make people aware of the benifits of being part of a community, and how to engage in it.

Also, we were glad to have very generous sponsors to sponsor the event. Among the many give aways that will be distributed in this event, we have the following prizes

1. Two licenses of the very famous telerik RadControls for ASP.NET + WinForms + Reporting Developer Subscription and Source Code.

2. One license of my best Visual Studio.NET AddIn and one of the best developer productivity tools, the JetBrains Resharper .

3. Last but not least, one copy of Windows Vista Ultimate.

So if you haven't registered yet, run...don't walk, and go register. Seats are limited.

VS.NET 2008 Beta 2 and debugging

Ok, so this time it’s a debugging problem. Whenever I try to start the debugger, I was greeted with the following error message

Unable to start debugging on the web server. Strong name validation failed.

Ookk, now what the heck is this supposed to mean?..Anyway, after a bit of googling, I found the following blog entry that solves the issue

http://weblogs.asp.net/dwahlin/archive/2007/08/06/fixing-a-vs-net-2008-asp-net-debugging-issue-on-vista-quot-strong-name-validation-failed-quot.aspx

Happy debugging!!

VS.NET 2008 Beta 2 and Intellisense

At last I got the time to install VS.NET 2008 Beta 2 and start playing with it. The first thing I noticed was that it starts faster than VS.NET 2005, actually its so fast that I can hardly see the splash screen (which looks better than previous versions).

So I wanted to start with a test project, File -> New Project…bla bla bla, I got to the C# code editor and started typing some code, and what do I find?? NO INTELLISENSE!!!!, hit Ctrl + Space….nothing, this.   nothing….Ok, it’s the first time it runs on my machine, so may be a restart would solve the problem.

Close it and reopen it again..gaahhhh…no intellisense again (panic!!) It feels like you're walking down an unkown road with no guide.

I fired up the browser hoping that I might find some one out there that faced this problem before. Did a bit of googling, but got nothing. It seems I'm the only one having this problem…damn.

So I decided to do it the hard way and just poke around in the IDE to see if I can find something. The first thing I checked was the intellisense settings in the C# code editor (DUH!!), everything looked normal, intellisense is enabled and all the default options were set. I unchecked the box "Show completion list after a character is typed" and then checked it again, closed the dialog box, restarted VS.NET…….lo and behold, intellisense is working…woo hoo…

So there you go, if you ever face this problem, try the steps above, they might work for you as well.

Happy coding!!

Changing the drop target in a TFS team build

I was working on a TFS implementation for a client, and one of the requirements was that they wanted a team build to drop the binaries in a specific location. By default, whenever you invoke a tfs team build, it creates a folder with the structure "TeamBuildName_Date.IncrementedNumber" and drops the output of the build into that folder. The requirement was that they wanted the output to be drop in the same folder, overriding any older files from previous builds.

I did a lot of search online, but apparently there is lack of documentation for the team build targets (or I did not search in the right places), anyway after a few hours of searching, I found a file that has all the targets default configuration. The file can be found here
%ProgramFiles%\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets

To override the default drop location, you need to override the CoreDropBuild target in your TFSBuild.proj

<Target Name="CoreDropBuild"

        Condition=" '$(IsDesktopBuild)'!='true' and '$(SkipDropBuild)'!='true' "

        DependsOnTargets="$(CoreDropBuildDependsOn)" >

        <!-- Copy output assemblies -->

        <CreateItem Include="$(BinariesRoot)\**\*.*" >

            <Output ItemName="FilesToCopy" TaskParameter="Include" />

        </CreateItem>

        <Copy

             SourceFiles="@(FilesToCopy)"

             DestinationFiles="@(FilesToCopy ->'<Your drop folder path>\%(RecursiveDir)%(Filename)%(Extension)')"

             ContinueOnError="true" />

    </Target>

Hiding a custom webcontrol's property from the Properties window

A quick note, if you have property in a custom webcontrol that you don't want to show up in the Properties window, decorate it with the Browsable() attribute. Ex.

[Browsable(false)]
public
string Name

        {

            get

            {

                return name;

            }

            set

            {

                name = value;

            }

        }

I'm digging SubSonic

Generating data access layer is something that I always try to do to avoid writing repititive code. I've tried a lot of code generation tools, some were complicated, others I just didn't like the way they worked, I even tried to write my own code generation tool. But lately I was checking out SubSonic and I have to say that it's great. It's super easy to setup, the generated code is easy to use and customize, and its Query tool makes it super easy to write and execute simple queries.
If you are using stored procedures or views, you can make SubSonic wrap them for you.

Check out this introductory webcast to get an idea of what can SubSonic do for you.