Windows Phone Developer Tools RTM Release Notes(09/16/2010)

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=04704acf-a63a-4f97-952c-8b51b34b00ce&displaylang=en

Windows Phone Developer Tools RTM Release Notes

09/16/2010

These are the release notes for the RTM release of Windows Phone Developer Tools.

System Requirements

Supported Operating Systems
  • Windows® Vista® (x86 and x64) with Service Pack 2 – all editions except Starter Edition
  • Windows® 7 (x86 and x64) – all editions except Starter Edition

Hardware

Platforms Not Supported

  • Windows® XP and Windows Server® are not supported.
  • Virtual PC and Hyper-V™ are not supported.

Installation

  1. If you have installed a previous version of Windows Phone Developer Tools, you must uninstall it before installing the new version.
  2. If you have Visual Studio 2010 (Professional or higher) installed, then you can use Visual Studio 2010 for development after installing the Windows Phone Developer Tools.
  3. You can install Windows Phone Developer Tools even if you do not have Visual Studio® already installed.
  4. Click on the Windows Phone Developers Tools link and follow the instructions.

Uninstallation

  • Uninstall Microsoft Windows Phone Developer Tools from the Start > Control Panel > Programs > Programs and Features by selecting Microsoft Windows Phone Developer Tools and clicking Uninstall/Change. Uninstall will leave behind some components like Expression Blend®.

Breaking Changes for Windows Phone Developer Tools from Beta to RTM

 
 Item  Description
Updating applications created with earlier versions of Windows Phone Developer Tools Changes have been made to the WMAppManifest.xml and template files. Now that manifest validation has been turned on, you may need to update these files in your older projects. A number of the changes are listed here. However, you can also compare the WmAppManifest.xml, app.xaml and app.xaml.cs files in a new project to the same files in your old projects to determine what has changed and then update your old files accordingly.

The following list shows changes you must make to the WmAppManifest.xml file:

  • In the <App> element, change the value of the Genre attribute from NormalApp to apps.normal.
  • In the <App> element, change the value of the RuntimeType attribute from SilverLight to Silverlight.
  • Remove the PlaceHolderString attribute from the <DefaultTask> element.
  • Add the NavigationPage attribute to the <defaulttask> element and set it to the main page of your app. For example: <DefaultTask … NavigationPage=”MainPage.xaml”/>.

The following list shows changes you must make to the App.xaml file:

Note: The recommended option for updating this file is to obtain a copy of the most recent version. Using your old file, copy the information specific to your application (such as, resources) to the new file.

  • Remove the <Application.RootVisual> element
  • Add the <Application.ApplicationLifetimeObjects> element. For example:

    <Application.ApplicationLifetimeObjects>
          <!--Required object that handles lifetime events for the application-->
          <shell:PhoneApplicationService Launching="Application_Launching" Closing="Application_Closing"
               Activated="Application_Activated" Deactivated="Application_Deactivated"/>
    </Application.ApplicationLifetimeObjects>
     

The following list shows changes you must make to the app.xaml.cs file:

  • If you have added the <Application.ApplicationLifetimeObjects> element to the App.xaml file then you will need to add these event handlers to the app.xaml.cs file:

    private void Application_Launching(object sender, LaunchingEventArgs e)
    {
    }

    private void Application_Activated(object sender, ActivatedEventArgs e)
    {
    }

    private void Application_Deactivated(object sender, DeactivatedEventArgs e)
    {
    }

    private void Application_Closing(object sender, ClosingEventArgs e)
    {
    }
  • Add the following initialization code to your app.xaml.cs file and call InitializePhoneApplication() in the app constructor:

    // Easy access to the root frame
    public PhoneApplicationFrame RootFrame { get; private set; }

    // Avoid double-initialization-
    private bool phoneApplicationInitialized = false;

    // Do not add any additional code to this method
    private void InitializePhoneApplication()
    {
    if (phoneApplicationInitialized)
    return;

    // Create the frame but do not set it as RootVisual yet; this allows the splash
    // screen to remain active until the application is ready to render.
    RootFrame = new PhoneApplicationFrame();
    RootFrame.Navigated += CompleteInitializePhoneApplication;

    // Handle navigation failures
    RootFrame.NavigationFailed += RootFrame_NavigationFailed;

    // Ensure you do not initialize again
    phoneApplicationInitialized = true;
    }

    // Do not add any additional code to this method
    private void CompleteInitializePhoneApplication(object sender, NavigationEventArgs e)
    {
    // Set the root visual to allow the application to render
    if (RootVisual != RootFrame)
    RootVisual = RootFrame;

    // Remove this handler since it is no longer needed
    RootFrame.Navigated -= CompleteInitializePhoneApplication;
    }

    // Code to execute if a navigation fails
    void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
    {
    if (System.Diagnostics.Debugger.IsAttached)
    {
    // A navigation has failed; break into the debugger
    System.Diagnostics.Debugger.Break();
    }
    }

    #endregion

 

