Extending Visual Studio

  • ZipItems build task

    In the CTP of the Orcas SDK, we have added a flag that modifies the default behavior of the ZipItems. In previous releases, the ZipItems used to copy the zipped items automatically after zipping them.  However, to get this behavior, you will have to add the following property item in your project:

        <PropertyGroup>
            <RegisterOutputPackage>true</RegisterOutputPackage>
        </PropertyGroup>

     

    You can look at the WebSiteProject.proj project file from the IronPython Integration sample to see where to add this property.

  • VisualStudio Extensibility videos

    The sdk team has been producing monthly web casts covering various topics related to extending Visual Studio.  These videos are mostly targeting users that are starting to extend VS.  They serve as walkthroughs to get your projects started.  You can access these videos from this web site:

    http://msdn2.microsoft.com/en-us/vstudio/aa700829.aspx

    This month, we will be showing how to get started with custom editors.
     

    Have a look, no download is necessary.  Comments are always welcome
     

  • June VS SDK CTP is available

    The SDK team has released the June VS SDK CTP.  This release includes new web sites and web applications integration for the IronPython language.  While it is still a work-in-progress, the project system works and you can have a look how the registration of the templates work.  You can download it at the usual: http://www.vsipmembers.com

    Another addition is the SVGViewer example that showcases how to easily add file viewers in VisualStudio.  One thing currently missing from this release is actual SVG files to see how the sample works.  You can get some at the SVG home page: http://www.w3.org/Graphics/SVG/

    It is also missing the usual SDK behavior of starting Visual Studio using the experimental hive.  While you wait for the next CTP build of the SDK, you can add the following code in the svgviewer.sln file to get this behavior:

     GlobalSection(ExtensibilityAddIns) = postSolution
      DebugSamples.Connect = 1;Configure Project for VSIP Experimental Environment;ConfigVSIPDebug
     EndGlobalSection

    This calls an Addin that is installed with the SDK to automatically start Visual Studio when debugging a package.

  • Code snippet implementation with the Managed Package Framework

    I have had the opportunity to implement the Code Snippet support for the IronPython integration that is in the VS SDK.  The Code Snippet feature is new in Visual Studio 8.0 and it is a very nice addition to any language integration.  It allows users to decrease the investment required to master the syntax of a new language and it eliminates the tediousness of writing code that is used often.  For C# and VB, Visual Studio 8.0 comes with a plethora of simple code snippets like foreach loops, class definitions, if statements, etc.  The nice thing about snippets is that it is simple to add new ones.  You can find the directory where the snippets for a particular language are and create a new file there.  Visual Studio should have access to this newly created snippet immediately.

     

    As for adding support for Snippets into a language integration, there are some challenges but most of them are covered by the VS SDK documentation topic:

    ms-help://MS.VSCC.v80/MS.VSIPCC.v80/MS.VSSDK.v80/dv_vsintegration/html/7490325b-acee-4c2d-ac56-1cd5db1a1083.htm

     

    An interesting point that is not extensively covered by the documentation today is the glyph selection for the Statement Completion window.  The idea is to reuse the resources that Visual Studio provides in order to maintain the native feel of the integration.  All of the icons reside in a managed dll named “Microsoft.VisualStudio.Package.LanguageService.dll”.  However, there is no list of definitions of those icons.  One way to get the list is to use Reflector to inspect the resources within this managed dll and figure out the indexes of the interesting glyphs.  The snippet one is "205" so the GetGlyph(index) method of your Declaration class can return that to display snippets correctly.  

     

    The SDK team is working on getting this process documented but in the meantime, you can view how it is implemented in the PythonDeclaration.cs in the LanguageService project of the latest version of the SDK. 

  • Setting up the Arm emulator to access network ressources

    How to configure the Device Emulator so that it has Internet connectivity:
    Note: This is written with the RTM version of Visual Studio 2005 in mind, but the procedures should be very similar for the standalone version of the Device Emulator or a beta of Visual Studio 2005.

    The primary way to do this without downloading additional components is to use ActiveSync along with the Device Emulator Manager.  ActiveSync gives the ability to share the network connectivity of your desktop computer with any device connected through it.  

    1- ActiveSync 4.0 is the latest version and you can get it from:
    http://msdn.microsoft.com/mobility/windowsmobile/downloads/default.aspx
    2- Once ActiveSync is installed, go into the Connection Settings, through the file menu and make sure that “Allow connections to one of the following:” is checked and that “DMA” is selected. 
    This will enable ActiveSync to automatically find the Device Emulator when you virtually cradle it from the Device Emulator Manager.  Also, if you are connected to multiple networks, you will want to select the one ActiveSync should use in the “This computer is connected to” list.
    3- Launch the Device Emulator Manager from the Tools menu of Visual Studio 2005 or directly from \program files\Microsoft Device Emulator\1.0\dvcemumanager.exe
    pictures goes here
    4- If the emulator that you want to use is not already started, you may do so now from the Device Emulator Manager, by selecting the “Connect” option.
    pictures
    5- Once the emulator entry has the “Started” icon beside it, you can virtually cradle it using the “Cradle” option.  ActiveSync should now detect that a device was cradle and it should ask you about forming a partnership with this device.  Having a guest or a standard partnership does not affect the ability of the device to use the network connection, so hitting “Cancel” will work fine for our needs.  If ActiveSync has not reacted to the fact that the emulator has been cradle, the first thing you should try is to use the “Get Connected” wizard from ActiveSync.

    You are now connected via ActiveSync. 

    By default, ActiveSync should select the correct network, set the proxy and get network connectivity working from within your emulator.  However, the unlimited different network configuration makes it possible that some manual configuration work could be that needed.  The easiest test when configuring an emulator is to open Pocket Internet Explorer and try to access a public webpage like www.microsoft.com.  If the site loads up fine on a computer but doesn’t within the emulator, then you will need to tweak its configuration.  Here are most of the important options that can be done for each of the images you try to connect to a network. 

    For Pocket Pc 2003:
     Switching the network type to “Work” instead of “The Internet”
      Start->Settings ->Connections->Network->Advanced->Work

     Set a proxy:
    Start->Settings ->Connections->Network->Edit proxy settings
     
    Smartphone 2003
     Select the network type:
      Start->Internet Explorer->Menu->Options->Connections->Select Network->Work
     Set a proxy:
      Start->Settings->Data Connections->Menu->Edit Connections->Proxy Connections->Menu->Add

    Pocket Pc 2005
     All options should be set automatically. However, you can still set them manually:
     Switching the network type to “Work” instead of “The Internet”
      Start->Settings ->Connections->Network->Advanced->Work

     Set a proxy:
    Start->Settings ->Connections->Network->Edit proxy settings

    Smartphone 2005
     All options should be set automatically. However, you can still set them manually:
     Select the network type:
    Start->Settings->Connections->Proxy->Menu->Advanced
    *Note here that you can manually select “Pass through”
    Select pass-through
     Set a proxy:
    Start->Settings->Connections->Proxy->Menu->Add

    One of the major issues that could block development when using the emulator is security.  The emulator should be considered as if it was a different machine than your desktop machine.  The first thing to verify before troubleshooting connectivity issues is to try to access the network resources from a different computer.  If that fails, then there are security restrictions on the network resources that will affect the connectivity from the emulator.

    Feel free to post questions on the msdn forums in the device emulator questions about this blog or any other emulator related questions

    Carl

  • Ntfs.sys XP Fun

    Two weeks ago, I had one of my SATA drive fail on my main home machine.  This pc has an ASUS A7N8x board.  I didn’t believe it was a hardware failure as this disk is pretty new.  Unfortunately, the experience was pretty time consuming.  This 200 GB drive has my main system partition on which XP with Service Pack 2 is installed.  The first symptom was that on morning, my machine got stuck in a rebooting loop.  It would post, then the Windows loading screen would flash for a couple of seconds, then the whole system would reboot.  After fiddling with Safe mode and debug mode, which were useless, I tried the “no reboot on error” mode.  This helped me figure out that there was a blue screen of death occurring.  The problem was in ntfs.sys and the error was 0x00000024.  I fired up my laptop and msnsearch informed me that this error was somewhat common.

     

    0x00000024 NTFS_FILE_SYSTEM All file system bug checks have encoded in their first ULONG the source file and the line within the source file that generated the bug check. The high 16-bits identifies the file, while the lower 16-bits identifies the source line in the file where the bug check occurred.

     

    The common solution was to use chkdsk on all of the drive’s partition.  However, the solution was not so simple when the system’s operating system is installed on one of these NTFS partitions.  After spending much of my weekend reading technical forum posts and trial and error, here is the solution I have used.  It requires:

    -         A Windows 2000 installation CD

    -         4 floppy disks for the 4 Windows 2000 boot disks

    -         A 5th floppy disk with the ASUS SATA drivers

    -         About 12 hours for the surface scan that chkdks will do

     

    I started by creating the 4 boot disks on another machine.  I used the boot disks from this website, which hosts various boot disks from all of the possible operating systems.  On the first bootdisk, there is a 100kb config file in which you need to comment out the ntfs.sys driver like:

       [FileSystems.Load]

       fat = fastfat.sys 

       ;ntfs = ntfs.sys

     

    I then used the 5th disk to store the SATA drivers from the ASUS website, which are required in order to have access to any SATA drives during the Windows installation process.

    After that, the fun begins.  You can boot the 1st boot disk and quickly press F6 so that Windows allow you to specify custom hard drive drivers.  You will not see a confirmation that the F6 key has registered, but it should prompt you after you load all of the 4 Windows 2000 disks.  If not, reboot and restart the whole process. 

    After loading the SATA drivers from the 5th disk you created, you will then be able to load the “Repair / console” mode.  This mode allows you to do minor modifications to the system, while in a console environment.  From there, you will be able to use chkdks to potentially fix your partitions.  However, chkdks is NOT included on the Windows 2000 boot disks.  This is where you will need to have a Windows 2000 CD in your cd-rom drive.  Note that If you have an XP CD in, chkdks will cause a blue screen, and will require you to restart this whole operation.  You then need to use chkdsk to fix the errors on all of the NTFS’s partition.  I used this command to force a chkdks:

     

      chkdsk /r x: (/r forces a scan and x: is the drive’s letter)

     

    Finally, reboot the machine and marvel at a working xp system.  The solution comes partly from http://support.microsoft.com/?kbid=228888 which I adapted a bit.  I have read that Windows 2003 might handle these errors better but I did not have access to a Windows 2003 cd at the time.

     

    Fortunatly, all my data was recovered.  Hopefully, this guide will save some pain for the next time this happens

    Carl

  • First blog

    This is my first MSDN blog entry so I will use it to present the future content of this blog and a little description of myself.  No blog would be complete without a bit of self promotion.

    I have been a software developer engineer in test or SDET for almost 2 years now.  My first endeavor was the emulator technologies of the Visual Studio for Devices.  This includes the early x86 emulator and the new Arm emulator.  I have seen the Pocket PC 2002 through 2005 operating systems, the Smartphone 2003 and 2005 systems and the Windows CE 3 through 5 systems come out.  I also had the chance to use various Windows mobile devices.  These devices have a tremendous potential and with Visual Studio 2005 coming out, there will be a substantial push for even greater applications.

     

    A few weeks ago, I moved to the VS SDK team.  I have started acquiring knowledge about the internals of Visual Studio and how to integrate new features in it.  At the same time, the whole team have been hard at work to release the RTM version of the VS SDK.  Now that it is done (see next post about the official release announcement), we have started planning the next versions.  It is very exciting as we have *many* requested/desired features.

     

    I look forward to sharing information about the VS SDK and all of my computer-related experiences.  I’ll see you on the forums (http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=57&SiteID=1)

     

    till next time

    Carl


© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker