Visual Studio 2005 Service Pack 1

Some of of the advancements in Service Pack 1 for Visual Studio 2005 which is available for download:

  • “New processor support (e.g., Core Duo) for code generation and profiling”
  • “Performance and scale improvements in Team Foundation Server”
  • “Team Foundation Server integration with Excel 2007 and Project 2007”
  • “Tool support for occasionally connected devices and SQL Server Compact Edition”
  • “Additional support for project file based Web applications”
  • “Windows Embedded 6.0 platform and tools support”

Especially the Core Duo support sound quite nifty to me. However, running Vista you have to wait some more weeks for some additional features.

“For developers using Visual Studio 2005 on Windows Vista, Microsoft is in current development on an update to Service Pack 1 called the ‘Visual Studio 2005 SP1 Vista Refresh Beta’. This update builds on the improvements made in SP1 and delivers a first class experience for developers wanting to take advantages of the new features in Windows Vista. The Visual Studio 2005 SP1 Update for Windows Vista is expected to ship after the consumer availability of Windows Vista in Q1 of 2007 and is now available in bet”

Just in case you are wondering why the two service packs are separated you can find more over here.

DSL-Tools v1 for Visual Studio 2005

DSL-Tools v1 for Visual Studio 2005 are finally available.

“… Version 1 of Domain-Specific Language Tools lets you create a custom graphical designer that uses your own domain-specific diagrammatic notation. You can then create custom text templates that use models created in your designer to generate source code and other files. Domain-Specific Language Tools requires Microsoft Visual Studio 2005 Professional Edition or above. …”

Thanks to Damir for his post. Otherwise I would have missed it. Actually, I was looking for exactly such a tool for my research.

How to set up Visual Studio for a DSS Service

If you create a new DSS service for Microsoft Robotics Studio that is not located within the MSRS directory you have to adjust some minor settings in Visual Studio 2005. You will realize dssnewservice.exe is a very helpful tool to create new services. If you follow the instructions below, you can set up new services within less than a minute if they are not located within the MSRS directory.

Prerequisites

The first you should set some more environment variables to your system to make development much more convenient. Extend the PATH system variable in System Properties / Environment Variables / Edit User Variable to %PATH%;C:\Program Files\Microsoft Visual Studio 8\SDKv2.0\Bin;C:\Microsoft Robotics Studio (August 2006)\bin;C:\WINDOWS\Microsoft.Net\Frameworkv2\v.0.50727

Edit User Variable

The first is not necessary but makes life easier, e.g. when you want to call tools such as ildasm.exe from command line. The second gives easy access to dssnewservic.exe. The last path is required to use dssproxy.exe later during compile time to gain access to msbuild.exe.

Create a new DSS service

Go to the folder where you want to create the new service. E.g. in C:\Documents and Settings\aheil\My Documents\Visual Studio 2005\Projects\MySolution you can type

> dssnewservice /namespace:My.Namespace.MyProject /service:MyService

Now add this project in your Visual Studio solution. right-click your solution in Solution Explorer and choose Add / Existing Project … Browse to the service created before and choose MyService.csproj.

Setup Project Properties in Visual Studio 2005

Now you can easily set up the properties. Chose Project / MyService Properties … to open the properties tab.

  1. Chose Application and adjust the assembly and namespace name you prefer.

    Application Settings

  2. Chose Build and adjust the Output path. MSRS assumes that you create the service within the MSRS folder. So chose C:\Microsoft Robotics Studio (August 2006)\bin\services to cause Visual Studio to copy the files to the appropriate location.

    Build Settings

  3. Now modify the build events. Since dssnewservice.exe assumed your project to be located in the MSRS directory, the path for the signing keyfile is pointing to a wrong place. Either correct the path to the sample .snk file or use a path to your own key file to sign the proxy assembly. If you don’t, this will result in a error code -1 by the dssproxy.exe during compile time. When the proxies are created msbuild.exe is used. that was by the way the reason to add the third path at the beginning to your environment variables. Otherwise you get a code 3 by the dssproxy.exe.

    Build Events

  4. You will realize, the CRR and DSS references are not available within your project. Instead of removing and adding them again, just select the Reference Paths tab. There browse to the folder C:\Microsoft Robotics Studio (August 2006)\bin and press the Add Folderbutton.

    Reference Paths

  5. Finally sign your assembly. Chose the Signing tab, check the Sign the assembly box and select <Browse>to chose a keyfile to sign.

    Sign the assembly

  6. Press F6 and compile your solution.

Remarks

I’ve tried these steps with several projects, so these steps should also work for you. If you encounter any problems drop a comment. Please be aware of the fact that you follow these instructions on your own risk. So don’t blame me if anything does not work like expected. Also this is not a official support article of Microsoft or the Robotics group. I did write this in my spare time to share some experience with the MSRS community. Also, these steps are supposed to work with the August 2006 CTP of the MSRS.

vshost.exe

Several times I got the question what the vshost.exe is in Visual Studio Express Editions. If you are familiar with Visual Studio the answer is easy: It is called hosting process. And is described in here:

The hosting process is a feature in Visual Studio 2005 that improves debugging performance, enables partial trust debugging, and enables design time expression evaluation. The hosting process files contain vshost in the file name and are placed in the output folder of your project.”

Visual Studio Features

While working with Web Services in one of my projects, I got some compiler errors: The type of particular namespaces could not be found. Actually, I checked the line and it looked as the namespace – (a Web) reference was not found. However, in the Solution Explorer everything looked fine. If you click the namespace identifier which seems to be wrong, a smart tag appears which allows you to extend the namespace to it’s full identifier. And there you can see, why the compiler finds an error.

Reference Prefix

Cool feature if you know that it is there.