Limit to the number side loading of applications on the phone Developer phone registration is the process through which a registered Windows Phone® developer may unlock a retail Windows Phone to side load applications for development and testing. A limit on the number of side loaded applications that may concurrently be installed on the phone will be enforced. The default limit will be 10 applications. Attempts to side load more than 10 applications will result in an error. This limit does not affect applications installed via Windows Phone® Marketplace.

 

XNA Framework assembly references The public key token for XNA Framework assemblies has changed. Assembly references in content projects and game projects created using previous releases of Windows Phone Developer Tools must be updated to work correctly. You can do this by removing and re-adding references that do not resolve correctly using the References node in the Visual Studio Solution Explorer.

 

Character encoding. Support for all character encodings will be removed, except for those in the following list.
  • utf-8
  • utf-16
  • utf-16LE
  • utf-16BE
  • ISO-8859-1

Use of an unsupported encoding value in an application will result in an ArgumentException exception. You must modify existing applications to remove references to unsupported encoding values. XML data should specify only supported encodings. For example:
<?xml version="1.0" encoding= “utf-8”?>.

 

A GamerPrivilegeException is returned if the user does not have content privileges. If AllowProfileViewing and AllowUserCreatedContent flags are not set in a gamer profile, then the user cannot view profiles or display the gamer card of another user. The following methods now check for these privileges and will return GamerPrivilegeException if the user does not have these privileges:
  • Guide.ShowGamerCard(PlayerIndex player, Gamer gamer)
  • Gamer.BeginGetFromGamertag(string gamertag, AsyncCallback callback, object asyncState)
  • Gamer.GetFromGamertag(string gamertag)
  • Gamer.GetProfile()
  • Gamer.BeginGetProfile(AsyncCallback callback, object asyncState
The picture sharing mechanism has changed. Previously, Windows Phone® 7 would place the picture into the Isolated Storage of the application. The picture would then be loaded when the application was launched. Now, when the application is launched, it is passed a string token. To retrieve the picture, the application calls the GetPictureFromToken() method, public static Picture GetPictureFromToken(string token), which takes the token as a parameter and returns a Picture object. You will need to update existing applications.

The following code example illustrates how to use the GetPictureFromToken method to retrieve a photo. For more information see, How to: Create a Photo Extras Application for Windows Phone:

using System.Windows.Media.Imaging;
using Microsoft.Phone;
using System.IO;
using Microsoft.Xna.Framework.Media;
using System.Windows.Navigation;
.
.
.
protected override void OnNavigatedTo(NavigationEventArgs e)
{
//Gets a dictionary of query string keys and values
IDictionary<string, string> queryStrings = this.NavigationContext.QueryString;


//This code ensures that there is at least one key in the query string, and checks if the "token" key is present.
if (queryStrings.ContainsKey("token"))
{

//This code retrieves the picture from the local Zune Media Database using the token passed to the application.
MediaLibrary library = new MediaLibrary();
Picture picture = library.GetPictureFromToken(queryStrings["token"]);


//Creates WriteableBitmap object and adds to the Image control Source property.
BitmapImage bitmap = new BitmapImage();
bitmap.SetSource(picture.GetImage());
WriteableBitmap picLibraryImage = new WriteableBitmap(bitmap);
retrievePic.Source = picLibraryImage;
}

}

Deployment and debugging. While deploying or debugging, if you get the following error: “Application could not be launched for debugging”. First, verify that the application is installed on the target device and that there is no splash screen in the project. Then, uninstall the application and in Visual Studio perform the following steps:
  1. Add an image file with the name SplashScreenImage.jpg to the project.
  2. In Solution Explorer, right-click the file and select Properties.
  3. In the Properties pane, set Build Action to Content.
  4. Rebuild the application and redeploy it.
Installation on Windows Vista. Windows Phone Developer Tools setup blocks installation on Windows Vista and forces the user to install Windows Vista SP2.

Known Issues

Installation

  1. Windows Phone Developer Tools (WPDT) RTM is only compatible with the RTM version of Visual Studio® 2010. If you have any version of Visual Studio 2010 product family other than Visual Studio 2010 RTM installed on your computer, setup will stop and instruct you to uninstall the product or a set of components.
  2. For additional installation and uninstallation known issues related to Visual Studio 2010, see this ReadMe file.
  3. If XNA Game Studio or Expression Blend components fail to install as part of WPDT installation, they can be installed from Add Remove Programs:
    1. Right-click Microsoft Windows Phone Developer Tools – ENU and select Uninstall/Change.
    2. Select Add Optional components and proceed with the installation.
  4. Windows Phone projects show up in LightSwitch and other integrated Shell SKUs of Visual Studio. However, Windows Phone application development is not supported in these SKUs.
  5. WPDT Repair does not repair Expression Blend. To repair Expression Blend, perform the steps in #3 above.
  6. Only one localized version of WPDT can be installed on a computer.
  7. You can install a localized version of WPDT on a computer with a matching localized operating system.
  8. Installing a language version of WPDT on a system with a different language version of Expression Blend is not supported.
  9. When upgrading from WPDT ENU version to a localized version, you must uninstall WPDT ENU and Expression Blend. Make sure that you uninstall any remaining components of Expression Blend before proceeding with the installation of the localized version of WPDT.

Uninstallation

  • None.

Expression Blend 4

  1. Silverlight, Windows Presentation Foundation (WPF), and SketchFlow projects are not available in Expression Blend 4 for Windows Phone. To build Silverlight, WPF, or SketchFlow projects, download the trial version of Expression Studio 4 Ultimate.

Silverlight Application Development

  1. HttpWebRequest (and WebClient) UserAgent set as NULL or empty string will be sent as NativeHost. Even though the UserAgent property for an HttpWebRequest is set to NULL or an empty string(""), when the request is sent that property will have the value NativeHost.
  2. When using Microsoft.Devices.MediaHistoryItem.PlayerContext to add key-value pairs, use smaller sized values. This has an impact on the MediaHistory.WriteRecentPlay() and MediaHistory.WriteAcquiredItem() APIs which will fail to update the Music + Videos Hub if the combined size of key-value pairs is too large. Keep the combined length of all key value pairs to 200 characters or less.
  3. The FMRadio does not automatically turn off when your application goes into the background. It will consume battery power even when it is not in use. Your application should turn off the radio (e.g. MyFMRadio.PowerMode = RadioPowerMode.Off) when it is no longer being used.
  4. Slider control does not handle margins inside its Control Template. The slider will only work for small values (e.g. 0-5). If you attempt to use it for larger values you may find that you cannot actually drag the slider far enough to the right. Also, the slider may crash given certain layouts (for example, if you set it to "Stretch" inside a ScrollViewer with a horizontal scroll bar).
    To resolve these issues, update the template and remove the inner margins. Note that by doing this you will lose the extra touch target.
  5. When a deactivated instance of an application is reactivated, navigation cannot be started until after navigation to the top page of the reactivated application from the external page has completed. The most common error seen so far has been applications attempting to call Navigate or GoBack when receiving the Completed event of a chooser. Unfortunately, this may happen before the navigation to the top page has completed. The workaround is to wait for the NavigationService.Navigated event or the OnNavigatedTo override of the top page before calling Navigate or GoBack.
  6. z-Order rendering of MediaElement is not working correctly in the Windows Phone Emulator. The media element appears in the background when placed on top of other controls in the emulator. To work around this issue make sure that nothing is placed behind (i.e. has a lower z-Order than) the media element.
  7. Applies to Silverlight and XNA Framework apps and games: You should remove any logic that sets Guide.SimulateTrialMode to true before submitting your Windows Phone 7 application for final certification. While this property will not affect trial mode in Windows Phone Marketplace games, it has an unintended effect on Guide.ShowMarketplace in trial-licensed games.
  8. When on a page with a map, navigating to another page with a map, causes pinch/stretch to stop working. If an application navigates to multiple pages with maps, do not add the map to the xaml. Instead, include code that waits for the entire page to load before creating your map and adding it to the page.
  9. In some circumstances, writing to a leaderboard blob column multiple times may cause InvalidOperationException to be thrown on subsequent calls to LeaderboardReader.EndRead. This exception may continue to be thrown after restarting the application or when running other applications on the same device that uses Xbox LIVE® friend leaderboards.
  10. If your code removes an Application Bar button that is NOT the last one, and then inserts a new button, the order of the buttons will change and one of the buttons will become an Application Bar menu item.
    If you can encounter this issue you can remove all of the Application Bar items and add them back. If you need to change a single button you can update it directly rather than remove it and then add an updated button.
  11. The device cannot be unlocked while Zune® is synchronizing. If you attempt to unlock the device before Zune has finished synchronizing the following error message will be displayed:

    Error: Unable to connect to phone. Please check that the Zune software is running and that Zune's sync partnership with your phone has been established.
  12. If your application attempts to access a web site over Wi-Fi using HTTPWebRequest and the site is blocked due to Wi-Fi restrictions then an ArgumentNullException, rather than the expected WebException, will be returned. To work around this issue use a non-specific catch clause (e.g. catch (Exception e){..}) in your application.
  13. You cannot make a direct call to MessageBox.Show from the constructor because it will not execute until after Application.Startup has been processed. To work around this issue use Dispatcher.BeginInvoke. For example:

    System.Windows.Deployment.Current.Dispatcher.BeginInvoke(Test);

    void Test()
    {
    MessageBox.Show("Test", MessageBoxButton.OK);
    }
  14. MultiScaleImage.ZoomAboutLogicalPoint does not render the updated scene when MultiScaleImage.UseSprings is set to false. This issue may not be problematic if another element or logic causes the scene to become dirty, such as an animation. However, if this issue is not resolved by other actions causing the scene to become dirty, then there are two workarounds:
    • Put the the ZoomAboutLogicalPoint call in between the UseSprings Sets if you have UseSprings set to false (MultiScaleImage = false) and you are using MultiImageScale.ZoomAboutLogicalPoint method, then you can use the following code example:
      deepZoomImage.UseSprings = true;
      deepZoomImage.ZoomAboutLogicalPoint(1.5, 0.5, 0.5);
      deepZoomImage.UseSprings = false;

      By using ZoomAboutLogicalPoint between two UseSprings value settings with the last setting set to false, the desired effect of having UseSprings turned off is preserved and the scale is updated.
    • -OR- The managed implementation of ZoomAboutLogcialPoint zooming and panning is not affected by this issue when using the property ViewportWidth and/or ViewportOrigin. The following managed implementation of ZoomAboutLogicalPoint uses ViewportWidth and ViewportOrigin to workaround this rendering issue:
      public static void ZoomAboutPoint(MultiScaleImage multiScaleImage, double zoomFactor, Point centerPoint)
      {
      double newZoomViewportWidth = multiScaleImage.ViewportWidth / zoomFactor;

      double centerPointXRatio = (centerPoint.X - multiScaleImage.ViewportOrigin.X) / multiScaleImage.ViewportWidth;
      double centerPointYRatio = (centerPoint.Y - multiScaleImage.ViewportOrigin.Y) / multiScaleImage.ViewportWidth;
      double finalcenterPointX = centerPoint.X - (newZoomViewportWidth * centerPointXRatio);
      double finalcenterPointY = centerPoint.Y - (newZoomViewportWidth * centerPointYRatio);
      multiScaleImage.ViewportOrigin = new Point(finalcenterPointX, finalcenterPointY);
      multiScaleImage.ViewportWidth = new ZoomViewportWidth;
      }

  15. Be cautious in using static type initializers (also known as class constructors). If a static type initializer invokes a blocking operation directly or indirectly, it could result in a deadlock and your application will hang. For example, if the static initializer calls DateTime.Now, the application will hang because the API internally uses lock to provide thread safety. The workaround is to use an instance constructor that can check and initialize data only once.
  16. When the platform assembly tries to load a user assembly and it fails, you will not see an exception and you will not see the data loss easily. This can happen when the platform is trying to serialize something in the user assembly.
  17. The value PhoneApplicationPage.State property is only preserved if it contains values. If you set one State value for the page and navigate to another page and back and then remove the value from the State collection, when you navigate away and back again, the property will still be there because the State was not preserved. One workaround is to design your application to set state values to null instead of removing them. Another workaround is to keep one dummy value in the collection at all times so that the State dictionary is always saved.
  18. For existing projects, the ListViewItem control has been removed. You may need to remove the style definition for this from App.xaml. Look for mpc:ListViewItem.
  19. In this release, per frame callbacks (i.e. handling the CompositionTarget.Rendering event) should be used sparingly due to less than optimal performance.
  20. ApplicationBar and related classes cannot participate in data binding and name scopes, so you will need to use code-behind if you want to programmatically change any properties.
  21. When the same namespace exists between Silverlight and Windows Phone, pressing F1 Help resolves to Silverlight. This is the default behavior for Visual Studio 2010.

    Visual Studio 2010 Express for Windows Phone

    1. To change the namespace for your application, you need to modify the following files: [projectname].csproj, App.xaml and App.xaml.cs
      • In your [projectname].csproj file, locate the <SilverlightAppEntry> tag and replace the current namespace name with the new namespace name. That is, change <SilverlightAppEntry>OldNamespace.App</SilverlightAppEntry> to <SilverlightAppEntry>NewNamespace.App</SilverlightAppEntry>.
      • In your App.xaml file, locate the following line x:Class=”OldNamespace.App" and change it to x:Class="NewNamespace.App".
      • In your App.xaml.cs file, locate the namespace declaration and change namespace OldNamespace to namespace NewNamespace.
      • Select the correct namespace and class as the Startup Object in the project properties.
    2. When unlocking your phone using the Windows Phone Developer Registration tool, you may get an error message indicating that the device name is in use. This is most likely to occur if the same device has previously been unlocked using the same account. There are two options for resolving this issue:
      • Use the Zune client to give the device a different name before unlocking.
      • -OR- Before unlocking the device, remove the device registration. To unlock the device go to the Windows Phone 7 developer portal, click Your apps, Log on to your account and click Device Registration.
    3. The system can run out of memory during XAP packaging in some scenarios. There are cases where XAP packaging can throw an out of memory exception. This tends to happen more often for very large projects, or in projects with a large number of files that are being packaged into the XAP. It can happen for both Silverlight and XNA Framework projects. To work around this issue, perform one of the following actions:
      • Add memory.
        -OR-
      • Use a 64-bit OS; use VPDExpress.exe instead of devenv.exe; run builds outside of Visual Studio; close TFS and other windows to reduce the memory footprint of devenv.exe.
    4. Windows Phone Developer Tools shows the components listed below. However, these components are not supported.
      • Profiler
      • IntelliTrace
      • Lab Management
      • Testing
      • Database Components
        • Show Data Source
        • Add New Date Source
        • Schema Compare

    Windows Phone Emulator

    1. GPU support: Windows Phone Emulator supports GPU peripheral emulation using the host GPU on a PC that supports DDI version 10 and above and DirectX version 10 and above. On all other computers, the emulator falls back to software emulation which is not supported on the platform. For more information, see Setup and System Requirements for Windows Phone Emulator in the Windows Phone Developer Tools documentation on MSDN.
      You can check if your PC supports the recommended configuration by running ‘dxdiag’ from any command-line window.

      On Windows Vista SP2, the four updates that are a part of KB 971644 are also required to support deployment to the Windows Phone Emulator.
      The following updates referenced in KB 971644 are required for Windows Vista x86-based systems:

      The following updates referenced in KB 971644 are required for Windows Vista x64-based systems:

       

    2. If the time zone of the host computer changes while Windows Phone Emulator is running, the time zone of the emulator is not updated.
    3. Fiddler is not supported in this release. If you configure Fiddler to track all network traffic, then the emulator cannot connect to the network. To connect to the Intranet from the Windows Phone Emulator while Fiddler is tracking the network traffic on the host computer, you can perform the following steps. However, Fiddler will not monitor the network traffic of the Windows Phone Emulator.
      • Configure Fiddler to track only Internet traffic.
      • Use manual proxy settings and bypass the proxy server for local addresses.
      • This will allow the emulator to connect to an intranet site.
    4. When the Windows Phone Emulator is running on Windows Vista, some audio glitches occur due to lost audio packets when playing audio such as a media file or alarms. This issue does not occur when the emulator is running on Windows 7.
    5. When using MediaPlayerLauncher on the emulator, video frames only render if you continually click on the UI. For example, if you click you will see a frame or two, then the display will go black. If you click constantly, you will see the entire video.
    6. Because the emulator does not contain all the components of Windows Phone 7, some launchers and choosers may not work as expected (e.g. email, SMS). For more information, see Launcher and Chooser Support in Windows Phone Emulator.
    7. Media: The emulator only supports the VC-1 (WMV simple, main, and advanced profiles) container for video encoding.
    8. The emulator does not support orientation changes when the keyboard is enabled. You must disable the keyboard by pressing the Pause/Break or Page down/Page up key, and then rotate the emulator.
    9. An existing virtual machine instance of Virtual Box closes when Windows Phone Emulator is launched on a host PC with Hardware VT enabled.
    10. An existing virtual machine instance of VMWare closes when Windows Phone Emulator is launched on a host PC with Hardware VT enabled.
    11. To run XNA Framework games on the emulator on a Windows Vista host computer, you must have Windows Vista SP2 installed. For more information about requirements for running XNA Framework games, see the section Windows Phone Deployment and Debugging in XNA Game Studio.

    XNA Game Development

    1. If the reference to mscorlib is removed from an XNA Game Studio project, it cannot be added back to the project through the Visual Studio interface. If you attempt to add a reference to mscorlib assembly to an XNA Game Studio Windows game project after this reference has been removed, you will see the message: "A reference to 'mscorlib' could not be added. This component is already automatically referenced by the build system."

      For Windows Phone and Xbox 360® game projects, attempting to add a reference to the mscorlib assembly after it has been removed will not result in an error message, but the reference will not be added to the project. For all XNA Game Studio game projects, the build will fail and the following error will be displayed: "Predefined type 'System.Object' is not defined or imported."

      To work around this issue, open the .csproj file and add back the reference to this library:

      <Reference Include="mscorlib">
      <Private>False</Private>
      </Reference>
    2. The CopyLocal setting is not supported for XNA Framework assemblies for projects that deploy to Windows Phone or Xbox 360. For Xbox 360 projects, the files are deployed, but are not necessary and will be ignored. On Windows Phone, setting CopyLocal to true will result in a MissingMethodException, missing functionality, or immediate exit of the game.
      a. For the Microsoft.Xna.Framework assembly reference, the application will throw a MissingMethodException.
      b. For the Microsoft Xna.Framework.Game or Microsoft.Xna.Framework.Graphics assembly references, the game will start, but will immediately exit.
      c. For the Microsoft.Xna.Framework.Input.Touch assembly reference, the game will run, but touch will not work.

      To resolve this issue, set the CopyLocal property of the assembly reference to false. For information on how to do this, see How to: Set the Copy Local Property of a Reference.
    3. In the callback to BeginGetProfile, the IAsyncResult parameter will sometimes have an AsyncState property that is incorrectly set to null , which will result in a NullReferenceExeption if the AsyncState property is accessed. To work around this issue, define the callback parameter of BeginGetProfile as a delegate. For information on how to do this, see Using an AsyncCallback Delegate to End an Asynchronous Operation.
    4. Effect state is not copied when cloning an Effect for the Effect property, and render states will not be restored to the original state when the effect is applied during calls to Mesh.Draw. State changes will not be reflected in GraphicsDevice render state properties, and subsequent changes to the GraphicsDevice render state properties may not update the graphics device state. These states may reset under some conditions, such as when SpriteBatch.Draw is called.
    5. Pre-build event command line and Post-build event command line settings cannot be saved or edited from the Build Events tab of the Project Properties page for XNA Game Studio content projects. These fields are editable on the Build Events page but the settings will not be saved. Developers may manually edit the .contentproj file to add pre-build and post-build event command line settings, and these settings will display on the Build Events tab in a read-only field.
    6. Visual Studio crashes when adding new Reference Paths to content projects from the project properties page. Reference paths can be added by manually editing the .contentproj.user file.

      <PropertyGroup>
      <ReferencePath>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\</ReferencePath>
      </PropertyGroup>


      After adding reference paths by manually editing the .contentproj.user file, these settings will be visible in the Reference Paths tab in the Visual Studio property pages for the content project.
    7. If a content project is referenced by more than one game or game library project targeting the same platform in the same solution, you will see the following build error:

      Unable to copy file {filename}

      This error occurs because content is deleted from the content output folder when more than one project targeting the same platform contains reference to a shared content project. To work around this issue, add the reference to the content project to a game library project, and then reference the game library from any other projects in the solution.
    8. Developers must deselect D3DX analysis to run the PIX for Windows performance tool.
    9. Visual Studio 2010 Test projects will not run if the test project references an XNA Game Studio content project. Developers should deselect content projects when using the Create Test Wizard.
    10. XNA Game Studio no longer supports FBX files that contain multiple animation takes. A game will display multiple copies of the first animation take if an FBX file specifies multiple animation takes.
    11. XNA Game developers should consider implementing their own splash screens.
      This change won't affect the ability to run games. In XNA games that contain a SplashScreenImage.jpg file, the splash screen is only displayed briefly, which can create a jarring experience. Implementing your own splash screen in your game startup code will enable you to control when it is displayed and the length of time that it is displayed. Consider the following recommendations when creating splash screens for your games:
      • Keep the size of your entry assembly small. All entry assemblies are signed and verified on application startup so this advice holds for either Silverlight or XNA games. The validation is VERY expensive. By default, Silverlight adds resources (textures, etc.) as managed resources to the entry assembly. Instead of adding resources to the assembly, you should manually add them to the XAP file.
      • In Initialize() perform the following steps:
        1. Call base.Initalize(). This will create GraphicsDevice properly.
        2. Load your texture. For fast image loading, follow these guidelines:
          • Size the texture to the target resolution and orientation of the game.
          • Set the texture to auto resize to power the of 2.
          • Use DXT Compressed format.
        3. Create a SpriteBatch.
        4. Render the texture.
        5. Call GraphicsDevice.Present().
      • In Draw(), continue to draw the start texture and, optionally, switch to a loading animation as soon as those assets are loaded.

    Windows Phone Deployment and Debugging in XNA Game Studio

    1. XNA Game Studio will check for a DirectX 10 or later graphics card with a WDDM 1.1 driver before deploying to the Windows Phone Emulator. If the graphics card does not support DirectX 10 or later, the following message will be displayed in the error window of Visual Studio:
      Deploy failed with the following error: The current display adapter does not meet the emulator requirements to run XNA Framework applications.

      The DirectX Caps Viewer Tool can be used to determine if a graphics card supports DirectX 10 or later and if a WDDM 1.1 driver is installed. This tool is available for download via the DirectX SDK.

      To determine if a graphics card supports DirectX 10 or later, perform the following steps:
      1. In the DirectX Caps Viewer, expand the DXGI 1.1 Devices folder, and then expand the next level folder for the video card. Under this folder, you will see folders for Direct3D® 10, Direct3D 10.1, and the like.
      2. Expand the Direct3D 10.1 folder and look at the Feature Level entry. In this folder, you will see an entry for D3D10_FEATURE_LEVEL_10_0 or D3D10_FEATURE_LEVEL_10_1 if the graphics card supports DirectX 10 or later. If the Feature Level indicates a feature level of 9_n or less, it cannot support the Direct3D capabilities required by the Windows Phone Emulator.

      If you see this error message and your graphics card is DirectX 10 capable as reported by the DirectX Caps Viewer Tool, you should refer to the web site for the manufacturer of the graphics card to see if a newer driver is available.

      On Windows Vista SP2, the four updates that are a part of KB 971644 are also required to support deployment to the Windows Phone Emulator.
      The following updates referenced in KB 971644 are required for Windows Vista x86-based systems: The following updates referenced in KB 971644 are required for Windows Vista x64-based systems:
    2. On Windows Phone devices, VertexBuffer.GetData will not return correct results for the overload of this method which allows developers to set the vertexStride parameter. Accessing data with this overload will return the correct data for the Windows Phone Emulator, Windows, and Xbox 360 games. As a work around for Windows Phone games, games must read the entire vertex buffer instead of using the vertex stride to locate elements.
    3. MediaPlayer.Play will throw an InvalidOperationException if you are running the Zune Client on your PC while debugging or playing games on a tethered Windows Phone. This exception will display an incorrect exception message: "Song playback failed. Please verify that the song is not DRM protected. DRM protected songs are not supported for creator games." This exception message is incorrect, and will display even if the song is not DRM-protected. To resolve this issue, close the Zune client while debugging or playing a game on a tethered Windows Phone.
    4. If your game uses landscape orientation, Windows Phone Emulator will incorrectly flip the back buffer contents when the buffer is rendered during game initialization and exit. The rendered frames will be flipped either top to bottom or left to right depending on the DisplayOrientation setting. This behavior will only be observed when initializing and exiting the game in the emulator.
    5. In the Windows Phone Emulator, the SkinnedEffect bone index channel must be specified as one of the integer vertex element formats - either Byte4, Short2, or Short4. This same set of integer data formats cannot be used for other shader input channels such as colors, positions, and texture coordinates on the emulator. Any vertex format can be used with any shader input channel on Windows Phone devices, Xbox 360, and Windows.
    6. If a project has never been deployed, and the game project is not configured to build and deploy, game deployment will fail with the error message, "The application could not be launched for debugging. Verify that the application is installed on the target device." If the game was previously deployed to the device, there will be no error message, but the game will not deploy and the previously deployed version of the game will launch when debugging. To set a game project to build or deploy, perform the following steps:
      1. In Visual Studio® 2010 Express for Windows Phone, click Tools, then click Settings, then click Expert Settings to enable the Solution Configurations drop-down.
      2. From the Solution Configurations drop-down in the standard toolbar, select Configuration Manager.
      3. Check the Build and Deploy checkboxes.

     

    Copyright and Confidentiality Statements

    Information in this document, including URL and other Internet Web site references, is subject to change without notice. Unless otherwise noted, the companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted in examples herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.

    Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.

    © 2010 Microsoft Corporation. All rights reserved.

    Microsoft Direct3D, DirectX, Expression, Expression Blend, Hyper-V, Internet Explorer,MSDN, Silverlight, Visual Studio, Windows, Windows Phone, Windows Server, Windows Vista, Xbox, Xbox 360, Xbox LIVE, XNA, and Zune are trademarks of the Microsoft group of companies.

    All other trademarks are property of their respective owners.

     
    posted @ 2010-09-17 18:45  大厨无盐煮  阅读(916)  评论(0编辑  收藏  举报