Microsoft® Windows® SDK Readme for the February 2006 CTP

Welcome to the Microsoft® Windows® Software Development Kit (SDK) for the February 2006 Community Technology Preview (CTP). The Windows SDK contains documentation, samples, headers, libraries, and tools designed to help you develop Microsoft® Windows applications. The documentation, samples, and tools provided in the Windows SDK support application programming interfaces (APIs) available in the Windows Vista™, Microsoft® Windows® XP Service Pack 2 (SP2), or Microsoft® Windows® Server 2003 Service Pack 1 (SP1) versions of Windows.

Important This version of the Windows SDK is available as both a DVD ISO image that must be burned to a DVD or mounted as a virtual drive and installed from that media, and as a web download.

Important This version of the Windows SDK targets specific versions of Windows and has other restrictions. This version:

Note To use features for WinFX, the managed programming model for Windows, install the version of the WinFX Runtime Components compatible with this release.

Please note that this release is for preview purposes only. The APIs, documentation, samples, headers, libraries, and tools provided in this release are preliminary and subject to change.


1. License Agreement

The contents included in the Windows SDK are licensed to you, the end user. Your use of the SDK is subject to the terms of an End User License Agreement ("EULA") accompanying the SDK and located in the \License subdirectory. You must read and accept the terms of the EULA before you access or use the SDK. If you do not agree to the terms of the EULA, you are not authorized to use the SDK.

2. Supported Compiler

This pre-release of the Windows SDK supports the RTM release of Microsoft® Visual Studio® 2005.  You can download a copy at no charge from the Visual Studio 2005 Developer Center.

3. Supported Platforms

4. File System Layout

By default, the Windows SDK is installed to your hard disk in the locations described in the following table. This list is not complete, but covers the most common directories. 

Directory

Contents

\Bin

Windows SDK tools

\Help

Windows SDK documentation

\Include Windows SDK headers

\Lib

Import libraries and TLB files

\License

Windows SDK license information

\Samples

Windows SDK samples

5. Installation Instructions

Please install on a clean machine or completely uninstall any pre-releases of the Microsoft® WinFX® Runtime Components 3.0, the WinFX SDK, the Platform SDK, the Windows SDK, the .NET Framework redistributable, Microsoft® Visual Studio®, and their dependencies before installing this release. These older components may interfere with this release, causing setup to fail or break functionality. We recommend installing this version on non-production machines (preferably in a test environment) without these previous releases to prevent incompatibilities.

To install on Microsoft Windows XP Service Pack 2 or Microsoft Windows 2003 Server Service Pack 1:

  1. If you intend to install WinFX components available in the Windows SDK, install the Microsoft WinFX Runtime Components 3.0 for the February CTP from the Download Center.
  2. Download the Windows SDK from Download Center. Note: If you download the DVD ISO image, burn the image to a DVD or mount as a virtual drive, and install the SDK on your local hard disk. The details page for the Windows SDK in the Download Center has additional information about tools you can use to create the setup image without burning the image to a DVD. You can also download the Windows SDK from the Download Center.
  3. If you create a DVD ISO image or mount a virtual drive and launch setup.exe, choose the appropriate option to install the Windows SDK: Insert the SDK DVD into a DVD-ROM drive and click setup.exe, or after the virtual drive is mounted, launch the setup.exe from within that virtual drive.
  4. Follow the instructions in the Windows SDK Setup wizard.
  5. Optional Install Microsoft® Visual Studio® 2005 (this Windows SDK is compatible with the RTM version of Visual Studio).
  6. Optional Install the Visual Studio 2005 Extensions for WinFX for February CTP from the Download Center.

To install on Windows Vista:

  1. If you intend to install WinFX components available in the Windows SDK, install the Microsoft WinFX Runtime Components using one of the following methods:
    1. From a command prompt on a machine with Windows Vista February CTP installed, enter one of the following:
      %WINDIR%\SYSMSICache\WinFX\3.0\winfxrc.exe /q /qb /norestart
      for x86 machines
      %WINDIR%\SYSMSICache\WinFX\3.0\winfxrc_x64.exe /q /qb /norestart
      for x64 machines

    2. or install the Microsoft WinFX Runtime Components 3.0 for the February CTP from the Download Center.
  2. Download the Windows SDK from Download Center. Note: If you download the DVD ISO image, burn the image to a DVD or mount as a virtual drive, and install the SDK on your local hard disk. If you mount a virtual drive and then launch the setup.exe from within that virtual drive, installation will begin. The details page for the Windows SDK in the Download Center has additional information about tools you can use to create the setup image without burning the image to a DVD. You can also download the Windows SDK from the Download Center.
  3. If you create a DVD ISO image or mount a virtual drive and launch setup.exe, choose the appropriate option to install the Windows SDK: Insert the SDK DVD into a DVD-ROM drive and click setup.exe, or after the virtual drive is mounted, launch the setup.exe from within that virtual drive.
  4. Follow the instructions in the Windows SDK Setup wizard.
  5. Optional Install Microsoft® Visual Studio® 2005 (this Windows SDK is compatible with the RTM version of Visual Studio).
  6. Optional  Install the Visual Studio 2005 Extensions for WinFX for the February CTP from the Download Center.

To install the WinFX Redistributable components for February CTP on the Windows Vista February CTP build:

  1. If it is installed on your machine, uninstall the January CTP version of the WinFX Runtime Components.
  2. Download the redistributable package for the WinFX Runtime Components 3.0.

Note If you intend to use Visual Studio to develop WinFX applications, you must install the Windows SDK before installing the Visual Studio 2005 Extensions for WinFX. It is essential that you use the version of Visual Studio identified in the Installation instructions in WinFX Runtime Components setup instructions.

Access the Windows SDK through the Start menu at Microsoft Windows SDK. This Start menu folder contains pointers to the documentation (which contains the samples for WinFX), tools, and debug and release build environments.

Note Documentation for the Windows SDK is also available on MSDN Online at:  http://windowssdk.msdn.microsoft.com/library.


6. Known Issues

This release has the following known issues. Known issues are categorized by content type.

6.1 Setup and General Development

6.1.1 The Windows SDK does not support UDDI development using .NET

The Windows SDK does not support UDDI development using .NET. As a result, three UDDI samples that require .NET will not compile in this version of the SDK. There is no known workaround for this issue.

6.1.2 Windows SDK disk space requirements

The complete DVD ISO installation of the Windows SDK requires 1.5 GB or more disk space to successfully install. Please verify that the machine you're installing to has at least the minimum required disk space before beginning setup. If the minimum required disk space is not available, setup will return a fatal error.

6.1.3 Known issues with Windows Workflow Foundation (WF)

There are several known issues with Windows Workflow Foundation (WF) in this SDK release. See the online Windows Workflow Foundation Readme for a complete list.

6.2 Headers and Libraries

This section describes known issues with headers and libraries included in the Windows SDK and offers possible workarounds.

6.2.1    Using the Windows SDK and Visual Studio 2005 to develop Windows Vista applications

In order to use the Windows Vista operating system C++ headers and libraries (included with the Windows SDK) with Visual Studio 2005, you need to make a few changes to the default Visual Studio 2005 configuration. Most of these changes involve configuring the C++ support in Visual Studio 2005 to reference various Windows SDK Include, Lib, and Executable directories.

NOTE: All paths listed below assume Visual Studio 2005 and the Windows SDK were installed to their default locations on the C drive. If you’ve installed either product to a different location, you will need to make the appropriate modifications to these instructions.

 1. Visual Studio 2005 ships pre-Vista versions of kernel32.lib and uuid.lib. You must insure that these link libraries are not used when developing applications using the Windows SDK. Navigate to the following directory:

 C:\Program Files\Microsoft Visual Studio 8\VC\lib

 2. Rename the following files:

kernel32.lib    to         kernel32.lib.save

uuid.lib            to         uuid.lib.save

 3. Start Visual Studio 2005.

 4. From the Tools menu, click Options, click Projects and Solutions, and then click VC++ Directories.

 5. From the Platform drop-down list, select Win32.

 6. From the Show Directories for: drop-down list, select Executable Files. You will see the following list:

$(VCInstallDir)bin

$(VCInstallDir)PlatformSDK\bin

$(VSInstallDir)Common7\Tools\bin

$(VSInstallDir)Common7\tools

$(VSInstallDir)Common7\ide

$(ProgramFiles)\HTML Help Workshop

$(FrameworkSDKDir)bin

$(FrameworkDir)$(FrameworkVersion)

$(VSInstallDir)

$(VSInstallDir)\SDK\v2.0\bin

$(SystemRoot)\SysWow64

$(FxCopDir)

$(PATH)

 7. Change the second entry so the updated list is as follows:

$(VCInstallDir)bin

C:\Program Files\Microsoft SDKs\Windows\v1.0\bin

$(VSInstallDir)Common7\Tools\bin

$(VSInstallDir)Common7\tools

$(VSInstallDir)Common7\ide

$(ProgramFiles)\HTML Help Workshop

$(FrameworkSDKDir)bin

$(FrameworkDir)$(FrameworkVersion)

$(VSInstallDir)

$(VSInstallDir)\SDK\v2.0\bin

$(SystemRoot)\SysWow64

$(FxCopDir)

$(PATH)

 8. From the Show Directories for: drop-down list, select Include Files. You will see the following list:

$(VCInstallDir)include

$(VCInstallDir)atlmfc\include

$(VCInstallDir)PlatformSDK\include

$(FrameworkSDKDir)include

9. Change the third entry so the updated list is as follows:

$(VCInstallDir)include

$(VCInstallDir)atlmfc\include

C:\Program Files\Microsoft SDKs\Windows\v1.0\Include

$(FrameworkSDKDir)include

 10. From the Show Directories for: drop-down list, select Library Files. You will see the following list:

$(VCInstallDir)lib

$(VCInstallDir)atlmfc\lib

$(VCInstallDir)atlmfc\lib\i386

$(VCInstallDir)PlatformSDK\lib

$(FrameworkSDKDir)lib

$(VSInstallDir)

$(VSInstallDir)lib

11. Change the fourth entry so the updated list is as follows:

$(VCInstallDir)lib

$(VCInstallDir)atlmfc\lib

$(VCInstallDir)atlmfc\lib\i386

C:\Program Files\Microsoft SDKs\Windows\v1.0\Lib

$(FrameworkSDKDir)lib

$(VSInstallDir)

$(VSInstallDir)lib

 12. If you are only interested in x86 development for the Win32 platform, click the OK button and you’re done.

 13. In order to configure Visual Studio to use the Windows SDK for x64 development select x64 from the Platform drop-down list.

 14. From the Show Directories for: drop-down list, select Executable Files. You will see the following list:

