Indigo is now out in the open and you should see a lot of flurry about it soon. This is cool. I have had a chance to look at bits and pieces of it in the past and could not talk much about it due to NDA, but that hopefully can change soon.
Feb 09 2005
Indigo out in the open
Jan 12 2005
Update on Problems installing VSTS 2005 Dec. 2004 Refresh
If you recall my previous post on VSTS installation blues, I got an answer from MS on that. It seems like installing Yukon Beta 2 did it. Per Microsoft, uninstalling Yukon won’t also help and it is better to rebuild the OS and then go from there. You can read it on the discussion thread here. I guess, there goes another evening in rebuilding a machine.
Oct 20 2004
VS.NET 2005 ClickOnce Review
I was playing with ClickOnce which is new in Visual Studio 2005 and thought it was pretty cool. Basically, ClickOnce is a deployment technology that enables self-updating Windows applications that can be installed and run with minimal user interaction.
ClickOnce applications can be self-updating; they can check for newer versions as they become available and automatically replace any updated files. You can specify the update behaviour; an administrator can also control update strategies, (e.g. making an update mandatory). Updates can also be rolled back to a previous version by the end user or administrator.
ClickOnce deployment overcomes three major issues inherent in deployment:
- Difficulties in updating applications – earlier any time an application is updated, the user must reinstall the entire application; now the updates can be provided automatically, and only those portions of the application that have changed will be reinstalled.
- Impact to the user’s computer – till now, applications often rely on share components with the potential for versioning conflicts; now, each application is self-contained and cannot interfere with other applications.
- Security permissions – Windows Installer deployment requires administrative permissions; but now non-administrative users can install and grant only those permissions necessary for the application.
How does it work?
The core ClickOnce deployment architecture is based on two XML manifest files,an application manifest and a deployment manifest.
- The application manifest (created using mage.exe) describes the application itself, including the assemblies, dependencies and files that make up the application, the required permissions, and the location where updates will be available.
- The deployment manifest (also generated using mage.exe) describes how the application is deployed, including the location of the application manifest and files and the version of the application that clients should run.
After a deployment manifest is created, it is copied to the deployment location which can be a Web server, network share, or even a CD/DVD. The application manifest (and all application files) are also copied to a deployment location that is specified and this can be the same as the deployment location or different.
The users can download and install the application as simply as clicking an icon pointing to the deployment manifest file on a Web page or in a folder. In most cases, the user will be presented with a simple dialog box asking the user to confirm installation (including elevated permissions if needed), then installation will proceed and the application will be launched without further intervention.
The application is added to the user’s Start menu and to the Add / Remove Programs group in the Control Panel. Unlike other deployment technologies, nothing is added to the Program Files folder, the registry, or the desktop, and no administrative rights are required for installation!
When the application developer creates an updated version of the application, he/she also generates a new application manifest and copies files to a deployment location. The administrator updates the deployment manifest to point to the location of the new version of the application.
Also, the deployment manifest also contains an update location (a Web page or network file share) where the application will check for updated versions. You can set properties to specify when and how often the application should check for updates. Update behaviour can be specified in the deployment manifest, or can be presented as user choices in the application’s user interface by means of the ClickOnce APIs. The, Publish properties can be employed to make updates mandatory or to roll back to an earlier version.

Icon for the sample application in the Start menu

The test application running locally after being installed

During the deployment, specifying the location where this would reside. Look at the examples which give you an idea on the various distribution strategies.

What is the target “platform“?

Where to check for updates?

Use a key for signing

Summary Screen

Screen shot of the deploy location. You can see various versions of the sample application present and also the dependencies (such as the .net runtime).

When the user starts an application and an update exists the user is prompted to either install it or skip it.

Snapshot of the registry that shows how the application version is tracked, etc. Here you can see the packages installed along with their versioning detail.
I will probably have more meaningful posts on this when I had a chance to use it in the “real world”.
Oct 13 2004
Pocket PC Emulator Issue in VS 2005 Beta (Refresh 1)
I was recently playing with the new compact framework part of Visual Studio 2005 Beta 1 (which is released with the VSTS Edition) and am having a tough time getting to the emulator to wok when I try and debug the application. This is a simple hello world application and I tried using all of the following emulators with no luck:
- Pocket PC 2003 SE Emulator
- Pocket PC 2003 SE Emulator (Legacy)
- Pocket PC 2003 SE VGA Emulator
Every time I try and “Deploy” to that the emulator comes up fine and I can connect to it, etc. but it cannot install the application for it and always get the Deploy error message (see the screen shots below). Also every time I try and “Power Off” the emulator, it comes right back up and does not really quit - it does not matter, if I save the state or do a soft or hard reset. All this time VS.NET is waiting for the emulator to exit. Ultimately I have to kill the process (DeviceEmulator.exe).