$(VCInstallDir)bin\x86_amd64

$(VCInstallDir)bin

$(VCInstallDir)PlatformSDK\bin

$(VSInstallDir)Common7\Tools\bin

$(VSInstallDir)Common7\tools

$(VSInstallDir)Common7\ide

$(ProgramFiles)\HTML Help Workshop

$(FrameworkSDKDir)bin

$(FrameworkSDKDir)lib\win64

$(FrameworkDir)$(FrameworkVersion)

$(VSInstallDir)

$(VSInstallDir)\SDK\v2.0\bin

$(SystemRoot)\SysWow64

$(FxCopDir)

$(PATH)

 15. Change the third entry so the updated list is as follows:

$(VCInstallDir)bin\x86_amd64

$(VCInstallDir)bin

C:\Program Files\Microsoft SDKs\Windows\v1.0\bin

$(VSInstallDir)Common7\Tools\bin

$(VSInstallDir)Common7\tools

$(VSInstallDir)Common7\ide

$(ProgramFiles)\HTML Help Workshop

$(FrameworkSDKDir)bin

$(FrameworkSDKDir)lib\win64

$(FrameworkDir)$(FrameworkVersion)

$(VSInstallDir)

$(VSInstallDir)\SDK\v2.0\bin

$(SystemRoot)\SysWow64

$(FxCopDir)

$(PATH)

 16. From the Show Directories for: drop-down list, select Include Files. You will see the following list:

$(VCInstallDir)include

$(VCInstallDir)atlmfc\include

$(VCInstallDir)PlatformSDK\include

$(FrameworkSDKDir)include

 17. Change the third entry so the updated list is as follows:

$(VCInstallDir)include

$(VCInstallDir)atlmfc\include

C:\Program Files\Microsoft SDKs\Windows\v1.0\Include

$(FrameworkSDKDir)include

 18. From the Show Directories for: drop-down list, select Library Files. You will see the following list:

$(VCInstallDir)lib\amd64

$(VCInstallDir)atlmfc\lib\amd64

$(VCInstallDir)PlatformSDK\lib

$(VSInstallDir)SDK\v2.0\lib\amd64

 19. Change the third entry so the updated list is as follows:

$(VCInstallDir)lib\amd64

$(VCInstallDir)atlmfc\lib\amd64

C:\Program Files\Microsoft SDKs\Windows\v1.0\Lib

$(VSInstallDir)SDK\v2.0\lib\amd64

20. Click the OK button and you’re done.

6.2.2 Using the Windows SDK to develop Win32 C++ applications with Visual Studio 2005 requires a workaround

There is a known issue with adding the Windows SDK library and include path information to the user's Visual Studio 2005's directory paths. Using the Windows SDK to develop Win32 C++ applications with Visual Studio 2005 requires the following workaround. To work around this issue, manually add the path to the Visual Studio 2005 path information.

NOTE The path given assumes the Windows SDK was installed on your C drive. Please change appropriately.

  1. Start Visual Studio 2005.
  2. From the Tools menu, click Options, click Projects and Solutions, and then click VC++ Directories.
  3. In the "Show Directories for:" drop-down list, select Include Files.
  4. Include the following by selecting each of these directories by using the up arrow button to move them to the top of the list:
    • C:\Program Files\Windows SDKs\Windows\V1.0\VC\INCLUDE
    • C:\Program Files\Windows SDKs\Windows\V1.0\VC\INCLUDE\SYS
    • C:\Program Files\Windows SDKs\Windows\V1.0\INCLUDE
    • C:\Program Files\Windows SDKs\Windows\V1.0\INCLUDE\GL
  5. Select the following Library Files from the "Show Directories for:" drop-down menu by using the up arrow button to move them to the top of the list:
    • C:\Program Files\Windows SDKs\Windows\V1.0\VC\LIB
    • C:\Program Files\Windows SDKs\Windows\V1.0\LIB
  6. Select OK.

6.2.3    Install Location of WindowsFormsIntegration.dll has changed

Currently, the WindowsFormsIntegration.dll is installed by the Visual Studio 2005 Extensions for WinFX (formerly named "Fidalgo"). The default location for WindowsFormsIntegration.dll is C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\Cider\WindowsFormsIntegration.dll. Use this path when you reference the assembly in your projects.

For historical reasons, the WindowsFormsIntegration.dll is also installed by the Windows SDK to the default folder C:\Program Files\Reference Assemblies\Microsoft\WPF\v3.0\. Do not use this version of the assembly, because it is incompatible with the current versions of the Windows Presentation Foundation.

6.3 Compilation Tools

The following section describes known issues with compilers and offers possible workarounds.

6.3.1    The J# Compiler is not available in this version of the Windows SDK

J# samples will not build using the Windows SDK because there is no appropriate build environment. There is no workaround. This edition of the Windows SDK does not support building J# applications.

6.3.2    Debugging Windows Presentation Foundation (WPF) applications with Kernel Debugger Active may result in an error

When debugging WPF applications, the following error message may appear:

Debugging isn't possible because a kernel debugger is enabled on the system.

This message occurs while debugging managed code on a system running Windows® NT, Windows® 2000, or Windows XP that has been started in debug mode.  For details on debugging WPF applications in this situation, see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxgrferrordebuggingisntpossiblebecausekerneldebuggerisenabledonsystem.asp.

6.3.3    Linker tools sometimes throw errors at link time

The following error messages have been known to occur at link time:

             Linker Tools Error LNK2001
        'unresolved external symbol __security_cookie '
                               
        Linker Tools Error LNK2001
        'unresolved external symbol __security_check_cookie '

If one of these errors occurs, link your C/C++ application with bufferoverflowu.lib. To learn more, see KB article 894573.

6.4 SDK Tools

This section describes known issues with Windows SDK tools and possible workarounds.

6.4.1    Tb3x.exe has been deprecated and removed from the Windows SDK

Tb3x.exe has been deprecated and removed from the Windows SDK. There is no known workaround for this issue.

6.4.2    The Application Verifier tool is not available in the Windows SDK

The Application Verifier tool is not available in the Windows SDK. It ships as part of the Windows Application Compatibility Toolkit. To work around this issue, download the Windows Application Compatibility Toolkit.

6.4.3    UISpy.exe fails to run with a strong name validation error

UISpy sometimes fails to run and displays a strong name validation error.

This error occurs because UISpy.exe was delay signed and never resigned. By default, this causes the .NET runtime to fail the execution of UISpy.exe because the strong name signature in the executable is not valid. However, UISpy will run correctly if you configure the runtime to ignore the strong name signature for UiSpy.exe.

To work around this issue, register UISpy.exe for strong name verification skipping.

1. Open a Windows SDK command prompt.

2. Navigate to the /bin directory. By default, this is C:\Program Files\Microsoft SDKs\Windows\v1.0\bin.

3. Run the command SN -Vr UiSpy.exe. Example:

      C:\Program Files\Microsoft SDKs\Windows\v1.0\Bin>sn -Vr UiSpy.exe

The successfully run command will produce a message indicating that the verification entry was added for the UISpy assembly.

6.4.4 SvcConfigEditor.exe Does Not Activate Cross-process Activity Tracking When Activity Tracking Is Activated for a Source

Local traces will not be correlated to traces on another process or system, and multiple nodes (client/server) do not display in the TraceViewer’s Activity view.

Workaround

Manually activate this feature. In the SvcTraceViewer’s config file, add “propagateActivity=true” to the source of your choice using a text editor:

<sources>
<source name="System.ServiceModel" switchValue="Verbose, ActivityTracing" propagateActivity="true" >
<listeners>
<add name="xml" />
</listeners>
</source>
<source name="System.ServiceModel.MessageLogging" switchValue="Verbose">
<listeners>
<add name="xml" />
</listeners>
</source>
</sources>

6.4.5 WCF Message Logging Inoperative When Activated with the svcConfigEditor.exe Tool

When activating Message Logging using the Diagnostics screen in the WCF svcConfigEditor.exe tool, the tool adds the wrong source name— “System.ServiceModel.Channels.MessageLogging” instead of the correct source of “System.ServiceModel.MessageLogging.” As a result, message logging does not work, but no exception is thrown. This is a known issue that will be addressed in a future release.

Workaround

• Use the tool to open the Configuration you created.

• In the tool’s Configuration pane, click the “Diagnostics” item.

• In the Diagnostics pane, check the “Default message logging” checkbox.

• In the Configuration pane, expand the “Sources” item.

• Click on the source name.

• Rename the “System.ServiceModel.Channels.MessageLogging” source to “System.ServiceModel.MessageLogging” and save the file.

In addition, this version of the svcConfigEditor.exe tool does not, by default, activate either service-level or transport-level message logging. One of these two options must be enabled to cause WCF to log messages. This will also be addressed in a future release.

Workaround

• In the tool’s Configuration pane, expand the Diagnostics item if necessary.

• Click on the Message Logging item.

• In the Message Logging pane, set either LogMessagesAtServiceLevel or LogMessagesAtTransportLevel to True.

• Save the file.

6.4.6 Svcutil.exe Fails to Generate Configuration File for Queued Sessions and Queued Volatile Samples

When using queued sessions and queued volatile samples, running svcutil.exe generates the following warning:
 

“Warning: Unable to import wsdl:binding”
 

Svcutil.exe also fails to generate a configuration file in this case.

Workaround

None. This issue will be addressed in a future release.

 

6.4.7 Interface Generated by svcutil.exe Does Not Expose the Methods Required by the WCF COM Service Moniker

The WCF COM Service Moniker uses an interface definition that is typically created with the Service Model Metadata Utility Tool (svcutil.exe). In this release, the tool does not generate an appropriate interface definition.

This is a known issue that will be addressed in a future release.

6.4.8    Known issues with the Microsoft Command Shell (Monad)

Changes from Windows "Monad" Shell Beta 2

Although this release is essentially the ame code base as the previous Beta 2 release (except moved to the RTM versionof the .NET Framework 2.0), a few changes were made:

"Single Shell" Changes

This release incorporates the "Single Shell" changes to the Windows "Monad" Shell.

The user-visible operation of Monad at startup is the same, however Monad now groups cmdlets assemblies into "MshSnapins" and dynamically loads MshSnapins at startup based on registry settings. To learn more about the Monad MshSnapins simply type: get-help about_MshSnapins. This help topic also talks about how to create and save console files.

Monad added cmdlets to control MshSnapins:

add-mshsnapin [-Name] String[] [-PassThru]

get-mshsnapin [[-Name] String[]] [-Registered]

remove-mshsnapin [-Name] String[] [-PassThru]