Image 1: The Emulator “Boots” Fine

Image 2: Other applications work fine

Image 3: I can also connect to the internet

Image 4: VS.NET is not Happy
I also get the following errors below, which are probably the crux of the issue.
No way to resolve conflict between “System.Xml, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes” and “System.Xml, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=969db8053d3322ac”. Choosing “System.Xml, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes” arbitrarily.
No way to resolve conflict between “System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes” and “System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=969db8053d3322ac”. Choosing “System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes” arbitrarily.
No way to resolve conflict between “System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes” and “System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=969db8053d3322ac”. Choosing “System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes” arbitrarily.
No way to resolve conflict between “System.Drawing, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes” and “System.Drawing, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=969db8053d3322ac”. Choosing “System.Drawing, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes” arbitrarily.
ResGen.exe /useSourcePath /r:”..\..\..\Program Files\Microsoft Visual Studio 8\SDK\v2.0\CompactFramework\WindowsCE\Microsoft.WindowsCE.Forms.dll” /r:”..\..\..\Program Files\Microsoft Visual Studio 8\SDK\v2.0\CompactFramework\WindowsCE\mscorlib.dll” /r:”..\..\..\Program Files\Microsoft Visual Studio 8\SDK\v2.0\CompactFramework\WindowsCE\System.Data.dll” /r:”..\..\..\Program Files\Microsoft Visual Studio 8\SDK\v2.0\CompactFramework\WindowsCE\System.dll” /r:”..\..\..\Program Files\Microsoft Visual Studio 8\SDK\v2.0\CompactFramework\WindowsCE\System.Drawing.dll” /r:”..\..\..\Program Files\Microsoft Visual Studio 8\SDK\v2.0\CompactFramework\WindowsCE\System.Windows.Forms.dll” /r:”..\..\..\Program Files\Microsoft Visual Studio 8\SDK\v2.0\CompactFramework\WindowsCE\System.Xml.dll” /compile Form1.resx,obj\Debug\PocketPCApplication1.Form1.resources
Csc.exe /noconfig /nostdlib+ /warn:4 /define:DEBUG;TRACE /reference:”..\..\..\Program Files\Microsoft Visual Studio 8\SDK\v2.0\CompactFramework\WindowsCE\Microsoft.WindowsCE.Forms.dll” /reference:”..\..\..\Program Files\Microsoft Visual Studio 8\SDK\v2.0\CompactFramework\WindowsCE\mscorlib.dll” /reference:”..\..\..\Program Files\Microsoft Visual Studio 8\SDK\v2.0\CompactFramework\WindowsCE\System.Data.dll” /reference:”..\..\..\Program Files\Microsoft Visual Studio 8\SDK\v2.0\CompactFramework\WindowsCE\System.dll” /reference:”..\..\..\Program Files\Microsoft Visual Studio 8\SDK\v2.0\CompactFramework\WindowsCE\System.Drawing.dll” /reference:”..\..\..\Program Files\Microsoft Visual Studio 8\SDK\v2.0\CompactFramework\WindowsCE\System.Windows.Forms.dll” /reference:”..\..\..\Program Files\Microsoft Visual Studio 8\SDK\v2.0\CompactFramework\WindowsCE\System.Xml.dll” /debug+ /optimize- /out:obj\Debug\PocketPCApplication1.exe /resource:obj\Debug\PocketPCApplication1.Form1.resources /resource:obj\Debug\PocketPCApplication1.Properties.Resources.resources /target:winexe Form1.cs Form1.Designer.cs Program.cs Properties\AssemblyInfo.cs
Does anyone have any idea on what is wrong or point me in the right direction?
Sep 29 2004
Why are T, K, V such a hot topic in Generics?
Is something as simple as do the T, K and V parameterised types make sense versus mnemonics in Generics a hot item to talk about? You bet, people cannot seem to get enough of it.The crux of the issue here is do T, K, V, etc in examples like List<T>, IDictionary<K,V> make sense versus something like List<Item>, IDictionary<Key, Value>. Apparently both sides make seemingly valid arguments and from what I gather, its also a hot discussion topic within Microsoft. There have been examples that point out that c# is supposed to be easy to understand and not messy as shown in this example. But in the long discussion here are the main points in favour of descriptive names:
- You can tell at a glance what each type parameter is used for.
- As with method parameters, so with type parameters: descriptive names are useful and helpful and mean you have to memorise less.
- To dispel the mistaken notion that a type parameter is simply a placeholder that doesn’t “mean anything”.
- Saying of List<T>: “it’s a list of some type T” may work, but other similar situations don’t work (e.g. Point<T>)
- Even List<T> isn’t as simple as people think it is; “T” is never really OK.
- T, V, K etc. may (just) be OK for native English speakers, but is not OK for those whose first language is not English.
- If you choose the first letter of each word as your type parameter name (e.g. K, V), what if two or more words start with the same letter ?
- Using descriptive names reduces the incidence of name clashing where two or more “T”s mix in the same lexical space.
- You don’t have to look up what “T” means virtually every single time you come back to use a generic class, and you don’t have to bear it mind while you’re using the class (and why should you ?).
- The case for using of single letters gets worse as more type parameters are added to generic classes in the future.
- Using “T” leads you to then use “U” (as in the Converter delegate). “T” may stand for Type, but “U” doesn’t stand for anything. So the single-letter convention is inconsistent as well as unhelpful.
- The brain isn’t overloaded having to remember what “T” and “U” stand for in more complex situations where generic types are mixed (e.g. in List<T>’s ConvertAll method).
I personally don’t particularly care, though given a choice, I prefer the <T,K,V> but that is probably because what I am use to seeing. We of course will know the outcome of this when Whidbey ships.
Jul 27 2004
Forms, threading and Frustration
In Visual Studio 2005, if you have a windows form and have a fair amount of threading going then that things can get pretty frustrating. As you know, because of the way that Windows handles its user interface, you should only be updating the user interface from the main thread. If you try to do it on other threads, bad things happen, and they can be pretty hard to track down. Windows forms includes some code to detect when that is happening, but it can’t do it in all cases. When you get in this situation, you need to call Invoke() on the form, and pass it a delegate to the function that you want to be called on the main thread. Eric discusses this in detail which is a recommended read if you play with a lot of threads on your Win Forms.
Jul 25 2004
Developer's Perspective on WinFS
If you don’t know what Wings is, then read the earlier part of this series. There have been a number of changes since Part 1 and this part, namely the release of a new Longhorn build. For the Assemblies you will usually need the System.Storage.WinFS.dll assembly in most of your projects. It represents the basic interfaces and classes (for example, Item and ItemContext). In addition, System.Storage.Core.dll is required for most Wings work. Once you have both of those assemblies, most of the functional groups are separated into separate assemblies. For example, if you are working with Contacts, you will need the System.Storage.Contacts.dll assembly; if you are working with Files, you will need the System.Storage.Files.dll assembly. On some rare occasions, you will also need the WindowBase.dll assembly. This assembly contains much of the core Longhorn-specific content. All the Longhorn assemblies are now located in one place: (depending on the current version of the Longhorn assemblies).
Searching – Before you can work with Wings objects, you must first be able to find them. Searching Wings is fairly straightforward. It uses the OPath syntax that is part of ObjectSpaces. Searching within Wings begins with the ItemContext class. The ItemContext class supports a FindOne method that will return the first object that satisfies the search. The FindOne method takes a Type of the objects we are searching for and the OPath search string. FindOne returns either the first found object or null if no matches are found.
What is OPath? OPath is a specialised syntax for dealing with object graphs. OPath is made up of XPath sprinkled liberally with SQL syntax. At its most basic, OPath supports property comparisons. Microsoft has attempted to create a simple and powerful search language by merging ideas from XPath and SQL. Using OPath you can do:
- Property Searches
- Wildcard Searches
- List Searches
- Collection Element Searches
- Compound Searches
- Relationship Searches
You can learn more about the OPath here.
Conclusion:
Wings makes searching and manipulating Wings objects very straightforward. Searching through Wings allows us to specify a very simple syntax for most cases but supports a rich search syntax to perform complicated searches when needed. Searching by specifying the type of object we are looking for allows us to use the hierarchical nature of the Wings schema to our benefit when searching. In addition, the Wings API allows us to deal with Wings object like any other managed objects when we need to manipulate them. In most cases we can deal with Wings objects just like any other classes that we work with in our applications. The power here is that the API should be very intuitive for users of Wings objects. We can create objects, change objects by manipulating properties, delete objects, and save our changes in batches.
For more information check out:
Jul 21 2004
Visual Source Safe 8.0 any better?
Unfortunately it is not. The UI is better – but that is just the new resource files used with cooler icons (compared to the previous version), but VSS itself is as limiting a product as it has been till now. I remember asking one of the product managers of VSTS on VSS when I was in Redmond, and they had said that it will be a completely revamped product – something which Microsoft internally will (or can – I forget now) use in the product development teams and should be able to compete with ClearCase, CVS, etc. But I guess, Beta1 ships with the same old useless source control.
But till the “real source repository” ships, for most small development teams VSS is still not a bad product and is quite useful in those situations. I have not checked out the API so am not sure if that has changed, but I would assume (quite safely) that it is the same. For those who are curious to see how the GUI has changed, here are some screen shots below.
Adding a File to VSS – Well the dialogue boxes also have not changed, with the Folder and Drives view still from the old Windows 3.x days!! If you have a deep hierarchy it does make is a big pain to navigate. Not to mention long filenames that do not fit in the listbox.

VSS File Menu (Context) – Again the same as before except newer icons.

VSS Toolbar:

VSS Working Folder:

VSS About:

VSS Application – As you can see below, the changes are only cosmetic but everything else is more or less the same. Click on the image below to see the fullview.
Update: Intead of scaling down the image for the client I moved it right to the end of the post as it was spilling over to the content on the right hand side. I also scaled down version and if you click on it then you can see the fullimage.
Jul 21 2004
What is SecureString?
Since a String class, is immutable and when it is not needed, it cannot be programmatically scheduled for GC or in other words, it is not possible to predict when it will be deleted from the memory that can be a security risk especially if the string contains sensitive information such has credit card numbers, passwords, etc. This is where a new class in .NET 2.0 which ships with Visual Studio 2005 called SecureString comes in. It represents text that should be kept confidential and is encrypted for privacy when being used, and deleted from computer memory when no longer needed.
A SecureString is similar to a String in that it has a text value, but, the value of an instance of the SecureString class is automatically encrypted, can be modified until your application marks it as read-only, and, when no longer needed, it can be deleted from computer memory by either your code or the GC. The value of an instance of SecureString is automatically encrypted when the instance is initialised or when the value is modified. Your code can render the instance immutable and prevent further modification by invoking the
Note: SecureString has no members that inspect, compare, or convert the value of a SecureString. The absence of such members helps protect the value of the instance from accidental or malicious exposure.
Jul 15 2004
What are Distributed System Designers?
Distributed System Designers (DSD’s) are an integrated set of graphical designers which are part of the new Visual Studio 2005. With these designers which you can use to visualise and define applications, compose systems, design classes, model logical representations of datacenters, and bind systems to logical servers in the logical layout of the target datacenter. Their high-level goals are:
- Support designing and implementing applications
- Composing applications into deployable systems
- Modelling logical representations of the target datacenter
- Defining and validating deployments of the systems you compose against the logical datacenter models.
The designers help software architects and designers, developers, and operations analysts resolve the following high-level goals:
- Illustrate, communicate, and document application designs and the application host environment in a datacenter.
- Maintain and synchronise design documents with source code.
- Compose and configure systems from reusable applications and other systems.
- Validate systems against target deployment environments to determine whether those systems can deploy successfully, even before you implement the applications in those systems.
DSD’s support the following high-level tasks:
- Design, implement, and connect applications using Application Connection Designer.
- Specify and review operations provided by Web service applications using the Endpoint Details window.
- Compose deployable systems from the applications you design using System Designer.
- Design CLR classes visually using Class Designer.
- Design a logical representation of the target datacenter environment using Logical Datacenter Designer.
- Specify settings and constraints for applications in the logical datacenter using the Settings and Constraints editor.
- Define and validate deployment for applications in the systems you create to the logical servers in the target datacenter using Deployment Designer.
Jul 12 2004
Data Access overview (with Screenshots) in ASP.NET 2.0 using Visual Studio 2005
I wanted to walk you through a quick demo on some of the enhancements for data access in Visual Studio 2005. Please note that though I have a bunch of screen shots, the application here is pretty simple. My goal is not to show you the power of the new stuff that makes the developer more productive and a lot of it is the small stuff – which all adds up to a fair amount of FTE’s. So, lets start.
Step 1 – I am going to create a new web site project (as shown in the screenshot) with only one page (default.aspx) that has a GridView control. More on this control in a few steps.
Step 2 – Adding a database connection. For this exercise I have SQL Server Express 2005 installed, but there is no reason why you cannot do this with SQL Server 2000 or MSDE. I am going to use the sample pubs db for this. Here are the steps:
- Add a new connection (as shown).
- Select SQL Server as the data provider.
- Select the Server and the database you want to connect to. e.g. here I connect to the pubs db.
Step 3 – Now that you are connected to a database we would want to add a table. I select the author table and drag and drop it to the default page as shown.
Step 4 – When you drag and drop the table, Visual Studio automatically created a GridView control. This control automatically picks up the various columns from the table by default. You can configure the data source to your needs, configuring all the selects, updates and deletes. As you can see, the control also has built in paging, sorting, updating (if there is such a word), etc. You can also select one of the many built-in autoformats to give the control a cool and consistent look and feel.
What is a GridView control? A GridView control, allows you can display, edit, and delete tabular data from many different kinds of data sources, including databases, XML files, and the data exposed by a business object. is the successor to the DataGrid control. This controls displays the values of a data source in a table where each column represents a field and each row represents a record. The GridView control allows you to select, sort, and edit these items. I will detail out the differences between the two in another post.
Step 5 – Lets give it a spin. Press Ctrl+F5, to compile and run the app. As shown the data is automatically selected and shown in the selected format. You can also update the records if authorised to do so and also sort and paginate the rows returned automatically.
Step 6 – Well we don’t really have any more steps, but I want to show you what the project and the code looks like. You can see the default.aspx in design mode and the source mode. Now onto the more interesting stuff, lets see what the code-beside looks like. Interesting right, there is not a single line of code!
Here are some more screen shots showing the configuration of Visual Studio 2005.
- In Built Web Server - There is built-in web server, so one does not need IIS installed. This will help answer a lot of companies (especially in the Enterprise environment) security issue of having IIS run on every developer’s machine and not tightened down. This server can be accessed only locally and not via a remote machine. Also, this starts only when you run an application (either in Debug or Release mode) and is shutdown when you stop the application.
- Web Site Properties – There are a bunch of new properties of a web applications. You can add references, set build options and set accessibility options which are cool. They allow to ensure your application meets the required standards. e.g. most companies that do business with the federal government need to adhere their web sites to Section 508. When I checked the default.aspx for all the accessibility options, unfortunately as you can see, it failed and that too miserably. You can also of course set both the Startup and MSBuild options.
- Web Site Admin Tool – The admins in your organisation will love this. Till now the only way to modify this was manually updating the .config file, which means either the admins need to understand the various sections in the .config files or the developers need to provide extremely good documentation (now there is an oxymoron), that would help the admins. But in ASP.NET 2.0 there is a tool that makes their job easier. You can setup the security, manage profiles, manage applications and the data provider.
Summary – To summarise, the demo in itself is nothing great from a technical perspective, but what is interesting is that a developer did not have to write one single line of code. To achieve the same today (in ASP.NET), is not difficult, but does take considerable effort to write, unit-test and debug, especially when you account for the updates of rows, pagination, sorting, etc. Just a small sampling of the new power of ASP.NET 2.0 in Whidbey and all the host of new features that promise to make the live of a developer much better!
Jul 07 2004
Visual Studio 2005 Beta 1 (code named Whidbey) Screenshots
Last night I got some time to start playing with the Beta 1 of Visual Studio 2005 which was code named Whidbey. I got some requests for screen shots and I have uploaded a few. To me these are of not too much value because I have shots of the installation process itself and some initial screen shots of VS.NET 2005 but I don’t cover the real improvements – trust me the “meat” of it will follow soon. The main purpose I am uploaded these here are because a lot of you do get excited seeing this. Let me know if you want to see something specific and keep a lookout here for my take on all the new stuff.
Also, I picked most of the default settings and have c# as my primary language set. I also installed SQL Server 2005 Express and have some shots of that too.
Setup Screen Shots:
- Loading
- Start page
- Options page
- Validations
- Installation - Part 1
- Installation – Part 2
- Office dependency
MSDN Screen Shots:
Visual Studio 2005:
- Environment Setting (First Time)
- Splash Screen
- About
- New Project
- IDE (Default View)
- Code View (for a Windows App)
- Toolbox - Part 1
- Toolbox – Part 2
- Toolbar Options
- Property Window and Docking Options
- Better Intellisense
- Breakpoints and Tooltips
- Exception View
- Server Explorer
- New Web Site Project
SQL Server 2005 Express
Misc.
- Quick Start Sample Setup - Part 1
- Quick Start Sample Setup – Part 2
- .NET Whidbey Command Prompt
- Customer Experience Program
« Previous Page — Next Page »