export-Console [[-Name] String] [-Force]

More details are available by running get-help on each one of these cmdlets.

Note: the new MshSnapins cmdlets are not available in a custom shell.

To learn more about how to create a MshSnapin, refer to the GettingStarted.rtf documentation and look up: Appendix D - Creating a SnapIn.

Literal numbers Cmdlet parameters:

Cmdlet parameters that are literal numbers will now get treated as numbers, whereas previously they used to be treated as strings. This may affect a script if the type of the parameter can be converted from a string but not from an integer. The user fix is to enclose the literal number in quotes. This change was in the earlier Monad Beta 2 but was not well communicated before.

The remaining notes are unchanged from the ones included with the prior Windows "Monad" Shell Beta 2 (for .NET Framework 2.0 Beta 2) release.

MAML Cmdlet help schema

Cmdlet help now adhere to the Microsoft MAML schema. All Cmdlet help content are in the *help.xml files in the Monad application folder under the correct culture folder:

System.Management.Automation.Commands.Management.dll-Help.xml
System.Management.Automation.Commands.Utility.dll-Help.xml
System.Management.Automation.ConsoleHost.dll-Help.xml
System.Management.Automation.dll-Help.xml
System.Management.Automation.Security.dll-Help.xml

New add-member Cmdlet

We have introduced a new add-member cmdlet. To learn more about this Cmdlet, please check its usage by simply typing get-help add-member.

Monad assemblies are now NGEN'ed/GAC'ed

All Monad assemblies are installed using the Native Image Generator Ngen.exe and are installed in the Global Assembly Cash folder "GAC" by the Monad MSI installer. This allows the assemblies to load and execute faster, because it restores code and data structures from the native image cache rather than generating them dynamically.

Preference variables interaction changes

The effective settings which govern the behavior of ShouldProcess, ShouldContinue etc. emerges from the following:

- Command-line options: -WhatIf, -Confirm, -ErrorAction, -Debug, -Verbose
- Preference variables: $WhatIfPreference, $ConfirmPreference, $ErrorActionPreference, $DebugPreference, $VerbosePreference, $WarningPreference, $ProgressPreference

The following are the algorithms for determining the effective setting. In priority order:

WhatIf (true/false)

-WhatIf (or –WhatIf:$false)
$WhatIfPreference
default: false


Confirm (ActionPreference)

-Confirm:$true => Inquire
-Debug –Confirm:$false => Continue
-Debug => Inquire
-Confirm:$false => SilentlyContinue
$ConfirmPreference
default: SilentlyContinue


ErrorAction (ActionPreference) (note that –ErrorAction is of type ActionPreference)

-ErrorAction <preferencesetting> => <preferencesetting>
-Debug => Inquire
$ErrorActionPreference
default: Continue


Debug (ActionPreference)

-Debug:$true => Inquire
-Debug:$false => SilentlyContinue
$DebugPreference
default: SilentlyContinue


Verbose (ActionPreference)

-Verbose:$true => Continue
-Verbose:$false => SilentlyContinue
-Debug => Inquire
$VerbosePreference
default: SilentlyContinue


Warning (ActionPreference) (note that there is no –Warning flag)

-Debug => Inquire
-Verbose => Continue
$WarningPreference
default: Continue


Progress (ActionPreference) (note that there is no –Progress flag)

$ProgressPreference
default: Continue

Monad refactoring work

In this release, the Cmdlet base class has been factored into two separate classes. If your cmdlets do not require any of the Monad engine core services (access to session state or providers) or use any of the engine intrinsic APIs, then you should continue to derive from Cmdlet. If you do require any of these services, then you should change your code to derive from MshCmdlet. In migrating to this new release, the best approach is to compile any existing cmdlets while still deriving from Cmdlet and only change the derivation for those cmdlets that have errors.

This change was made to reduce unnecessary dependencies on Monad core data structures for cmdlets that do not require those services. A positive consequence of this change is that if your cmdlets which derive only from Cmdlet can be directly invoked as standalone objects. For example, the get-process cmdlet only derives from Cmdlet and can therefore be used directly as shown in the following code:

 

using System;
using System.Collections;
using System.Diagnostics;
using System.Management.Automation;
using System.Management.Automation.Commands;

public class process

{
    public static void Main()
    {
        GetProcessCommand g = new GetProcessCommand();
        g.ProcessName = new string[] {"[a-t]*"};
        foreach (Process p in g.Invoke<Process>())
            {
                System.Console.WriteLine(p.ProcessName);
            }
    }
}

IMPORTANT NOTE: As always, our developer guidance is to develop your service as a proper API, then write cmdlets to surface that API to Monad. It is strongly recommended that little or no business logic be contained in the cmdlet code itself. Although this refactoring does allow cmdlets to be used directly as an API, it should not be construed as a replacement for proper API design.

Misc bug fixes

- Match-string: match-string -list used to write the match object before closing the file which used to cause an exception. This issue is now fixed. The following example should now work as expected:

ls -rec -filter *.cs | match-string "cmdlet" | foreach { (cat $_) -replace "cmdlet","MshCmdlet" > $_ }

- Constants expressions after a variable were not being handled properly. The following example describes the new fixed behavior:

MSH:\> $a = "this is a test"
MSH:\> 80 - 8 - $a.length
    58

- Credential parameter of remove-item is now correctly passed to the provider.

- write-progress now uses "ooo.." instead of "%%%"

Changes from Windows "Monad" Shell Beta 2 (for .NET Framework 2.0 Beta 2)

MSH execution policy changes

Monad's ExecutionPolicy is now configured to "Restricted" by default. This is a new value for ExecutionPolicy. In Restricted mode, scripts (.msh files) cannot be run and .mshxml files (types.mshxml and *.format.mshxml files) can only be run if they are signed by a trusted publisher (.mshxml files are treated the same as they are by the "AllSigned" policy). For msh.exe, this value is controlled via the registry setting "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSH\1\ShellIds\Microsoft.Management.Automation.msh\ExecutionPolicy". The earlier Beta 2 release defaulted to an ExecutionPolicy of "RemoteSigned".

For other shells, the ExecutionPolicy is controlled via the registry setting "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSH\1\ShellIds\<YourShellId>\ExecutionPolicy" where "<YourShellId>" can be obtained from the $shellid variable inside the shell.

When Monad first starts up it may ask a question "Do you want to run software from this untrusted publisher?" for the file "types.mshxml", published by Microsoft. You can choose to not load the file, but the file (and the *.format.mshxml files, which Monad will also prompt for if you do not select [A] for "Always run" for types.mshxml) controls the display and formatting of Monad and the experience in Monad will be degraded if it is not loaded. To avoid this prompt in the future, either select [A]for "Always run", or change the ExecutionPolicy from "Restricted" to "RemoteSigned".

The error text for certain execution errors references the "about_signing" help file. Simply type get-help about-signing to learn more about the new changes in Monad's ExecutionPolicy.

If you see an error at startup "The file "C:\Documents and Settings\All users\Documents\msh\profile.msh cannot be loaded. The execution of scripts is disabled on this machine" then either change the ExecutionPolicy from "Restricted" to "RemoteSigned", or sign the files using the set-authenticodesignature cmdlet (the error message is misleading; execution of .mshxml files is not entirely disabled when ExecutionPolicy is "Restricted", but they must be signed by a trusted publisher). The "about_signing" help file has more details. You can also delete the file; in the initial configuration, the profile.msh file does not add any functionality to Monad.

Profile.msh possible errors

If you load the profile.msh file, and you have previously installed an earlier version of Monad, then on startup you may see a series of errors like:
set-alias : The AllScope option cannot be removed from the alias 'cat'.
At C:\Documents and Settings\All Users\Documents\msh\profile.msh:9 char:10
+ set-alias <<<< cat get-content

 

To fix this, either delete the file named ("C:\Documents and Settings\All Users\Documents\msh\profile.msh" in this example), or remove all the "set-alias" lines from it. Aliases defined in profile.msh in earlier versions of Monad are now defined internally by Monad before the profile is run, therefore the definitions in profile.msh generate an error attempting to redefine the alias.

Known Issues with Monad Beta 2

MSH crashes while get-content –wait is running on a file that is updated frequently.

UTF7 file encoding is not supported.

Set-item on an existing alias returns an error instead of writing a new value if –option ReadOnly is specified. Set-alias should be used instead.

Regardless of the file extension, the following reserved device names should not be used as the name of a file. If used, unpredictable behavior and data loss may occur.

CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9

Help content for write-warning and script-signing are missing.

Help content for new-object is incorrect.

Important Changes in Monad Beta 2

COM interop feature has been added in this release. Documentation on how to use this feature is included in the "Getting Started Guide."

The concept of separate shells has been introduced in this version of MSH. If you are developing Cmdlets, review the information about Shells in the "Getting Started Guide."

When you run setup, it will automatically register an MSHSIP.dll to support script signing. To learn how to sign a script type:

MSH> Set-AuthenticodeSignature -?

and follow the instructions.

The following cmdlets have been added:

compare-object, convert-HTML, export-clixml, import-clixml, start-transcript, stop-transcript, update-FormatData, update-typeData, write-warning

Script block delegates feature is enabled in this release. However, currently it only works when the delegates are called on the same thread.

Changes from the Beta 1 Release

A system-wide profile is installed at "All Users\Documents\MSH\profile.msh". User specific profile should go in at "users\My Document\MSH\profile.msh".

The registry entry for Monad now has shellId - HKLM:\SOFTWARE\Microsoft\msh\1\ShellIds

The format.mshxml file allows the user to define what properties will be displayed and in what format for any type. Setup will install a read only format.mshxml file. You can add additional format data in a separate file with .mshxml extension for your formatting requirements. Documentation on how to use this file is included in the "Getting Started Guide."

The types.mshxml file allows the static extension of types with added properties (which can be used by format.mshxml). Setup will install a read only types.mshxml file. You can add additional types data in a separate file with .mshxml extension for your formatting requirements. Documentation on how to use this file is included in the "Getting Started Guide."

Now there are three execution policy - AllSigned, RemoteSigned, Unrestricted. The default execution policy is RemoteSigned. For more details on execution policy, refer to "Getting Started Guide."

6.4.9    Some tools are built to run only on Windows Vista

The following tools are built to run only on the Windows Vista operating system. If you attempt to run them on Windows XP SP2 or Windows Server 2003, you will see an error message stating that the executable is not a valid Win32 application.

Workaround

Use these tools on the Windows Vista operating system.

6.5 Documentation

The following entries describe known issues with Windows SDK documentation and possible workarounds.

6.5.1    Copy Code sometimes produces an error

When trying to view source code for some WinFX samples in the documentation, a script error may appear when trying to use the Copy Code button. To work around this issue, copy the code using <Ctrl>+<C> and paste it using <Ctrl>+<V>.

6.5.2    Some topics in the documentation display an Internet Explorer Script Error

When navigating to a some documentation topics using the Table of Contents, Index, Search, or links, the topic will appear with an Internet Script Error indicating that an error has occurred in the script on the page. To work around this issue, click No to continue and the topic will appear. This issue will be addressed in a future release.

6.5.3    Known Issues with WCF sample documentation

The WCF sample code has been updated for the February CTP. However, some sample documentation may not have been updated for this release due to time constraints.

6.6 Samples

This section describes known issues with Windows SDK samples and possible workarounds.

Note:  Some WinFX samples have specific dependencies or setup requirements. If you find a sample in the allwinfxsamples.zip file is not working properly, first check the sample page in the documentation for instructions.

6.6.1    The following WinFX samples do not compile in this version of the Windows SDK

The samples listed below do not compile in this version of the SDK. There is no known workaround for this issue.

.NET Framework Windows Presentation Foundation Windows Communication Foundation Cross-Technology
  • ASP Roles (C# only)
  • Background Update (C# only)
  • BEREncoding (C++ only)

  • Bind Validation (C# only)

  • Control Template Examples (VB only)

  • Dsml Batch Request (C++ only)

  • Dsml Exceptions (C++ only)

  • Dsml Paged Search (C++ only)

  • Dsml Read Root DSE (C++ only)

  • Dsml Send Request (C++ only)

  • LDAP Async Send (C++ only)

  • LDAP Exceptions (C++ only)

  • LDAP Paged Search (C++ only)

  • LDAP Print Domain (C++ only)

  • LDAP Read Root DSE (C++ only)

  • LDAP Referral (C++ only)

  • LDAP Send Request (C++ only)

  • Mailer (C++ only)

  • On Demand (C++ only)

  • Animate3DRotation\XAML\BlankSample (C#)
  • Animate3DRotation\XAML\BlankSample (VB)
  • Animate3DRotationCode\CSharp\BlankSample
  • Animate3DRotationCode\VB\BlankSample
  • AvalonCalculator2 (C#)
  • AvalonHostingWindowsFormsControl (C#)
  • Blackjack (C#)
  • Capital_Properties (VB)
  • ControlTemplateExamples (VB)
  • ControlTemplateExamples (XAML)
  • create_cube (C#)
  • DataBindingLab (VB)
  • DateTemplateSelectorSample (C#)
  • DPClearValue (C#)
  • DPClearValue (VB)
  • GeometryDesigner (C#)
  • GraphCalc (C#)
  • HostingAxInWpf (C#)
  • HostingAxInWpfWithXaml (XAML)
  • HostingWfInWpf (C#)
  • HostingWfInWpf (C#)
  • HostingWpfUserControlInWf (C#)
  • IUI_Frame (C#)
  • IUI_Frame_VB (VB)
  • LaunchDialogBox_VB (VB)
  • ListViewSort (C#)
  • Mil3dPoints (C#)
  • Mil3dSize (C#)
  • Mil3dVectorSample (C#)
  • Mil4dPoints (C#)
  • MilConverterSample (C#)
  • MyProject (XAML)
  • NavWindow_Events (C#)
  • OpenWindow_VB (VB)
  • OutlinedTextSample (C#)
  • QuickStart_1 (C#)
  • QuickStart_1 (VB)
  • QuickStart_2 (C#)
  • QuickStart_2 (VB)
  • QuickStart_3 (C#)
  • QuickStart_3 (VB)
  • QuickStart_4 (C#)
  • QuickStart_4_VB (VB)
  • QuickStart_5 (XAML)
  • Resources (XAML)
  • Resources (XAML)
  • ScrollBarStyleExample (VB)
  • Show3DLights (C#)
  • SimpleTreeView (XAML)
  • textblock_props_samp (C#)
  • transforms (C#)
  • Typography_Samp1 (C#)
  • Typography_Samp2 (VB)
  • Typography_Samp2 (XAML)
  • Typography_samp4 (VB)
  • Typography_samp4 (XAML)
  • UsingImageBrush (C#)
  • UsingVisualBrush (C#)
  • Win32HostingWPFPage (C++)
  • WindowsFormsHostingAvalonControl (C#)
  • WordGame1 (C#)
  • WordGame1_vb (VB)
  • WordGame2 (C#)
  • WordGame2_VB (VB)
  • WPFWithWFAndDatabinding (C#)
  • COM Client and Windows Communication Foundation Service (WCF) Using the WCF Moniker
  • Custom Token
  • Dead Letter Queues
  • Discovery: UDDI (C#)
  • Droppable Message Interceptor (C#, Windows Vista x86 and x64)
  • ETWTracing (VB, Windows Vista, x86, x64)
  • Extending Control Over Error Handling and Reporting
  • Infocard (C#, Windows Vista, x86, x64)
  • Infocard (VB, Windows Vista, x86, x64)
  • Integrating with a COM+ Application as a Windows Communication Foundation Service
  • Message Interceptor (C#, Windows Vista, x86, x64)
  • MSMQ Activation
  • NamedPipe Activation
  • NetStreamedTcpBinding
  • NetStreamedNamedPipeBinding
  • Supporting Tokens (C#, Windows Vista, x86, x64)
  • TCP Activation
  • Transaction Behavior (doesn't run across machines)
  • UserNameOverCertificate
  • Webforms (C#, Windows Vista, x86)
  • XML Formatter (doesn't run across machines)
  • Mood Orb

  • Recipe Shell Properties

  • Recipe Viewer

  • Safe Pad


 

6.6.2    The following non-WinFX samples do not compile in this version of the Windows SDK

The samples listed below do not compile in this version of the SDK. Additionally, none of the DirectShow samples compile. There is no workaround for this issue.

6.6.3 Must Install Peer Networking Feature on Microsoft Windows XP SP2 Before Running WCF Peer Channel Samples

The documentation for three of the WCF samples is missing instructions on how to install the Peer Name Resolution Protocol (PNRP) on a computer running Windows XP SP2. These samples are:

·    Net Peer TCP Sample

·    Peer Channel Secure Chat Sample

·    Peer Channel Custom Authentication Sample

 To install PNRP on Windows XP SP2 (one-time setup):

1.       In Control Panel, double click Add or Remove Programs.

2.       In the Add or Remove Programs dialog box, click Add/Remove Windows Components.

3.       In the Windows Components Wizard, select the Networking Services check box, and then click Details.

4.       Check the Peer-to-Peer check box and click OK.

5.       Click Next in the Windows Components Wizard.

6.       When installation completes, click Finish.

7.       From a command shell, start the PNRP service using the following command:

net start pnrpsvc

6.6.4    The Web\Behaviours\Library\ToolTips sample does not currently run

The Web\Behaviours\Library\ToolTips sample does not currently run. There is no known workaround for this issue.

6.6.5  Some samples do not compile because compile-time warnings are treated as errors

These samples do not currently compile with the version of the compiler shipped with this SDK because compile-time warnings are treated as errors:

  • netds\winsock\appletalk
  • netds\winsock\overlap
  • netds\winsock\simple
  • winbase\indexing\smpfilt
  • winbase\io\enummount
  • winbase\io\floppy
  • winbase\WtsApi\TSSysInf\Client
  • winui\cursor
  • WinUI\Input\Ime\FullIME
  • winui\input\Ime\multiui
  • winui\input\mouseinfo
  • WinUI\Input\Ime\FullIME

To work around this issue, remove the compile-time switch /WX in each sample's makefile. However, as a rule you should NOT base your development using any code that produces warnings.

6.6.6    Two samples ship invalid project files (.vcproj)

The following samples ship invalid project files (.vcproj). These files are used to build the sample on the command line using vcbuild.exe, which is included in the SDK. To work around this issue, please use the supplied makefiles to build the samples.

  • Samples\SysMgmt\QueryLog
  • Samples\SysMgmt\Subscriber

6.6.7   Some NetDS samples require Visual Studio 2003 to build

All samples installed in the \Microsoft%20%SDKs\Platform\Samples\NetDs\NAP directory require that Microsoft Visual Studio 2003 be installed to build.These samples do not compile from the command line. There is no known workaround for this issue.

6.6.8  Active Template Library (ATL) and Microsoft Foundation Class (MFC) samples require Visual Studio to build

Some samples in the Windows SDK use Active Template Libarary (ATL) and/or Microsoft Foundation Class (MFC) technologies found in Visual Studio. Samples using these technologies require Visual Studio to build. For example, samples that include the afxwin.h or atlbase.h require MFC and ATL respectively and require Visual Studio to build. There is no known workaround for this issue.

6.6.9    Windows Communication Foundation sample setup may fail

Some of the WCF samples setup batch files use an obsolete environment variable name for the path to the SDK tools. Therefore, some sample setups may fail. This typically happens when setup requires one of the WCF SDK tools. This issue will be addressed in a future release. To work around this issue, add the following environment variable:

Variable name: WinSDK
Variable value: [SDK install path] (Example--C:\Program Files\Microsoft SDKs\Windows\v1.0)

6.6.10    Basic Ink Analysis sample fails to compile

The Basic Ink Analysis Sample located in \samples\TabletPC\BasicInkAnalysis\ fails to compile in this version of the Windows SDK. To work around this issue, manually replace the Results event and event handlers with the correct signature of ResultsUpdated and ResultsUpdatedEventHandler.

6.6.11    Some NetDS/Peer to Peer samples need to be run from a non-elevated window

        The following samples cannot be run from an elevated window:

  • Contacts
  • Invitation
  • People Near Me

To work around this issue, run these applications from a non-elevated window.

6.6.12   The Network Access protection sample does not build

Some projects within the sample are not up-to-date in this release, and the sample will not build.

 

Workaround

There is no workaround for this issue in the build, though an updated version of the sample is available in the Windows SDK forum.


7. Windows SDK Product Support

The pre-release Windows SDK is provided "as-is" and is not supported by Microsoft.  If you have questions or need assistance, the following newsgroups are available:

If you have questions or need assistance, see The MSDN Online Windows Vista Developer Center and the Windows Vista Beta Newsgroups for additional information and updates to the known issues. You can find additional information and tools to help ensure you have the properly matching CTP versions of the operating system, WinFX Runtime Components, Visual Studio and SDK at http://channel9.msdn.com/ctpmadness/

8. Feedback

Your feedback is important to us. Your participation and feedback through the Windows Vista Beta Newsgroups is appreciated.


Copyright © 2006 Microsoft Corporation. All rights reserved. Legal Notices.