WPF Performance and .NET Framework Client Profile

WPF performance and .NET Framework Client Profile related blogs provided by Jossef Goldberg.

  • WPF Performance and .NET Framework Client Profile

    CLR Profiler for .NET Framework 4 is now available

    • 0 Comments

    David Bronman just posted a new version of the CLR Profiler that now also supports .NET Framework 4 as well as Silverlight 4. 
    Key Features:

    • Allows you to profile managed memory that uses .NET 2.0, 3.0, 3.5, or 4. 
      (However, you must always have .NET 4.0 installed on your box in order to use CLRProfiler V4, as CLRProfiler itself contains managed code that depends on .NET 4)
    • Can target Silverlight 4 web apps.
    • Can attach to and detach from live processes, to generate heap graphs. 
      (Note:  This feature requires the process to be running .NET 4.0, does not work against Silverlight, and does not allow gathering allocation call stacks.)
    • Understands in-process side-by-side CLR instances, and can allow you to pick which CLR instance from a given process to profile

    See more details here.

  • WPF Performance and .NET Framework Client Profile

    Memory Leak Hotfixes for WPF 4

    • 0 Comments

    In the Memory Leak Hotfixes for WPF 3.5 SP1 blog post I mentioned that the memory leak fixes that went into KB981107 were only available for WPF 3.5 SP1. I am now happy to announce that these memory leak fixes are also available for WPF 4. 

    You can get the fixes for WPF 4 from here: http://support.microsoft.com/kb/2297328

    Enjoy. Jossef

  • WPF Performance and .NET Framework Client Profile

    New Silverlight Performance Blog

    • 0 Comments

    Wanted folks know that we have started a new Blog that is dedicated to Silverlight performance.
    We have uploaded two posts:

    We plan to add additional posts in the near future, so please stay tune.

  • WPF Performance and .NET Framework Client Profile

    TimeZone patch to WPF Performance Profiling Tools for WPF 4 is now available

    • 1 Comments

    In the WPFPerf Performance Profiling Tools for WPF 4 is now available! post, I mentioned that a bug caused the Visual Profiler to not display any data in certain time zones.
    A patch is now available to fix this issue.
    To install the patch:

    1. Install the WPF Performance Tool like you normally would by installing the Windows SDK for Windows 7 and .NET Framework 4 (Windows SDK 7.1)
    2. Install the patch from http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=da041972-1eb6-4a8a-97d7-d495b314505e
    3. When you get to this dialog, click on 'Repair' 
      wpfperfpatch1 
    4. On next dialog click 'Repair' again. 
      wpfperfpatch2

  • WPF Performance and .NET Framework Client Profile

    Software Rendering Usage in WPF

    • 8 Comments

    As you know by default WPF uses Hardware acceleration (GPU) to render its content (aka Hardware rendering).
    In most cases rendering using Hardware (HW) acceleration is much more performant than rendering using Software. In some small cases SW rendering may be faster (E.g. low end graphics card sometimes found in Netbooks).

    WPF will always attempt to use HW rendering, but in certain cases WPF will fall to Software rendering and the application may not be aware of it.
    Some folks wanted to better understand all the possible cases, so am I am listed these below.
    WPF will render in Software when:

    1. Machine video driver date is old (before 11/2004)
    2. WPF detected a "Tier 0" graphic card.
      This means that no graphics hardware acceleration is supported and DirectX version level is less than version 7.0.
    3. The rendered Window's size exceeds the max video card texture size.
      One common scenario for this to happen if you have a WPF window spanning across multiple monitors.
    4. You run your application over Remote Desktop Protocol (e.g. Remote Desktop, Terminal Server, Remote Assistant, etc)
      Until NET 3.5 SP1 and earlier, remoting between Vista to Vista with DWM on, leveraged a custom WPF primitive remoting protocol. In all other scenarios content was remoted as bitmaps. Starting with the release of NET 3.5 SP1 (including NET 4), WPF renders the application content using a software rasterizer on the server and then remotes the content as bitmaps in all cases. Read more here.
    5. Rendering in Virtual Machine.
      WPF will try and render in HW but on some VMs the graphic emulator that comes with the VM is not working correctly. User will have to switch to software to fix the problem. 
    6. The Application is calling the force Software API. E.g.
      RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly;       // Force Software rendering per Process – New in NET4
      hwndTarget.RenderMode = RenderMode.SoftwareOnly;        // Force Software rendering per Window– Introduced in Net 3.5 SP1
    7. You set the global registry key. E.g.:
      (HKEY_CURRENT_USER\Software\Microsoft\Avalon.Graphics] 
      "DisableHWAcceleration"=dword:00000000 )
      Note: Since this reg key impacts all WPF application consider using this key for testing purposes only.
    8. Application uses legacy style bitmap effects.
      Note: these are obsolete in NET4.
    9. Application printed content.
    10. Rasterized content that uses RenderTargetBitmap
    11. Tiled content that uses TileBrush
    12. Use of too many light objects in your 3D scene. Read more here.
    13. Layered windows (only on XP SP2/W2k3 or before that do not have Hotfix installed.
      See: http://support.microsoft.com/kb/937106/en-us.
    14. Graphics hardware failures, such as "Out Of Video Memory" (OOVM).
      WPF try to free up video memory and stay in HW rendering but it may not always work and WPF will fall to Software  


    Which tools can I use to detect if my app renders in Software?
    The easiest way is to use Perforator which is included with the WPF Performance Profiling Tools and check below check boxes.
    Read more here.

    Option

    Description

    Draw software rendering with purple tint

    Draws all areas rendered by using the software rendering pipeline with a purple tint. This includes software render targets, software 3D content, and per-primitive software fallback.

    Draw software rendered bitmap effects with red tint

    Draws legacy software rendered bitmap effects with red tint.


    How can I detect if my app renders in Software in code?

    Check the RenderingCapability.Tier . You can also listen on the Tier change event.

  • WPF Performance and .NET Framework Client Profile

    Memory Leak Hotfixes for WPF 3.5 SP1

    • 3 Comments

    Hopefully folks saw my related blog post Finding Memory Leaks in WPF-based applications .
    In this post below I wanted folks to be aware that we released few other KB Articles (Hotfix) that address other various memory leaks reported in .NET 3.5 SP1. Some of these fixes made it to .NET 4.

    1. KB981107 (See: http://support.microsoft.com/kb/981107)

    This Hotfix fixes the following memory leaks in .NET 3.5 SP1 WPF-based applications.
    Issue 1:
    This affects an app that contains styles or templates that refer to application resources (via StaticResource or DynamicResource), and that creates a large number of elements that use these styles or templates but never need the actual value of the resource.  In this situation, the app can leak DeferredAppResourceReference objects, even after the elements themselves have been reclaimed.  (In addition, the app can leak WeakReferences and array space, similar to the issues described below.)

    An example:  App resources define   <sys:Double x:Key="{x:Static SystemParameters.HorizontalScrollBarHeightKey}">20</sys:Double>     This creates a resource that's used by any control that can display a horizontal scrollbar.  Creating a large number of such controls that never actually display their scrollbar will encounter the leak.

    Issue 2:
    This affects an app that creates a large number of short-lived elements with properties that are data-bound to a DependencyProperty of longer-lived elements. In this situation, the longer-lived elements maintain lists of WeakReference objects, used to notify the short-lived elements about property changes. The app can leak WeakReference objects and the array space to hold them, even after the short-lived elements have been reclaimed.

    An example:   ListBoxItem binds its HorizontalContentAlignment property to a similar property on its governing ListBox.   An app that creates a large number of ListBoxItems (say by doing a large number of additions and deletions to the ListBox's ItemsSource) will encounter the leak.

    Issue 3:
    This issue affects classes derived from TreeView or Selector (including ListBox, ListView, Menu, DataGrid, and many others).   These classes register for an internal notification from the KeyboardNavigation class, used for controlling keyboard focus.   An app that creates a large number of these elements can leak WeakReference objects and the array space to hold them, even after the elements themselves have been reclaimed.
    An example:  An app that creates a large number of short-lived ListBoxes will encounter the leak.  This can happen in a nested scenario, where an outer ListBox displays a collection that undergoes a large number of additions and deletions, and where each item is displayed using an inner ListBox.

    These fixes are not included in NET4. We are considering this Hotfix also for NET4, but this decision has not been made, so stay tune.

    2. KB967634: (See: http://support.microsoft.com/kb/967634 )

    This fixes a memory leaks in .NET 3.5 SP1 WPF-based applications when using software 3D rendering involving a VisualBrush or DrawingBrush.
    This fix is already included in .NET 4.

    3. KB967328 (See: http://support.microsoft.com/Default.aspx?kbid=967328)

    This Hotfix fixes memory leaks when a deferred resource isn't inflated due to the resource reference expression hooking up to the Inflated event on the resource dictionary entry.
    If the resource dictionary is an application or theme dictionary, then these are essentially global and can cause these expressions to stay alive.
    There are some discussions on this issue here.
    This fix is already included in .NET 4.

  • WPF Performance and .NET Framework Client Profile

    WPF “Airspace” when using WEB Browser control

    • 0 Comments

    As you may know, when you interoperate WPF with other technologies you can't overlay WPF and WinForms/Win32 content because of the "airspace" limitations (read more here).
    Any given pixel in a window is either owned by WPF or WinForms/Win32, not both. On the other hand, you can overlay all the WPF content you want because WPF manages and renders all of them.

    Many folks however are looking to overlay WPF content over Web content. Chris Cavanagh posted sometimes ago a blog that explain how you can do so using Google's web control.
    Sources for a sample are available on Codeplex. You would need to license the wrapper called Awesomium.

  • WPF Performance and .NET Framework Client Profile

    WPF Visualizer in Visual Studio 2010

    • 4 Comments

    Not sure if folks are aware, but Visual Studio 2010 now includes WPF Visualizer. This can really help you during debugging.
    It basically allows you to explore and visualize the Visual Tree and properties of a WPF object during a debug sessions. Similar to what Mole was doing, but this is now built-in to Visual Studio 2010.

    To use:
    During debug, in a DataTip, Watch window, Autos window, or Locals window, next to a WPF object name, click the arrow adjacent to the magnifying glass icon.
    See images below for the SDK example I used:

    image

    image

  • WPF Performance and .NET Framework Client Profile

    Snoop for WPF 4

    • 5 Comments

     Not sure if folks aware that Snoop for WPF 4.0 has been available for a while.
    You can download it from
    here.

    This version includes other impressive list of improvements that you can read about here.
    Thanks to Corry Plotts and others (Dan Hanan, Mark Kharitonov, etc) who improved on Pete Blois’ original Snoop.

  • WPF Performance and .NET Framework Client Profile

    WPFPerf Performance Profiling Tools for WPF 4 is now available!

    • 17 Comments

    The WPFPerf tool comprises of a suite of performance profiling tools that allow you to analyze the run-time behavior of your WPF application and point to potential performance bottlenecks.
    We finally release the version that also supports .NET Framework 4 (WPF 4).

    This version of the tool (WPFPerf 4) will allow you to profile both WPF 3.5 SP1 and WPF 4 based applications.
    The WPFPerf 4 tool is included with the Windows SDK for Windows 7 and .NET Framework 4 (Windows SDK 7.1). So you are welcome to download and send us your feedback.

    By the way, the tool itself will run on machines with only .NET 3.5 SP1 or only .NET 4, if both are present it will use .NET 3.5 SP1.
    Also, I am not sure how many people had a chance to look at the documentation that is installed with the tool , but we think it is very useful so don't forget to check it out.

    Update (6/14/2010):
    We heard that few folks complain that the Visual Profiler cannot correctly attach to the WPF application in the new WPFPerf for WPF 4.
    After some research we think this has to do with a bug in our DateTime initialization which cause anyone in a time zone > GMT to not get any data in VisualProfiler (for a few hours at least).
    Until we post a fix, a temporary workaround is to set your time zone > GMT (e.g.to Eastern or Pacific Standard Time Zones) when you first attach VisualProfiler.

    Please try this workaround and let us know.

    Update (8/24/2010):
    A patch to that fixes the bug in Visual Profiler for certain time zones is now available.
    See here.

  • WPF Performance and .NET Framework Client Profile

    WPF 3.5 SP1 Performance on Tablet & Touch-enabled machines – Part II

    • 0 Comments

    Hopefully folks saw my first “WPF 3.5 SP1 Performance on Tablet & Touch-enabled machines” blog.

    In that blog I have mentioned that depending on the WPF application and scenario you may see significant performance issues and general sluggishness on Tablet & Touch-enabled machines and even on none-touch machines when UI Automation client apps are running (such as UI Spy, Narrator, Magnifier, etc).

    This was especially noticeable during scrolling if the application comprise of many visual elements.

    As I mentioned we have already fixed this issue in .NET 4.

    I am now happy to announce that we just posted a Hotfix for .NET 3.5 SP1 that you can download from MSDN Code Galley site here and the Connect site here.

    Enjoy. Jossef.

  • WPF Performance and .NET Framework Client Profile

    What’s new in .NET Framework 4 Client Profile RTM

    • 9 Comments

    In .NET Framework 4 we have introduced a streamlined subset and more compact version of the .NET Framework called the Microsoft .NET Framework 4 Client Profile (aka NET4 Client Profile). The Microsoft .NET Framework 4 which is the Full Framework (aka NET4 Full) still exists and it is a superset of the Client Profile.
    Hopefully folks have seen Soma’s blog announcing the availability of Visual Studio 2010 , .NET Framework 4 and .NET Framework 4 Client Profile.
    I have discussed some of the beta features of Microsoft .NET Framework 4 Client Profile in details in my previous Beta 1 blog and Beta 2 blog posts.  In this post I wanted to highlight some of the key changes from our previous Beta 2 public release and reiterate some of the important features

    What are the reasons for a Client Profile?
    Although the NET4 Client Profile is smaller and faster to install compared to the NET4 Full Framework (NET4 is 7-8MB smaller in size than the Full Framework), the main reasons are not just better deployment size/time but also:

    • Reduce the Framework deployment failures.
    • By keeping ASP.Net and other components (that are mostly needed for servers) out of the Client Profile, we can reduce the attack surface and the number of future servicing events which may be caused by server component (such as ASP.Net) and are not needed for desktop scenarios.
    • Making NET4 Client Profile available on Windows Update will make sure that most desktop machines will include NET4 Client Profile over time and apps that target the Client Profile will not need to carry or install the Framework which will improve the overall deployment experience.
    • Enable us to add features and grow the size of overall Framework in future versions but still have a smaller core.

    When to use NET4 Client Profile and when to use NET4 Full Framework?
    NET4 Client Profile:
    Always target NET4 Client Profile for all your client desktop applications (including Windows Forms and WPF apps).

    NET4 Full framework:
    Target NET4 Full only if the features or assemblies that your app need are not included in the Client Profile. This includes:

    • If you are building Server apps. Such as:
      • ASP.Net apps
      • Server-side ASMX based web services
    • If you use legacy client scenarios. Such as:
      • Use System.Data.OracleClient.dll which is deprecated in NET4 and not included in the Client Profile.
      • Use legacy Windows Workflow Foundation 3.0 or 3.5 (WF3.0 , WF3.5)
    • If you targeting developer scenarios and need tool such as MSBuild or need access to design assemblies such as System.Design.dll

    How big is Client Profile?
    Below are the redistributable download size improvements since NET 3.5 SP1. As you can see we have made significant improvements.
    Note that if you are downloading from the Web, the actual download size could be smaller since some components may already be on your machine (for example, Software Rasterizer (rgb9rast) , etc )

     

    3.5 SP1

    4.0 RTM

    32 bit Client Profile

    Online: 28 MB
    Offline: 255MB

    28.8 MB

    32 + 64 bit Client Profile

    N/A

    41 MB

    32 bit Full

    N/A

    35.3 MB

    32 + 64 bit Full

    N/A

    48.1 MB

    32 + ia64 bit Full

    N/A

    51.7 MB

    32 + 64 + ia64 bit Full

    231 MB

    N/A

    image

    What is new in NET4 Client Profile RTM vs. Beta 2 ?

    • File moves: We moved few files between Client Profile to Extended (Full). Most notably: 
      Move System.ComponentModel.DataAnnotations.dll from the full framework to Client Profile
      Some additional file moves below.
    • Removed Windows Imaging Components (WIC) from NET4 setup package (Full & Client).
      Since WIC is already included in XP SP3, Vista, Windows 7, and installed with .NET 3.5 SP1 it made sense to remove it and decrease setup size for almost all users that do not need it.
      Folks that need this component (mainly XP SP2/SP1 and Windows 2003 users that do not have NET 3.5 SP1 installed) can install it from here:
      32 bit: http://www.microsoft.com/downloads/details.aspx?FamilyId=8E011506-6307-445B-B950-215DEF45DDD8&displaylang=en
      64-bit: http://www.microsoft.com/downloads/details.aspx?familyid=F64654AC-6E26-41D9-A90A-0E7783B864EE&displaylang=en
      Note that if WIC is missing, NET4 setup will fail.
      We expect that very few machines will require WIC. Some apps that chain-install the NET4 framework may need to either block on WIC or chain-install WIC.
    • Black assemblies:
      These are assemblies that although included in the NET4 Client Profile runtime they are not meant to be used by NET4 Client Profile applications.
      These assemblies are not included in the Reference Assemblies folder and they are not accessible/visible by Visual Studio 2010.
      NET4 currently includes only one such assembly:
      • ISymWrapper
    • Grey APIs:
      These are APIs/namespaces that although included in the NET4 Client Profile runtime they are not supported and not meant to be used by NET4 Client Profile applications. The main reason these assemblies are not supported in the Net4 Client Profile is that they have dependencies on assemblies from NET4 Full so your Client Profile app may crash if you do use them on machines that only have Client Profile installed.
      In RTM, these APIs/namespaces are “grayed out” from the Reference Assemblies and are not accessible/visible in Visual Studio 2010.
      Note that if your app is targeting the NET4 Full you will be able to access these APIs/namespaces.
      In System.Web.Services, the following namespaces are “greyed out” for NET4 Client Profile:
      • System.Web.Services.WebService
      • System.Web.Services.Description.BasicProfileViolation
      • System.Web.Services.Description.BasicProfileViolationCollection
      • System.Web.Services.Description.BasicProfileViolationEnumerator
      • System.Web.Services.Description.ProtocolImporter
      • System.Web.Services.Description.ProtocolReflector
      • System.Web.Services.Description.ServiceDescriptionImporter
      • System.Web.Services.Description.ServiceDescriptionReflector
      • System.Web.Services.Description.SoapExtensionImporter
      • System.Web.Services.Description.SoapExtensionReflector
      • System.Web.Services.Description.SoapProtocolImporter
      • System.Web.Services.Description.SoapTransportImporter
      • System.Web.Services.Description.WebServicesInteroperability
      • System.Web.Services.Discovery.ContractSearchPattern
      • System.Web.Services.Discovery.DiscoveryDocumentLinksPattern
      • System.Web.Services.Discovery.DiscoveryDocumentSearchPattern
      • System.Web.Services.Discovery.DiscoveryRequestHandler
      • System.Web.Services.Discovery.DiscoverySearchPattern
      • System.Web.Services.Discovery.DynamicDiscoveryDocument
      • System.Web.Services.Discovery.ExcludePathInfo
      • System.Web.Services.Discovery.XmlSchemaSearchPattern
      • System.Web.Services.Protocols.HtmlFormParameterReader
      • System.Web.Services.Protocols.MimeParameterReader
      • System.Web.Services.Protocols.ServerProtocol
      • System.Web.Services.Protocols.ServerProtocolFactory
      • System.Web.Services.Protocols.ServerType
      • System.Web.Services.Protocols.SoapServerMessage
      • System.Web.Services.Protocols.SoapServerMethod
      • System.Web.Services.Protocols.SoapServerProtocol
      • System.Web.Services.Protocols.SoapServerProtocolFactory
      • System.Web.Services.Protocols.SoapServerType
      • System.Web.Services.Protocols.UrlParameterReader
      • System.Web.Services.Protocols.ValueCollectionParameterReader
      • System.Web.Services.Protocols.WebServiceHandlerFactory

    What is new in Visual Studio 2010 for NET4 Client Profile

    Since Beta 2 we made some small but important improvements to the he VS 2010 RTM UI:
    (You can read about the changes we in Beta2 in my Beta 2 blog )
      A) Starting with VS 2010 RTM, the “Add Reference” indicates the target framework that assemblies are filtered against.
      B) The VS 2010 RTM toolbox now clearly indicates if 3rd party controls are not available for the selected profile.
    image

    How to use Client Profile in Visual Studio 2010

    Visual Studio 2008 introduced multi-targeting to allow application to target 2.0 and 3.x versions of the .NET Framework. VS 2010 has improved multi-targeting and starting in VS 2010 Beta2 many of the Client projects are targeting the NET4 Client Profile by default. I also discussed this in my Beta 2 blog .

    Projects that target NET4 Client Profile by default

    These projects starting with VS 20101 Beta2 target the NET4 Client Profile by default:
    Windows Project (C# and VB)
    - WPF Application
    - WPF Browser Application
    - WPF Custom Control Library
    - WPF User Control Library
    - Windows Forms Application
    - Windows Forms Control Library
    - Console Application
    - Empty Project
    - Window Service

    Visual F#
    - F# Application
    - F# Tutorial

    Workflow (C# & VB)
    - Activity Designer Library
    - Activity Library
    - Workflow Console Application

    WCF (C# & VB)
    -
    WCF  Service Library

    Office 2007 & 2010 templates (C# & VB)
    -
    All Projects

    All other projects, including Class Library, target the Full Framework by default.
    Mixed-target scenarios using Class Library may present interesting challenges. Read more below.

    How to retarget your C#/VB.Net project

    To change targeting of your project, open the project properties, select the "Application" page, and change the “Target framework” drop-down.
    C# project example:

    image
    VB project example (Project Properties > Compile tab > “Advanced Compile Options…”):

    image

    Note that if you right-click the project and select “Add References”, the dialog shows only the .NET Framework assemblies that are part of the selected profile. This is accomplished by using reference assemblies (metadata-only versions of assemblies). The .NET Framework 4 Client Profile Reference Assemblies are located in:
         %programfiles%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client

    At compile time, the reference assemblies are matched up against the known "Client List" assemblies that are included in the Client Profile. If a project targeting the Client Profile has a reference to a .NET assembly that is not included in the "Client List", Visual Studio displays compile-time errors in the Error List.

    How to change targeting for other projects

    Some other VS 2010 projects such as Managed C++ (C++/CLI) still target the Full Framework by default. VS 2010 unfortunately does not provide UI to change the targeting.
    Fortunately, you can still edit the project file manually in order to change the profile targeting. To do so:
    a) Right click “Unload Project”
    b) Right-Click “Edit <project_name>”
    c) Set the appropriate project property to target Client Profile. e.g.

    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    <TargetFrameworkProfile>Client</TargetFrameworkProfile>

    d) Right click “Reload Project”

    In addition, for these projects, notice that VS does not create an <app.config> file for your project.
    Note: If your project does not add references or access assemblies that are included in the Full Framework but are not part of the Client Profile, there is nothing to worry about. Your app will run on machines with either NET4 Client Profile or Full Framework just fine.
    Otherwise, if you do access assemblies from the Full Framework, you should add <app.config> to indicate to CLR not to load your app if it is launched on the NET4 Client Profile.
    E.g. add this:

    <?xml version="1.0"?>
    <configuration>
       
    <startup>
              <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
      
    </startup>
    </configuration>

    If you don’t do so, your app may crash at random when it needs to load the assemblies that are missing from the Client Profile.

    Deployment

    The project Publish property page allows you to select the prerequisite needed for your ClickOnce deployment. VS 2010 automatically selects the correct profile (Client Profile or Full) depending on your primary project target.
    image 

    Setup and Deployment Projects

    The same prerequisite dialog from above appears when you create “Setup and Deployment” project (under “Add New Project”/“Other Project Types”). The NET4 Client Profile prerequisite entry is checked by default in this case.


     
    If you create a new “Visual Studio Installer” setup project (under “Setup and Deployment“) and add the output of your NET4 Client Profile to it (Right-Click ->“Add”-> “Project Output…”’ select “Primary output”) , VS2010 adds a new “Launch Condition”. (Right-click on your new Setup project and then do “View->Launch Conditions”)

    By default VS2010 will add NET4 Client Profile as a launch condition.

    What this means is that once all prerequisites are installed and before the main installation launches, setup checks whether all the launch conditions are met. If not, setup blocks and displays an error message.

    clip_image010
    image

    Testing NET4 Client Profile applications
    VS 2010 itself requires the NET 4 Full in order to run and it therefore install NET 4 Full.
    If your target NET4 Client Profile, it is highly recommended that you test your application on a separate machine that only includes NET4 Client Profile.

    Common Questions & Issues with NET4 Client Profile
    1.  How can I select the .NET Profile in the “New Project” dialog?
    When you create new project in VS 2010, the “New Project” dialog does not indicate if the new project you are about to create is targeting Client Profile or Full. You can always go to the project Properties (see above) and change the target if you like.

    2.  I cannot find an assembly in “Add Reference” dialog
    The “Add Reference” .NET tab dialog only shows the .NET Framework assemblies that are part of the selected profile. So some assemblies, such as System.Web.dll are not included in NET4 Client Profile and will only show if you target the Full framework. If you must use System.Web.dll you need to retarget to the Full framework.
    Starting with VS 2010 RTM, the “Add Reference” indicates the target framework that assemblies are filtered against.clip_image014
    3.  My project cannot compile when I reference a Class Library
    You may encounter mixed-target scenarios: for example, when your Client Profile app adds a reference to a Class Library that is targeting the Full Framework (which it targets by default). You should be able to successfully build such solutions, as long as the Class Library does not use references to assemblies that only exist in the Full Framework. If it does, you may get warning/errors that are not completely clear.

    For example you may see an error in your Client Profile app saying:
    The type or namespace name 'ClassLibrary1' could not be found (are you missing a using directive or an assembly reference?)”

    This error is not clear because the class library exists and can be compiled when it is compiled by itself. However, when MSBuild tries to resolve the transitive closure of the Client Profile project, it cannot find the Full Framework assembly that is referenced by the Class Library. In this case it is better to look at the generated warnings which are more informative:
    The referenced assembly " …<your assembly>.." could not be resolved because it has a dependency on ""…<some assembly only available in Full Framework>…” which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.”

    4.  My controls or 3rd party controls is now showing in the VS 2010 toolbox
    Some VS 2008 3rd party Winforms controls will not work with VS 2010 NET4 Client Profile projects.
    The reason is that some of these controls have do not have separate design-time and run-time components and have dependencies on assemblies that are in the Full Framework (for example dependency on System.Windows.Forms.Design.dll which is Full).
    In VS 2010 RTM we made some changes to make it easier for developers to realize that.

    Per the image below you can see that the VS 2008 DevExpress Winforms control are not showing in VS 2010 Toolbox and instead you see the message “Controls in this category are unavailable for the .NET Framework 4 Client Profile. To change this setting, open the Project Properties windows.
    The Xceed VS 2008 controls on the other hand do have separate design-time and run-time components and works fine in VS 2008 and VS 2010.
    The good news is that many of the control vendors plan to release update to their control soon after VS 2010 RTM. Until such updates are available you need to retarget your project to NET4 Full if you must use these controls.

    image 
    5.  What should I do if a component that I need is not in NET4 Client Profile?
    Your first option is to try to find a workaround by modifying your code to use a component that is included in NET4 Client Profile. If this is not possible retarget your project to NET4 Full. As mentioned before, this is not ideal as most desktops are ikely to only have NET4 Client Profile so your app would need to chain-install NET4 full or block your app setup on NET4 full being present.

    6.  I want to write a custom WinForms control, what do I need to do for it to work with NET4 Client Profile?
    When developing Windows Forms control libraries, it is necessary to separate the runtime code from the control designers in order to target the new Client Profile. If the assembly references classes that exist in the Full framework but not in the Client Profile, the project will not compile successfully. Custom control designers usually inherit from the System.Windows.Forms.Design.ControlDesigner class in System.Design.dll, which is not included in .Net Framework 4 Client Profile.

    We posted a guide that can walk you through the steps of creating a Windows Forms control that can be used in the .NET Framework 4 Client Profile. See: http://code.msdn.microsoft.com/WinFormsCustomCtrl
    Note that WPF custom controls do not inherit from classes in System.Design.dll and do not have this issue.

    7. What’s the deal with <app.config> file ?
    If you change the project to target the Full Framework, VS will add a configuration file (<app.config>) that declares the application as a "full" application.
    image

    This enables the CLR loader to block any NET4 apps that target full on machines that only have the Client Profile. In this case, the CLR prompts the user to install NET4 full. E.g. you may see this dialog:

    image 
    Note that in NET4 Beta1 and NET3.5 SP1 Client Profile if the <app.config> was missing the CLR the assumption was that you targeted the Full Framework. This is now reversed.
    In other words, if your NET4 app is missing <app.config> , by default the CLR assume that your app is targeting NET4 Client Profile! so, your app may crash at random when it needs to load the assemblies that

    What components are new in NET4 Client Profile RTM?

    This has not significantly changed since Beta2, so read my Beta 2 blog. We did make some tweaks however in RTM (and RC), most notably:

    • Developers who need to use System.Web.HttpUtility in their client apps and had to reference System.Web.dll and therefore target NET4 full (System.Web.dll is in Full) , can now target the NET4 Client Profile by using the new System.Net.WebUtility class which is in System.dll (System.dll is in NET4 Client Profile).
      System.Net.WebUtility includes HtmlEncode and HtmlDecode. Url encoding can be accomplished using the System.Uri class (also in System.dll).
    • Files moved from Client to Extended (Full):
        - csc.rsp and vbc.rsp
    • Files moved from Extended (Full) to Client:
        - System.ComponentModel.DataAnnotations.dll
        - Microsoft.CSharp.Resources.dll and System.Dynamic.Resources.dll
        - InstallUtil.exe, Installutil.exe.config and InstallUtillib.dll

    Enhancements in NET4 Client Profile vs. NET 3.5 SP1 Client Profile
    This has not changed since Beta2, so read my Beta 2 blog .

    What’s in and what’s not included in the Client Profile?
    Other than the APIs that were “Grey” out in RTM (and RC) and the tweaks mentioned above, we did not make other significantly changes since Beta2, so read my Beta 2 blog.

    Where can I get the NET4 Client Profile?
    You can get .NET Framework 4 from here:

    • dotNetFx40_Client_x86_x64.exe (41 MB): This is the Client Profile SKU that you must install on any supported 64-bit OS. This will also install on any supported 32-bit OS. Your app could run in WOW64 if it was compiled w/ "32-bit" flag or as 64-bit if you compile with "AnyCPU" or "64-bit" flags.
      If you are redistributing the Client Profile with your application you most likely want to redist this package as it can install on both 32 and 64 bit OS’s.
    • dotNetFx40_Client_x86.exe (28.8 MB): This is the Client Profile SKU that you could use to install on any supported 32-bit OS.  Choose this only if all your users are running 32 bit OS. (in most times this will not be your case…)
    • dotNetFx40_Full_x86_x64.exe (48.1 MB): This is the Full Framework SKU that you must install on any supported 64-bit OS. This will also install on any supported 32-bit OS.
      If you are redistributing the Full Framework with your application you most likely want to redist this package as it can install on both 32 and 64 bit OS’s.
    • dotNetFx40_Full_x86.exe (35.3 MB): This is the Full Framework SKU that you could use to install on any supported 32-bit OS. Choose this only if all your users are running 32 bit OS (in most times this will not be your case…)
    • NET 4 RTM Web Bootstrapper: This is what you want to install if you need NET4 Full and you are online. This will detect your OS and processor architecture and will install the appropriate Framework.
    • NET 4 Client Profile RTM Web Bootstrapper: This is what you want to install if you need NET4 Client Profile and you are online. This will detect your OS and processor architecture and will install the appropriate Client Profile.

    Related Blogs and Resources

    Appendix A:

    Here are the files that exist in the NET4 Client Profile and NET4 Full framework.

    FileName

    Client Profile

    or Extended

    Description

    _DataPerfCounters.h

    Client

    Perf counters

    _DataPerfCounters.ini

    Client

    Perf counters

    _dataperfcounters_shared12_neutral.h

    Client

    Perf counters

    _dataperfcounters_shared12_neutral.ini

    Client

    Perf counters

    _NetworkingPerfCounters.h

    Client

    Perf counters

    _Networkingperfcounters.ini

    Client

    Perf counters

    _NetworkingPerfCounters_v2.h

    Client

    Perf counters

    _NetworkingPerfCounters_v2.ini

    Client

    Perf counters

    _ServiceModelEndpointPerfCounters.h

    Client

    Perf counters

    _ServiceModelEndpointPerfCounters.ini

    Client

    Perf counters

    _ServiceModelOperationPerfCounters.h

    Client

    Perf counters

    _ServiceModelOperationPerfCounters.ini

    Client

    Perf counters

    _ServiceModelServicePerfCounters.h

    Client

    Perf counters

    _ServiceModelServicePerfCounters.ini

    Client

    Perf counters

    _SMSvcHostPerfCounters.h

    Client

    Perf counters

    _SMSvcHostPerfCounters.ini

    Client

    Perf counters

    _TransactionBridgePerfCounters.h

    Client

    Perf counters

    _TransactionBridgePerfCounters.ini

    Client

    Perf counters

    Accessibility.dll

    Client

    AddInProcess.exe

    Client

    AddInProcess.exe.config

    Client

    AddInProcess32.exe

    Client

    AddInProcess32.exe.config

    Client

    AddInUtil.exe

    Client

    AddInUtil.exe.config

    Client

    AdoNetDiag.dll

    Client

    adonetdiag.mof

    Client

    adonetdiag.mof.uninstall

    Client

    alink.dll

    Client

    alinkui.dll

    Client

    AppLaunch.exe

    Client

    applaunch.exe.config

    Client

    AssemblyList_4_client.xml

    Client

    CasPol.exe

    Client

    caspol.exe.config

    Client

    clr.dll

    Client

    CLR.mof

    Client

    CLR.mof.uninstall

    Client

    clrjit.dll

    Client

    CORPerfMonExt.dll

    Client

    CORPerfMonSymbols.h

    Client

    corperfmonsymbols.ini

    Client

    csc.exe

    Client

    csc.exe.config

    Client

    cscui.dll

    Client

    Culture.dll

    Client

    CustomMarshalers.dll

    Client

    cvtres.exe

    Client

    cvtres.exe.config

    Client

    CvtResUI.dll

    Client

    default.win32manifest

    Client

    dfdll.dll

    Client

    dfsvc.exe

    Client

    dfsvc.exe.config

    Client

    diasymreader.dll

    Client

    DropSqlWorkflowInstanceStoreLogic.sql

    Client

    DropSqlWorkflowInstanceStoreSchema.sql

    Client

    dw20.exe

    Client

    EventLogMessages.dll

    Client

    fusion.dll

    Client

    GlobalMonospace.CompositeFont

    Client

    WPF Composite fonts

    GlobalSansSerif.CompositeFont

    Client

    WPF Composite fonts

    GlobalSerif.CompositeFont

    Client

    WPF Composite fonts

    GlobalUserInterface.CompositeFont

    Client

    WPF Composite fonts

    InstallUtil.exe

    Client

    Moved to Client in RTM

    installutil.exe.config

    Client

    Moved to Client in RTM

    InstallUtilLib.dll

    Client

    Moved to Client in RTM

    ISymWrapper.dll

    Client

    jsc.exe

    Client

    jsc.exe.config

    Client

    locale.nlp

    Client

    machine.config

    Client

    machine.config.comments

    Client

    machine.config.default

    Client

    Microsoft.CSharp.dll

    Client

    Microsoft.JScript.dll

    Client

    Microsoft.JScript.tlb

    Client

    Microsoft.Transactions.Bridge.dll

    Client

    Microsoft.Transactions.Bridge.Dtc.dll

    Client

    Microsoft.VisualBasic.Activities.Compiler.dll

    Client

    Microsoft.VisualBasic.Activities.CompilerUI.dll

    Client

    Microsoft.VisualBasic.Compatibility.Data.dll

    Client

    Microsoft.VisualBasic.Compatibility.dll

    Client

    Microsoft.VisualBasic.dll

    Client

    Microsoft.VisualC.Dll

    Client

    Microsoft.Windows.ApplicationServer.Applications.dll

    Client

    Microsoft.Windows.ApplicationServer.Applications.dll.mui

    Client

    Microsoft.Windows.ApplicationServer.Applications.man

    Client

    mscordacwks.dll

    Client

    mscordbi.dll

    Client

    mscoree.tlb

    Client

    mscoreei.dll

    Client

    mscoreeis.dll

    Client

    mscorlib.dll

    Client

    mscorlib.tlb

    Client

    mscorpe.dll

    Client

    mscorpehost.dll

    Client

    mscorrc.dll

    Client

    mscorsecimpl.dll

    Client

    mscorsecr.dll

    Client

    mscorsvc.dll

    Client

    mscorsvw.exe

    Client

    msvcr100_clr0400.dll

    Client

    NaturalLanguage6.dll

    Client

    NETFXRepair.1025.dll

    Client

    Resource files for .NET OS upgrade repair.

    NETFXRepair.1028.dll

    Client

    NETFXRepair.1029.dll

    Client

    NETFXRepair.1030.dll

    Client

    NETFXRepair.1031.dll

    Client

    NETFXRepair.1032.dll

    Client

    NETFXRepair.1033.dll

    Client

    NETFXRepair.1035.dll

    Client

    NETFXRepair.1036.dll

    Client

    NETFXRepair.1037.dll

    Client

    NETFXRepair.1038.dll

    Client

    NETFXRepair.1040.dll

    Client

    NETFXRepair.1041.dll

    Client

    NETFXRepair.1042.dll

    Client

    NETFXRepair.1043.dll

    Client

    NETFXRepair.1044.dll

    Client

    NETFXRepair.1045.dll

    Client

    NETFXRepair.1046.dll

    Client

    NETFXRepair.1049.dll

    Client

    NETFXRepair.1053.dll

    Client

    NETFXRepair.1055.dll

    Client

    NETFXRepair.2052.dll

    Client

    NETFXRepair.2070.dll

    Client

    NETFXRepair.3076.dll

    Client

    NETFXRepair.3082.dll

    Client

    NETFXRepair.exe

    Client

    ngen.exe

    Client

    NlsData0009.dll

    Client

    NlsLexicons0009.dll

    Client

    nlssorting.dll

    Client

    normalization.dll

    Client

    normidna.nlp

    Client

    normnfc.nlp

    Client

    normnfd.nlp

    Client

    normnfkc.nlp

    Client

    normnfkd.nlp

    Client

    PenIMC.dll

    Client

    PerfCounter.dll

    Client

    PresentationCore.dll

    Client

    PresentationFramework.Aero.dll

    Client

    PresentationFramework.Classic.dll

    Client

    PresentationFramework.dll

    Client

    PresentationFramework.Luna.dll

    Client

    PresentationFramework.Royale.dll

    Client

    PresentationHost_v0400.dll

    Client

    PresentationHost_v0400.dll.mui

    Client

    PresentationNative_v0400.dll

    Client

    PresentationUI.dll

    Client

    ReachFramework.dll

    Client

    RegAsm.exe

    Client

    regasm.exe.config

    Client

    RegSvcs.exe

    Client

    regsvcs.exe.config

    Client

    regtlibv12.exe

    Client

    SbsNclPerf.dll

    Client

    ServiceModel.mof

    Client

    ServiceModel.mof.uninstall

    Client

    ServiceModel35.mof

    Client

    ServiceModel35.mof.uninstall

    Client

    ServiceModelEvents.dll

    Client

    ServiceModelEvents.dll.mui

    Client

    ServiceModelInstallRC.dll

    Client

    ServiceModelInstallRC.dll.mui

    Client

    ServiceModelPerformanceCounters.dll

    Client

    ServiceModelPerformanceCounters.dll.mui

    Client

    ServiceModelPerformanceCounters.man

    Client

    ServiceModelReg.exe

    Client

    ServiceModelRegUI.dll

    Client

    ServiceModelRegUI.dll.mui

    Client

    SetupUtility.exe

    Client

    SMDiagnostics.dll

    Client

    SMSvcHost.exe

    Client

    SMSvcHost.exe.config

    Client

    sortdefault.nlp

    Client

    SOS.dll

    Client

    SqlWorkflowInstanceStoreLogic.sql

    Client

    SqlWorkflowInstanceStoreSchema.sql

    Client

    sysglobl.dll

    Client

    System.Activities.Core.Presentation.dll

    Client

    System.Activities.dll

    Client

    System.Activities.DurableInstancing.dll

    Client

    System.Activities.Presentation.dll

    Client

    System.AddIn.Contract.dll

    Client

    System.AddIn.dll

    Client

    System.ComponentModel.Composition.dll

    Client

    System.ComponentModel.DataAnnotations.dll

    Client

    Moved to Client in RC

    System.configuration.dll

    Client

    System.Configuration.Install.dll

    Client

    System.Core.dll

    Client

    System.Data.DataSetExtensions.dll

    Client

    System.Data.dll

    Client

    System.Data.Entity.dll

    Client

    System.Data.Linq.dll

    Client

    System.Data.Services.Client.dll

    Client

    System.Data.SqlXml.dll

    Client

    System.Deployment.dll

    Client

    System.Device.dll

    Client

    System.DirectoryServices.AccountManagement.dll

    Client

    System.DirectoryServices.dll

    Client

    System.DirectoryServices.Protocols.dll

    Client

    System.dll

    Client

    System.Drawing.dll

    Client

    System.Drawing.tlb

    Client

    System.Dynamic.dll

    Client

    System.EnterpriseServices.dll

    Client

    System.EnterpriseServices.Thunk.dll

    Client

    System.EnterpriseServices.tlb

    Client

    System.EnterpriseServices.Wrapper.dll

    Client

    System.IdentityModel.dll

    Client

    System.IdentityModel.Selectors.dll

    Client

    System.IO.Log.dll

    Client

    System.Management.dll

    Client

    System.Management.Instrumentation.dll

    Client

    System.Messaging.dll

    Client

    System.Net.dll

    Client

    System.Numerics.dll

    Client

    System.Printing.dll

    Client

    System.Runtime.DurableInstancing.dll

    Client

    System.Runtime.Remoting.dll

    Client

    System.Runtime.Serialization.dll

    Client

    System.Runtime.Serialization.Formatters.Soap.dll

    Client

    System.Security.dll

    Client

    System.ServiceModel.Activities.dll

    Client

    System.ServiceModel.Channels.dll

    Client

    System.ServiceModel.Discovery.dll

    Client

    System.ServiceModel.dll

    Client

    System.ServiceModel.Routing.dll

    Client

    System.ServiceProcess.dll

    Client

    System.Speech.dll

    Client

    System.tlb

    Client

    System.Transactions.dll

    Client

    System.Web.ApplicationServices.dll

    Client

    System.Web.Services.dll

    Client

    System.Windows.Forms.DataVisualization.dll

    Client

    System.Windows.Forms.dll

    Client

    System.Windows.Forms.tlb

    Client

    System.Windows.Input.Manipulations.dll

    Client

    System.Windows.Presentation.dll

    Client

    System.Xaml.dll

    Client

    System.XML.dll

    Client

    System.Xml.Linq.dll

    Client

    UIAutomationClient.dll

    Client

    UIAutomationClientsideProviders.dll

    Client

    UIAutomationProvider.dll

    Client

    UIAutomationTypes.dll

    Client

    vbc.exe

    Client

    vbc.exe.config

    Client

    vbc7ui.dll

    Client

    WindowsBase.dll

    Client

    WindowsFormsIntegration.dll

    Client

    WMINet_Utils.dll

    Client

    wpffontcache_v0400.exe

    Client

    wpffontcache_v0400.exe.mui

    Client

    wpfgfx_v0400.dll

    Client

    wpftxt_v0400.dll

    Client

    XPThemes.manifest

    Client

    _DataOracleClientPerfCounters_shared12_neutral.h

    Extended

    _DataOracleClientPerfCounters_shared12_neutral.ini

    Extended

    addUser.aspx

    Extended

    addUser.aspx.resx

    Extended

    alert_lrg.gif

    Extended

    AppConfigCommon.resx

    Extended

    AppConfigHome.aspx

    Extended

    AppConfigHome.aspx.resx

    Extended

    ApplicationConfigurationPage.cs

    Extended

    AppSetting.ascx

    Extended

    AppSetting.ascx.resx

    Extended

    ASPdotNET_logo.jpg

    Extended

    Aspnet.config

    Extended

    aspnet.mof

    Extended

    aspnet.mof.uninstall

    Extended

    aspnet_compiler.exe

    Extended

    aspnet_counters.dll

    Extended

    aspnet_filter.dll

    Extended

    aspnet_isapi.dll

    Extended

    Aspnet_perf.dll

    Extended

    aspnet_perf.h

    Extended

    aspnet_perf.ini

    Extended

    aspnet_perf2.ini

    Extended

    aspnet_rc.dll

    Extended

    aspnet_regbrowsers.exe

    Extended

    aspnet_regiis.exe

    Extended

    aspnet_regsql.exe

    Extended

    aspnet_state.exe

    Extended

    aspnet_state_perf.h

    Extended

    aspnet_state_perf.ini

    Extended

    aspnet_wp.exe

    Extended

    AspNetMMCExt.dll

    Extended

    aspx_file.gif

    Extended

    AssemblyList_4_extended.xml

    Extended

    blackberry.browser

    Extended

    branding_Full2.gif

    Extended

    chooseProviderManagement.aspx

    Extended

    chooseProviderManagement.aspx.resx

    Extended

    chrome.browser

    Extended

    CLR-ETW.man

    Extended

    clretwrc.dll

    Extended

    ComSvcConfig.exe

    Extended

    confirmation.ascx

    Extended

    confirmation.ascx.resx

    Extended

    CreateAppSetting.aspx

    Extended

    CreateAppSetting.aspx.resx

    Extended

    createPermission.aspx

    Extended

    createPermission.aspx.resx

    Extended

    csc.rsp

    Extended

     

    darkBlue_GRAD.jpg

    Extended

     

    DataSvcUtil.exe

    Extended

     

    DataSvcUtil.exe.config

    Extended

     

    DebugAndTrace.aspx

    Extended

     

    DebugAndTrace.aspx.resx

    Extended

     

    default.aspx

    Extended

     

    default.aspx.resx

    Extended

     

    Default.browser

    Extended

     

    DefaultWsdlHelpGenerator.aspx

    Extended

     

    DefineErrorPage.aspx

    Extended

     

    DefineErrorPage.aspx.resx

    Extended

     

    deselectedTab_1x1.gif

    Extended

     

    DropSqlPersistenceProviderLogic.sql

    Extended

     

    DropSqlPersistenceProviderSchema.sql

    Extended

     

    dv_aspnetmmc.chm

    Extended

     

    EditAppSetting.aspx

    Extended

     

    EditAppSetting.aspx.resx

    Extended

     

    editUser.aspx

    Extended

     

    editUser.aspx.resx

    Extended

     

    EdmGen.exe

    Extended

     

    error.aspx

    Extended

     

    error.aspx.resx

    Extended

     

    FileTracker.dll

    Extended

     

    FileTrackerUI.dll

    Extended

     

    findUsers.aspx

    Extended

     

    findUsers.aspx.resx

    Extended

     

    firefox.browser

    Extended

     

    folder.gif

    Extended

     

    gateway.browser

    Extended

     

    generic.browser

    Extended

     

    GlobalResources.resx

    Extended

     

    gradient_onBlue.gif

    Extended

     

    gradient_onWhite.gif

    Extended

     

    GroupedProviders.xml

    Extended

     

    headerGRADIENT_Tall.gif

    Extended

     

    help.jpg

    Extended

     

    HelpIcon_solid.gif

    Extended

     

    home0.aspx

    Extended

     

    home0.aspx.resx

    Extended

     

    home1.aspx

    Extended

     

    home1.aspx.resx

    Extended

     

    home2.aspx

    Extended

     

    home2.aspx.resx

    Extended

     

    ie.browser

    Extended

     

    iemobile.browser

    Extended

     

    ilasm.exe

    Extended

     

    ilasm.exe.config

    Extended

     

    image1.gif

    Extended

     

    image2.gif

    Extended

     

    InstallCommon.sql

    Extended

     

    InstallMembership.sql

    Extended

     

    InstallPersistSqlState.sql

    Extended

     

    InstallPersonalization.sql

    Extended

     

    InstallProfile.SQL

    Extended

     

    InstallRoles.sql

    Extended

     

    InstallSqlState.sql

    Extended

     

    InstallSqlStateTemplate.sql

    Extended

     

    InstallWebEventSqlProvider.sql

    Extended

     

    iPhone.browser

    Extended

     

    legacy.web_hightrust.config

    Extended

     

    legacy.web_hightrust.config.default

    Extended

     

    legacy.web_lowtrust.config

    Extended

     

    legacy.web_lowtrust.config.default

    Extended

     

    legacy.web_mediumtrust.config

    Extended

     

    legacy.web_mediumtrust.config.default

    Extended

     

    legacy.web_minimaltrust.config

    Extended

     

    legacy.web_minimaltrust.config.default

    Extended

     

    manageAllRoles.aspx

    Extended

     

    manageAllRoles.aspx.resx

    Extended

     

    ManageAppSettings.aspx

    Extended

     

    ManageAppSettings.aspx.resx

    Extended

     

    ManageConsolidatedProviders.aspx

    Extended

     

    manageconsolidatedProviders.aspx.resx

    Extended

     

    managePermissions.aspx

    Extended

     

    managePermissions.aspx.resx

    Extended

     

    ManageProviders.aspx

    Extended

     

    manageProviders.aspx.resx

    Extended

     

    manageSingleRole.aspx

    Extended

     

    manageSingleRole.aspx.resx

    Extended

     

    manageUsers.aspx

    Extended

     

    manageUsers.aspx.resx

    Extended

     

    Microsoft.Build.Commontypes.xsd

    Extended

     

    Microsoft.Build.Conversion.v4.0.dll

    Extended

     

    Microsoft.Build.Core.xsd

    Extended

     

    Microsoft.Build.dll

    Extended

     

    Microsoft.Build.Engine.dll

    Extended

     

    Microsoft.Build.Framework.dll

    Extended

     

    Microsoft.Build.Tasks.v4.0.dll

    Extended

     

    Microsoft.Build.Utilities.v4.0.dll

    Extended

     

    Microsoft.Build.xsd

    Extended

     

    Microsoft.Common.OverrideTasks

    Extended

     

    Microsoft.Common.targets

    Extended

     

    Microsoft.Common.Tasks

    Extended

     

    Microsoft.CSharp.targets

    Extended

     

    Microsoft.Data.Entity.Build.Tasks.dll

    Extended

     

    Microsoft.Data.Entity.targets

    Extended

     

    Microsoft.NetFramework.props

    Extended

     

    Microsoft.NetFramework.targets

    Extended

     

    Microsoft.VisualBasic.targets

    Extended

     

    Microsoft.VisualC.STLCLR.dll

    Extended

     

    Microsoft.WinFx.targets

    Extended

     

    Microsoft.Workflow.Compiler.exe

    Extended

     

    Microsoft.Workflow.Compiler.exe.config

    Extended

     

    Microsoft.Xaml.targets

    Extended

     

    MmcAspExt.dll

    Extended

     

    MSBuild.exe

    Extended

     

    msbuild.exe.config

    Extended

     

    MSBuild.rsp

    Extended

     

    mscorsn.dll

    Extended

     

    navigationBar.ascx

    Extended

     

    navigationBar.ascx.resx

    Extended

     

    NavigationBar.cs

    Extended

     

    NetFx40_IIS_schema_update.xml

    Extended

     

    netmemorycache.h

    Extended

     

    netmemorycache.ini

    Extended

     

    opera.browser

    Extended

     

    PasswordValueTextBox.cs

    Extended

     

    PerfCounters.h

    Extended

     

    PerfCounters.ini

    Extended

     

    peverify.dll

    Extended

     

    PresentationBuildTasks.dll

    Extended

     

    ProviderList.ascx

    Extended

     

    providerList.ascx.resx

    Extended

     

    ProvidersPage.cs

    Extended

     

    requiredBang.gif

    Extended

     

    safari.browser

    Extended

     

    security.aspx

    Extended

     

    security.aspx.resx

    Extended

     

    security_watermark.jpg

    Extended

     

    security0.aspx

    Extended

     

    security0.aspx.resx

    Extended

     

    SecurityPage.cs

    Extended

     

    selectedTab_1x1.gif

    Extended

     

    selectedTab_leftCorner.gif

    Extended

     

    selectedTab_rightCorner.gif

    Extended

     

    ServiceMonikerSupport.dll

    Extended

     

    setUpAuthentication.aspx

    Extended

     

    setUpAuthentication.aspx.resx

    Extended

     

    SharedReg12.dll

    Extended

     

    SmtpSettings.aspx

    Extended

     

    SmtpSettings.aspx.resx

    Extended

     

    SqlPersistenceProviderLogic.sql

    Extended

     

    SqlPersistenceProviderSchema.sql

    Extended

     

    SqlPersistenceService_Logic.sql

    Extended

     

    SqlPersistenceService_Schema.sql

    Extended

     

    System.Data.Entity.Design.dll

    Extended

     

    System.Data.OracleClient.dll

    Extended

     

    System.Data.Services.Design.dll

    Extended

     

    System.Data.Services.dll

    Extended

     

    System.Design.dll

    Extended

     

    System.Drawing.Design.dll

    Extended

     

    System.Runtime.Caching.dll

    Extended

     

    System.ServiceModel.Activation.dll

    Extended

     

    System.ServiceModel.ServiceMoniker40.dll

    Extended

     

    System.ServiceModel.WasHosting.dll

    Extended

     

    System.ServiceModel.Web.dll

    Extended

     

    System.Web.Abstractions.dll

    Extended

     

    System.Web.DataVisualization.Design.dll

    Extended

     

    System.Web.DataVisualization.dll

    Extended

     

    System.Web.dll

    Extended

     

    System.Web.DynamicData.Design.dll

    Extended

     

    System.Web.DynamicData.dll

    Extended

     

    System.Web.Entity.Design.dll

    Extended

     

    System.Web.Entity.dll

    Extended

     

    System.Web.Extensions.Design.dll

    Extended

     

    System.Web.Extensions.dll

    Extended

     

    System.Web.Mobile.dll

    Extended

     

    System.Web.RegularExpressions.dll

    Extended

     

    System.Web.Routing.dll

    Extended

     

    System.Web.tlb

    Extended

     

    System.Windows.Forms.DataVisualization.Design.dll

    Extended

     

    System.Workflow.Activities.dll

    Extended

     

    System.Workflow.ComponentModel.dll

    Extended

     

    System.Workflow.Runtime.dll

    Extended

     

    System.WorkflowServices.dll

    Extended

     

    System.Xaml.Hosting.dll

    Extended

     

    TLBREF.DLL

    Extended

     

    topGradRepeat.jpg

    Extended

     

    Tracking_Logic.sql

    Extended

     

    Tracking_Schema.sql

    Extended

     

    UninstallCommon.sql

    Extended

     

    UninstallMembership.sql

    Extended

     

    UninstallPersistSqlState.sql

    Extended

     

    UninstallPersonalization.sql

    Extended

     

    UnInstallProfile.SQL

    Extended

     

    UninstallRoles.sql

    Extended

     

    UninstallSqlState.sql

    Extended

     

    UninstallSqlStateTemplate.sql

    Extended

     

    UninstallWebEventSqlProvider.sql

    Extended

     

    unSelectedTab_leftCorner.gif

    Extended

     

    unSelectedTab_rightCorner.gif

    Extended

     

    vbc.rsp

    Extended

     

    web.config

    Extended

     

    web.config.comments

    Extended

     

    web.config.default

    Extended

     

    web_hightrust.config

    Extended

     

    web_hightrust.config.default

    Extended

     

    web_lowtrust.config

    Extended

     

    web_lowtrust.config.default

    Extended

     

    web_mediumtrust.config

    Extended

     

    web_mediumtrust.config.default

    Extended

     

    web_minimaltrust.config

    Extended

     

    web_minimaltrust.config.default

    Extended

     

    webAdmin.master

    Extended

     

    webAdminButtonRow.master

    Extended

     

    WebAdminHelp.aspx

    Extended

     

    WebAdminHelp.aspx.resx

    Extended

     

    WebAdminHelp_Application.aspx

    Extended

     

    WebAdminHelp_Application.aspx.resx

    Extended

     

    WebAdminHelp_Internals.aspx

    Extended

     

    WebAdminHelp_Internals.aspx.resx

    Extended

     

    WebAdminHelp_Provider.aspx

    Extended

     

    WebAdminHelp_Provider.aspx.resx

    Extended

     

    WebAdminHelp_Security.aspx

    Extended

     

    WebAdminHelp_Security.aspx.resx

    Extended

     

    webAdminNoButtonRow.master

    Extended

     

    webAdminNoNavBar.master

    Extended

     

    WebAdminPage.cs

    Extended

     

    WebAdminStyles.css

    Extended

     

    WebAdminWithConfirmation.master

    Extended

     

    WebAdminWithConfirmationNoButtonRow.master

    Extended

     

    webengine.dll

    Extended

     

    webengine4.dll

    Extended

     

    wizard.aspx

    Extended

     

    wizard.aspx.resx

    Extended

     

    wizardAddUser.ascx

    Extended

     

    wizardAddUser.ascx.resx

    Extended

     

    wizardAuthentication.ascx

    Extended

     

    wizardAuthentication.ascx.resx

    Extended

     

    wizardCreateRoles.ascx

    Extended

     

    wizardCreateRoles.ascx.resx

    Extended

     

    wizardFinish.ascx

    Extended

     

    wizardFinish.ascx.resx

    Extended

     

    wizardInit.ascx

    Extended

     

    wizardInit.ascx.resx

    Extended

     

    WizardPage.cs

    Extended

     

    wizardPermission.ascx

    Extended

     

    wizardPermission.ascx.resx

    Extended

     

    wizardProviderInfo.ascx

    Extended

     

    wizardProviderInfo.ascx.resx

    Extended

     

    Workflow.Targets

    Extended

     

    Workflow.VisualBasic.Targets

    Extended

     

    wpf-etw.man

    Extended

     

    WsatConfig.exe

    Extended

     

    XamlBuildTask.dll

    Extended

     

    yellowCORNER.gif

    Extended

     

  • WPF Performance and .NET Framework Client Profile

    What’s New for Performance in WPF in .NET 4

    • 2 Comments

    Today (4/12/2010) we are excited to make the final .NET Framework 4 RTM build available. It can be downloaded from here and the .NET Framework 4 Client Profile is available from here
    You can also check out Soma’s blog officially announcing Visual Studio 2010 which built on top of WPF 4. 
    In previous related blogs I discussed the performance improvements we implemented in WPF in .NET 3.5 SP1 and .NET 3.5/3.0 SP1 (see here, and here).
    There are many improvements and new features in the WPF 4 release that we are really excited about (read more about those here and here) , but in this post I mainly wanted to focus and provide more details on the specific performance improvements we implemented in WPF 4.

    Graphics Improvements

    1. New “Cached Composition” API to significantly improve rendering perf of complex visual trees
    This API provides apps the ability to cache a live UIElement and its sub-tree as a bitmap, and then render the UIElement as quickly as a bitmap (not requiring full rerasterization) when there are no structural changes to the cached subtree.

    Transforms, opacities, etc applied above the cached UIElement do not force the cache to be regenerated. The UIElement remains fully interactive while cached, and fully mouse-interactive.

    Motivation:
    Despite hardware acceleration, WPF’s rendering performance throughput is often limited by all the per-primitive work that must be done when rendering complex scenarios. Without this caching, simply animating an otherwise static element across the screen forces that element to be repeatedly be completely re-tessellated and re-rasterized which can be expensive operations. This often leaves WPF’s rendering pipeline bottlenecked in CPU-bound per-primitive setup cost.

    The API enables breaking that bottleneck and allows primitives to be rendered as fast as the video card can draw a quad, moving the bottleneck from CPU primitive setup to GPU fill-rate, which is usually dramatically faster.

    In doing this, there can be some loss of visual quality for the sake of performance. Many scenarios would gladly make this tradeoff. Scenarios that could benefit from this API:

    • Scaling and Rotation of live controls, this includes not only images, but potentially complex controls with text.
    • he ability to create a smooth scroll experience that scrolls cached images (tiled or otherwise) of live content that doesn’t have to be re-rendered every frame.
    • Fast scaling and translation of Vector content (e.g. Powerpoint content)

    See UIElement.CacheMode and BitmapCacheBrush for more details.
    Example:
    Setting CacheMode through C#:

    UIElement.CacheMode= new BitmapCache();

    Setting CacheMode though XAML:

    <Rectangle CacheMode="BitmapCache" />
    <Rectangle>
    <Rectangle.CacheMode>
    <BitmapCache EnableClearType="true" RenderAtScale="4"/>
    </Rectangle.CacheMode>
    </Rectangle>

    2. New API to allow WPF apps to force SW rendering per process
    In NET 3.5 SP1 we added new API to allow developers to force software rendering per application window instead of using the GPU (see my Performance improvements in WPF in .Net 3.5 / 3.0 SP1 blog), in NET 4 you can now do so for the entire process.

    As reported (see here), depending on the machine configuration and the application, software-based rendering is sometimes faster than hardware.
    This could improve rendering performance for certain scenarios and machines configuration, in most cases Hardware rendering should perform better. Please use carefully and verify with your app and machine configuration.
    In certain cases apps may want to use Software rendering for reliability reasons, for example on machines (typically older) that do not have reliable drivers.
    This APIs should provide developers a much better alternative than setting the global ‘Disable HW Acceleration’ registry key (see here)

    VS 2010 for example is using this feature to force VS 2010 into Software rendering on VMs thus improving reliability. VS 2010 is doing so since some VMs graphic emulation drivers found VS 2010 is doing so since some VMs graphic emulation drivers found not to be reliable. Here is an example for how to use this API:

    public partial class App : Application 
    {
    protected override void OnStartup(StartupEventArgs e)
    {
    if (WeThinkWeShouldRenderInSoftware())
    RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly;
    }
    }

    Notes:
    I) The precedence order for software rendering is:

    1. DisableHWAcceleration reg key
    2. RenderOptions.ProcessRenderMode (per process)
    3. HwndTarget.RenderMode (per-target / window)

    II) The app force Software rendering at any time, however there is no way to force Hardware rendering back on once it was set to SoftwareOnly.

    3. Added new VisualScrollableAreaClip API
    This allows line-scroll scenarios (e.g: line scroll in editor) to update less area and therefore be significantly more efficient over Remote Desktop (RDP) and Terminal Services scenarios.

    The VS 2010 editor which is WOPF-based for example is taking advantage of this api.

    (You can read more about Optimizing WPF for Remote Desktop here)

    4. The default RenderOptions.BitmapScalingMode default is now changed Linear instead of Fant.
    This should provide some perf improvement if you scale images. but will produces lower quality output so be aware of this. If you still want Fant, you can re-enable it.

    4. Minor 3D performance improvements.
    We reduced the amount of DrawPrimitive() calls for large indexed meshes and slightly improved CPU usage for large Model3D counts.

    5. The BitmapEffect classes are now no-ops.
    BitmapEffect used to render in Software and caused perf issues. BitmapEffect are still there so your apps will compile but BitmapEffect will not do anything.

    6. Some minor changes to Graphics Rendering Tier classification
    Pixel Shader 2.0 is now required for hardware acceleration.
    If your card was Tier 1 but did not have PS 2.0 it is now considered Tier 0 causing your app to render in Software.

    UI Automation Improvements

    1. Significantly improved UI Automation (UIA) performance.
    Two major improvements went into this effort:

    A) Added UI Automation virtualization support.

    This allows WPF apps that target NET4 and have virtualized elements (such as ListView, Tree View, etc ) to benefits from significantly improved performance on tablets and touch-enabled machines as well as none-Tablet machines that have Accessibility clients running (for example: Screen Reader or even have external input device like a pen or Wacom tablet)

    To use UIA virtualization WPF 4 is taking advantage the Windows Automation API 3.0 (aka "UI Automation API 3.0" or “UIA 3.0”). UIA 3.0 is included by default on Windows 7 & Windows 2008 Server R2.
    The gotcha is that the Windows Automation API 3.0 are not included on other down-level OS's (such as XP/Vista) and must be installed separately in order to get the full Perf benefits.
    See more in this blog.

    B) Optimized event handling

    We addressed UI Automation issues mentioned in this blog

    In .NET 3.5 SP1 or earlier, performance problems (such as CPU consumption and generally sluggishness) were especially noticeable when scrolling within an application that contained many visual elements and if UIA client applications were running.  In some cases WPF had to traverse every element in the application tree to check if it need to fire automation event. Depending on machine speed and how many elements are in an application’s visual tree this had significant performance impact.

    This was typical on Tablet and other touch-enabled machines because the Accessibility client TabTip.exe (the "Tablet PC Input Panel") is running by default.

    It was also possible on non-tablet machines since any machine can run UI Automation client app (for example, UI Spy, Narrator, Magnifier, etc) or had devices connected that also use UI Automation (for example, Wacom touch & pen input type device)

    In WPF 4 we fixed these performance issues.

    Text Improvements

    1. WPF4 now use DirectWrite for much improved text clarity
    This is not really perf per-se but it worth mentioning here.
    You can read more in Additional WPF Text Clarity Improvements and Direct2D and DirectWrite posts.

    2. Improve text speed 
    WPF4 English text is somewhat faster (~10%) compare to WPF 3.5 SP1

    XAML Improvements

    • WPF designer template parsing is now about 2x faster
    • Performance of loading loose XAML significantly improved.

    General Improvements

    • We now use a cached copy of DispatcherSynchronizationContext instead of creating a new one each time. We found this to provide ~15% gain in Editor Scroll scenarios
    • Fixed various memory leaks in WPF 4.
      We plan to update Finding Memory Leaks in WPF-based applications blog soon, so stay tune.

    Setup & Client Profile improvements

    1. Much improved NET4 Full & Client Profile size and deployment performance.
    See graph comparing NETFX sizes:
    image

    2. NET4 Client Profile is now “first class citizen”
    Unlike NET 3.5 SP1 Client Profile, NET4 Client Profile:

    • Supported on all OS that Full is
    • Support for x86 & x64
    • Client Profile is *the* framework that will be available on Windows Update for desktops
    • Supported in all aspect of VS (e.g. targeting, deployment project, etc)
    • Is the default target in almost all VS10 Client Project Templates (Winforms, WPF, VSTO, etc)

    Read more about NET4 Client Profile in this blog.

  • WPF Performance and .NET Framework Client Profile

    Optimizing Visual Studio 2010 and WPF applications for Remote Desktop

    • 7 Comments

    It is increasingly common for users to run their client application remotely, either connected to another Windows Client machine (Remote Desktop) or to a Windows Server (Terminal Service). In both of these scenarios the sources and the target machines are communicating over a protocol called Remote Desktop Protocol (or RDP).

    In this blog, I wanted to share some of our findings while testing Visual Studio 2010 (VS 2010) over RDP as well as provide best practices to improve VS 2010 and your WPF-base app performance over RDP.

    You may have seen the announcements (Soma , Jason Zander, Scott Guthris's) for the public release of Visual Studio 2010 RC . Some of the principles mentioned in this blog are also implemented by VS 2010.

    While this blog is focusing on Microsoft remoting technologies some of the ideas discussed here should be applicable to other non-Microsoft technologies.

    This blog is few pages long, the first part is a summary for folks who just want the short version. More details follow below in the document.

    Summary: Best Practices for Improving VS 2010 and WPF Performance with Remote Desktop

    A) Tune your Remote Desktop Connection (RDC) settings.

    In slow bandwidth connections (such as slow DSL) or in high latency scenarios (such as connecting from US coast-to-coast) below tips can provide huge perf improvement. We for example measured ~4x gain in some scenarios.

    1. On Windows7, change settings to use 16-bit color in the RDC Options Display tab and check your performance.
      This could significantly reduce number of bytes sent across the RDP wire.
      (Windows XP/Vista already use 16-bit color by default)
    2. On Windows7, change settings to use "WAN" or "Satellite" for hi-latency connections in the RDC Options Experience tab. For example, consider doing so when connecting from coast-to-coast scenarios (e.g. 150+ms round-trip delay), regardless of the bandwidth. (You can determine your latency by doing "ping <your_server>" from a command line). This helps RDC decide how to do its optimization and improve perf.
      (Windows XP/Vista do not have these settings by default)
    3. On Windows XP/Vista install "Remote Desktop Connection 7.0 client update" and repeat steps from above.
    4. Disable all check boxes (e.g. Font Smoothing, Visual Styles, etc) other than "Persistence bitmap caching" in the RDC Experience tab.
      This also helps reduce number of bytes sent across the RDP wire.
    5. Select lower window size for your Remote Desktop window in the RDC Options Display tab. This also results in reduced number of bytes sent across the RDP wire.

    Note that by doing above you are improving responsiveness but sacrificing some visual "prettiness" . Here is a summary of what we discussed above:

    Connecting From: 

    Win7/R2 

    Vista SP+ 

    XP SP3 

    XP SP2 

    Default RDC version installed:  

    RDC 7.0

    RDC 6.1

    RDC 6.1

    RDC 5.2

    For VS10 & WPF in slow network consider: (e.g. slow DSL, or coast-to-coast connection)

    1.Use 16-bit color.
    2.
    Use "WAN"/"Satellite" in high-latency cases.
    3.
    User lower window size

    Install RDC 7.0. Repeat the Win7 suggestions  

    Install RDC 7.0. Repeat the Win7 suggestions. 

    Upgrade to XP3. Repeat XP SP3 suggestions.

    B) Optimize your WPF app to be Remote Desktop aware. 
         Detect when you are running in Remote Desktop session and make sure to:
         1. Reduce amount of your app UI updates while running over RDP, by:

      • Turn off all animations during Remote Desktop session
      • Verify you do not have any hidden animations running
      • For animations that you must keep, use the DesiredFrameRate property to decrease frame-rate.
      • Modify control templates to remove animations that are built-in the default style.
      • Reduce redrawing in operations that are too fast for user to notice anyway. (e.g. during fast file scroll, do not update "line #' every line change , instead consider update every 200 msec)

         2. Simplify content that is redrawn frequently so that the RDC compressor can be more efficient.
         (E.g. use solid colors over gradients or images.)
        3.
    Avoid operations that are slow to render in software. (e.g. BitmapEffects & 3D)
        4.
    Use the new VisualScrollableAreaClip NET4 API if your scenarios include line-scrolling.

    C) During development, test your app to verify it is optimized for RDP

      1. Use WpfPerf Perforator tool to detect regions of your WPF app that are un-intentionally being invalidated.
      2. Use Network Emulation tool to emulate slow connection and verify your apps still perform.
      3. Use network monitoring tools to track regression by watching the amount of data you app sends over the wire as new features are added to your app. Consider adding test automation for RDP scenarios.

    History and background

    WPF Remoting architectures changes 

    Until .NET Framework 3.5 SP1 (NET 3.5 SP1) and earlier, remoting between Vista to Vista with DWM on, leveraged a custom WPF primitive remoting protocol. In all other scenarios content was remoted as bitmaps.
    Starting with the release of NET 3.5 SP1 (including NET 4), WPF renders the application content using a software rasterizer on the server and then remotes the content as bitmaps in all cases.
    Note:

    Bitmaps are highly compressed by the underlying RDC stack and only regions that changed are being updated. Also note that WPF does not currently have efficient occlusion support, so for instance animations that are completely hidden behind other opaque WPF elements will still force invalidation and RDP update.

    When apps use GDI (such as many Win32 and Winforms apps do), only the GDI primitives are remoted. In many cases this can be more efficient than remoting WPF apps since WPF apps remotes bitmaps which typically result in more content being sent over the wire than a similar GDI-based app. The additional data may result in slower performance depending on network bandwidth and the size and frequency of updates.
    However, in most scenarios, on reasonably fast connections, this is not an issue and in some scenarios (e.g. complex 3D scenes) remoting bitmaps can even present an advantage.
    Noticeable performance issues can appear in low bandwidth situations and when there is significant amount of data that must be remoted. For example, fast scrolling text file, playing video, or lots of animations.

    Window 7 & Windows Server 2008 R2 changes

    Windows Server 2008 R2 and Windows 7 operating systems includes a much improved Remote Desktop, called RDP 7.0. Read more in the RDP white-paper.

    In addition to these improvements, the Windows 7 "Remote Desktop Connection" (RDC) client has few other changes. The interesting ones, which can have big impact on WPF performance and that we will discuss in more details later are:

      • 32-bit Color Depth is the new default. (Vista/XP for example, has 16-bit color as the default)
      • User can select "High Latency" as one of the options in the Experience Tab

      image image

      It turns out that using 32-bit Color Depth, can improve many scenarios, however not all scenarios will improve.

      The charts (taken from the RDP white-paper) show that PowerPoint scenarios would produce better RDP performance using RDP 7.0 with 32bpp Color Depth over RDP 7.0/6.1 16bpp. However, you are better off using 16bpp if you care more about better scrolling in Word/IE8.

      Visual Studio 2010 over RDP is one of the scenarios that will benefit from switching to 16-bit color on slow connections.

      image 

      It is important to note that in Remote Desktop scenario, even though the Client can specify that it wants to use 32-bit color, the Server can override this and set a maximum color depth.

      By default, Windows 2008 Server/Windows 2008 R2 set the limit to 16-bpp color (On W2k8R2 see: "Start->Administrative Tools->Remote Desktop Services"->Remote Desktop Session Host COnfiguration". Right Click on the connection name listed).  
      image

      Tuning RDP for optimal Visual Studio 2010 usage

      As you may already know, many (but not all) UI components of VS 2010 are built using WPF 4.0 for the very first time. This implies that over RDP, VS 2010 remotes bitmaps for the portions of the UI that are built using WPF and remote GDI primitives for the non-WPF UI. The Editor is one of the VS 2010 UI features which are WPF-based.

      During VS 2010 development, we worked really hard to optimize the Editor performance especially during continuous Scroll. By optimizing the Editor for the local scenario, we also improved the RDP scenario. Some of these principles we used are listed below.

      We used a network emulator tool to simulate a slow network and measured amount of data transmitted on the wire during Editor scrolling. We also solicited feedback from users on the other side of the world who remoted to VS 2010 on machines in Redmond and compared the experience to Visual Studio 2008 side-by-side.

      Some of our key findings were:
      Over fast network with little latency:

      • VS 2010 RDP performance approximately matches the performance of VS 2010 on a local machine with average GPU performance.

      • VS 2010 RDP performance almost matches VS 2008 RDP performance

      Over slow network with high latency (we simulated 512 kbps, 75 msec delay each way to imitate a typical coast-to-coast connection):

      • VS 2010 RDP performance significantly slower than VS08 if the default 32-bit color and the "LAN (10Mbps or higher)" are kept on Windows7-to-Windows7 connection.

      • VS 2010 RDP performance is only slightly slower than VS08 when we changed to 16-bit color and selected "WAN (10Mbps or higher with high latency)" or "Satellite (2Mbps or higher with high latency)".

      The chart and table below show we can improve VS 2010 scrolling perf by ~74% (from 82 sec to 22 sec) on a slow network just by picking the right RDC settings!

      image 

      Page Scroll Scenario

      RDP6/Vista 16bpp LAN Settings

      Win7 16bpp - LAN settings

      Win7 32bpp - LAN settings

      Win7 16bpp - WAN settings

      Win7 32bpp - WAN settings

      Win7 16bpp - SAT settings

      Win7 32bpp - SAT settings

      VS 2010

      28sec

      28

      82

      22

      75

      22

      65

      We saw similar results in other VS 2010 scenarios, such as using menus, Intelisense, etc

      In summary, to improve your VS 2010 perf over RDP consider:

      1. In Window 7:
        • If running over slow connection (e.g. slow DSL connection, for example 768kbs or lower), change RDC setting to use 16-bit color. This could significantly reduce number of bytes sent across the RDP wire. (Windows XP/vista already uses 16-bit color by default)

        • If running over high latency connection, for example when connecting from coast–to-coast (e.g. 150+ms round-trip latency), set "WAN (10Mbps or higher with high latency)" or "Satellite (2Mbps or higher with high latency)". Consider doing so as long as you have latency, even if the bandwidth is fast!
          This helps the underlying Remote Desktop client decide how to do its optimizations and improve perf.
          You can determine your latency by doing "ping <your_server>" from a command line. (Windows XP/Vista do not have these settings by default)

      2. In Windows XP/Vista:
        Install, "Remote Desktop Connection 7.0 client update" and repeat steps from above. In addition to providing improve performance, installing RDP 7.0 it also allows you to select "high latency" in the "Remote Desktop Connection" Experience Tab UI which is not available in RDC 6.1/5.2.

      3. Disable all check boxes (e.g. Font Smoothing, Visual Styles, etc) other than "Persistence bitmap caching" in the Experience tab. This also helps reduce number of bytes sent across the RDP wire.

      4. Consider selecting lower size for your Remote Desktop window in the RDC settings. This will send smaller size bitmaps across the wire.

      The above steps should help especially in low-bandwidth scenarios. As always check if performance actually improves after you made these changes. You may need to revert these changes if you use other apps or connect to another target machine with different network characteristics.

      Optimizing your WPF app for RDP

      In addition to selecting the correct RDC settings mentioned earlier, reducing the amount of content that needs to be sent across the wire is the key for better performance.

      Your app for example, can detect that it is running over RDP and reduce the amount of content that needs to be updated and sent as bitmaps over the wire. It can also use graphic elements that can be compressed more efficiently by RDC bitmap compressor (e.g. use solid colors vs. gradients).
      In addition, since WPF renders the content on the server in software, the app should avoid using elements that are slow to render in software.
      Here are some more specific guidelines of what you can do:

      1. Detect if your app is running in Remote Desktop session.
        Listen to WM_WTSSESSION_CHANGE/WTS_REMOTE_CONNECT Windows messages. (See attached sample)
      2. Reduce the amount of UI updates while running over RDP.
        You can even consider doing so only when connection is slow (techniques on how to detect connection bandwidth is not provided here).
        Some of the common concepts are:

        • If possible consider turning off all animations during Remote Desktop session.
          For example:
          Creating a window background to an animating gradient or a video will cause the entire window to redraw every frame and be transmitted over the wire.

        • WPF does not currently ignore occluded parts of your app, so turn off all animations that are hidden behind some other opaque element.

        • For animations that you must keep, use the DesiredFrameRate property to decrease animation frame-rate and reduce traffic.

      3. Simplify control templates to remove all animations.
        Many of the default WPF control templates include animation. Consider modifying those. For example:
        • ProgressBar control has ambient animation.
        • Button, Radio, Checkbox, etc animate when you hover over them
        • ComboBox animated when it drops down , you can re-style it and say 'PopupAnimation="None"'
      4. Help the RDP compressor to compress more efficiently by simplifying other dirty regions of your app that are redrawn frequently. For example:
        Use solid colors over gradients or other fills such as images.
      5. Since WPF renders in software on the target machine, avoid operations that are especially slow to render in software. For example:
        • 3D (3D is significantly slower to render in Software)
        • BitmapEffects such as blur and drop shadow are significantly slow to render in software
      6. Be smart and reduce redrawing in operations that are happing too fast for user to notice anyway.For example if user is fast scrolling thru a file, you can update the "line number" and other outlining every 200ms but not on every line change. Or display thumbnail tooltip while fast scrolling in large data-grid instead of scrolling the entire grid.
      7. If your application scrolls text, take advantage of the new VisualScrollableAreaClip NET4 apis which was specifically designed to improve line-scrolling over RDP.
      8. Use WpfPerf Perforator tool to detect what areas of your app are being invalidated. You may find regions that are not intended to be invalidated.
        Perforator will scroll three colors (gray, yellow, purple) for every region of you app that is changing and requires invalidations. More info here: http://windowsclient.net/wpf/perf/wpf-perf-tool.aspx

        As an example, in the image below I have two ProgressBars one of which is hidden (the one on the left).
        By default ProgressBar has ambient animation and therefore causes additional network traffic on each frame.
        What you may have not expected is for the hidden ProgressBar to animate and causing unnecessary invalidations over RDP (lack of occlusion support mentioned earlier).

        You may have also expected only the two ProgerssBar animating rectangles to get updated. However, under certain conditions WPF will coalesce number of dirty regions into one larger one and this is why you see the larger yellow rectangle in the image below. This effect depends on how far the dirty rectangles are. In some cases this may provide an improvement as instead of multiple bitmaps only one is sent over RDP. Apps have no control over this but should be aware of this characteristic.
        image   
      9. Use Network Emulation tools (e.g. http://static.shunra.com/free-trials.php ) to emulate different network conditions and verify your apps still perform well under low bandwidth/ hi-latency conditions.
      10. Use network tools to track regression in amount of data that is sent over the wire. Consider using wireshark (http://www.wireshark.org/) Network Monitor (http://www.microsoft.com/downloads/details.aspx?FamilyID=983b941d-06cb-4658-b7f6-3088333d062f&displaylang=en ) or other network tools to measure the amount of data your application sends over RDP and make sure it is not 'excessive'.
      11. Consider adding test automation to make sure new features are not causing excessive invalidations and data transfer which can cause RDP performance regression.
        ETW based tools are a good approach for this automation this and I hope to post an example in future blogs.

      How we optimized Visual Studio 2010 for Remote Desktop

      Visual Studio 2010 uses many of the approaches mentioned above.
      VS 2010 has a new "Enable rich client visual experience" checkbox in the Tools/Option menu.
      image 
       

      By default, the "Automatically adjust visual experience based on client performance" option is checked and Visual Studio 2010 will try to choose settings that are optimized for best performance. For example, if Visual Studio 2010 detects that it is running in a Remote Desktop session (as well as for other scenarios such as Virtual Machine environment or on machine w/ low-end graphics where WPF rendering tier return 0 or 1) then some visual effects are turned off.
      Here is a non-exhaustive list of things that happen in that situation:

      • Animations and gradients (such as on the Start page) are turned off.
      • Icons in the status bar are no longer animated.
      • Gradients in the menus, context menus, command bar, tab well, window titles, Intellisense and toolbars become solid color fills.
      • Gradients and stippling in the environment (main window) background, and new project dialog become solid color fills.
      • Highlights when the user hovers over a collapsible region on the editor outlining margin are turned off.
      • Updating of the text editor's vertical scroll bar is performed at a slower rate.
      • The new NET4 VisualScrollableAreaClip WPF API is used to improve line-scrolling in the editor.

      In addition, regardless of whether “Enable rich client visual experience” is turned on or off, during rapid scrolling in the text editor, VS 2010:

      • Postpones selected visual updates (e.g. the outlining margin and underline squiggles) until Idle.
      • Reduces the number of layouts during thumb-tracking in the vertical scrollbar (when the scroll thumb is moved rapidly up or down).

        Resources:

        Below are related useful blogs:

        Attached sample:

        Below (also attached) sample code show how you can listen to the various Remote Desktop events and as discussed earlier you can use these events to trigger your app "RDP" features.
        In my sample, the window background is comprised of animating gradient. The app detects a Remote Desktop session connection and then switches the window background to be a solid color and vice versa. 
        If I keep the animated background, then the entire window is invalidated and would have to be transmitted over the wire on each frame (e.g. 60 frame-per-seconds on most monitors).
        With animation removed and by using a solid color instead no network traffic is needed.
        Here is the network traffic I measured when I was experimenting with my sample:

        App runs for 5 seconds (1280x1024)

        When background animates

        When background uses solid color  

        Amount of RDP traffic over 5 sec:

        11 Mb 

        5 bytes 

        As you can see this would make a huge difference in low-bandwidth scenarios.

        image

        Figure 1- Animated background when run locally

        image

        Figure 2- Solid background when over Remote Desktop

           1: <Window x:Class="Animation_Sample_For_RDP.Window1"
           2:         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           3:         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           4:         Title="Sample RDP-aware WPF application" Height="600" Width="750"
           5:         Loaded="Window_Loaded" Unloaded="Window_Unloaded"   
           6:         xmlns:src="clr-namespace:Animation_Sample_For_RDP" >
           7:  
           8:     <Window.Resources>
           9:         <src:RemoteDesktopClass x:Key="myDataSource" />
          10:     </Window.Resources>
          11:     <Window.Template>
          12:         <ControlTemplate TargetType="{x:Type src:Window1}">
          13:             <Border Name="myBorder">
          14:                 <Border.Background>
          15:                     <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
          16:                         <GradientStop Color="Green" Offset="0"/>
          17:                         <GradientStop Color="LightBlue" Offset="0.2"  x:Name="Foo"/>
          18:                         <GradientStop Color="Blue" Offset="1"/>
          19:                     </LinearGradientBrush>
          20:                 </Border.Background>
          21:                 <StackPanel Margin="20,0,0,0">
          22:                     <StackPanel.DataContext>
          23:                         <Binding Source="{StaticResource myDataSource}"/>
          24:                     </StackPanel.DataContext>
          25:                     <StackPanel Margin="20,0,0,0"  Orientation="Horizontal">
          26:                         <TextBlock Margin="0,15,0,0" FontWeight="Bold">Remote Desktop Session status:</TextBlock>
          27:                         <TextBlock Margin="5,15,0,0" Name="RD_status"  
          28:                               Text="{Binding Path=RemoteDesktopStatus, UpdateSourceTrigger=PropertyChanged}"/>
          29:                     </StackPanel>
          30:                     <StackPanel Margin="20,0,0,0"  Orientation="Horizontal">
          31:                         <TextBlock Margin="0,15,0,0" FontWeight="Bold">In Remote Desktop Session:</TextBlock>
          32:                         <TextBlock Margin="5,15,0,0" 
          33:                               Text="{Binding Path=IsRemoteDesktopSession, UpdateSourceTrigger=PropertyChanged}"/>
          34:                     </StackPanel>
          35:               </StackPanel>
          36:             </Border>
          37:             <ControlTemplate.Triggers>
          38:                 <EventTrigger RoutedEvent="Window.Loaded">
          39:                     <BeginStoryboard>
          40:                         <Storyboard AutoReverse="True" BeginTime="0" >
          41:                             <DoubleAnimation Storyboard.TargetName="Foo"  Storyboard.TargetProperty="Offset"  
          42:                                 AutoReverse="True" From="0.1" To="0.9" Duration="0:0:3" RepeatBehavior="Forever"/>
          43:                         </Storyboard>
          44:                     </BeginStoryboard>
          45:                 </EventTrigger>
          46:                 <!--Set to Solid background when a Remote Session was triggered -->
          47:                 <DataTrigger Binding="{Binding Source={StaticResource myDataSource}, 
          48:                     Path=IsRemoteDesktopSession}" Value="true">
          49:                     <Setter TargetName="myBorder" Property="Border.Background" Value="LightBlue"/>
          50:                 </DataTrigger>
          51:             </ControlTemplate.Triggers>
          52:         </ControlTemplate>
          53:     </Window.Template>
          54: </Window> 
           1: using System;
           2: using System.Collections.Generic;
           3: using System.Linq;
           4: using System.Text;
           5: using System.Windows;
           6: using System.Windows.Controls;
           7: using System.Windows.Data;
           8: using System.Windows.Documents;
           9: using System.Windows.Input;
          10: using System.Windows.Media;
          11: using System.Windows.Media.Imaging;
          12: using System.Windows.Navigation;
          13: using System.Windows.Shapes;
          14: using System.Windows.Interop;
          15: using System.Runtime.InteropServices;
          16: using System.ComponentModel;
          17: using System.Windows.Threading;
          18:  
          19: namespace Animation_Sample_For_RDP
          20: {
          21:     public partial class Window1 : Window
          22:     {
          23:         [DllImport("wtsapi32.dll", SetLastError = true)]
          24:         static extern bool WTSRegisterSessionNotification(IntPtr hWnd, [MarshalAs(UnmanagedType.U4)] int dwFlags);
          25:         [DllImport("wtsapi32.dll", SetLastError = true)]
          26:         static extern bool WTSUnRegisterSessionNotification(IntPtr hWnd);  // constants passed in the dwFlags parameter
          27:         const int NOTIFY_FOR_THIS_SESSION = 0;
          28:         const int NOTIFY_FOR_ALL_SESSIONS = 1;      // message id to look for when processing the message (see sample code)
          29:         const int WM_WTSSESSION_CHANGE = 0x2b1;     // WParam values that can be received:
          30:         const int WTS_CONSOLE_CONNECT = 0x1;        // A session was connected to the console terminal.
          31:         const int WTS_CONSOLE_DISCONNECT = 0x2;     // A session was disconnected from the console terminal.
          32:         const int WTS_REMOTE_CONNECT = 0x3;         // A session was connected to the remote terminal.
          33:         const int WTS_REMOTE_DISCONNECT = 0x4;      // A session was disconnected from the remote terminal.
          34:         const int WTS_SESSION_LOGON = 0x5;          // A user has logged on to the session.
          35:         const int WTS_SESSION_LOGOFF = 0x6;         // A user has logged off the session.
          36:         const int WTS_SESSION_LOCK = 0x7;           // A session has been locked.
          37:         const int WTS_SESSION_UNLOCK = 0x8;         // A session has been unlocked.
          38:         const int WTS_SESSION_REMOTE_CONTROL = 0x9; // A session has changed its remote controlled status.
          39:         public enum SystemMetric
          40:         {
          41:             SM_REMOTESESSION = 0x1000,
          42:             SM_REMOTECONTROL = 0x2001,
          43:         }
          44:         [DllImport("user32.dll")]
          45:         static extern int GetSystemMetrics(SystemMetric smIndex);
          46:         static IntPtr hwnd;
          47:         static Window1 myClass;
          48:         public Window1()
          49:         {
          50:             InitializeComponent();
          51:             myClass = this;
          52:         }
          53:         private void Window_Loaded(object sender, RoutedEventArgs e)
          54:         {
          55:             Window w = Application.Current.MainWindow;
          56:  
          57:             WindowInteropHelper wih = new WindowInteropHelper(this);
          58:             hwnd = wih.Handle;
          59:  
          60:             if (!WTSRegisterSessionNotification(hwnd, NOTIFY_FOR_THIS_SESSION))
          61:                 MessageBox.Show("WTSRegisterSessionNotification failure");
          62:             HwndSource MainWindowHwndSource = PresentationSource.FromVisual(w) as HwndSource;
          63:             if (MainWindowHwndSource != null)
          64:                 MainWindowHwndSource.AddHook(new HwndSourceHook(MainWindowHwndMessageFilter));
          65:             else
          66:                 Console.WriteLine("MainWindowHwndSource == null");
          67:  
          68:             if (GetSystemMetrics(SystemMetric.SM_REMOTECONTROL) != 0)
          69:                 Console.WriteLine("Session is currently remotely controlled.");
          70:             else
          71:                 Console.WriteLine("Session is NOT currently remotely controlled.");
          72:             if (GetSystemMetrics(SystemMetric.SM_REMOTESESSION) != 0)
          73:             {
          74:                 Console.WriteLine("Process is associated with a Terminal Services client session.");
          75:                 SetRemoteSessionStatus("WTS_CONSOLE_CONNECT");
          76:                 SetRemoteSessionState(true);    // we are over Remote Session !
          77:             }
          78:             else
          79:             {
          80:                 Console.WriteLine("Process is NOT associated with a Terminal Services client session.");
          81:                 SetRemoteSessionState(false); // we are connected locally !
          82:             }
          83:         }
          84:         static void SetRemoteSessionStatus(string status)
          85:         {
          86:             myClass.Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() =>
          87:             {
          88:                 RemoteDesktopClass db = myClass.FindResource("myDataSource") as RemoteDesktopClass;
          89:                 db.RemoteDesktopStatus = status;
          90:             }));
          91:         }
          92:         static void SetRemoteSessionState(bool b)
          93:         {
          94:             myClass.Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() =>
          95:             {
          96:                 RemoteDesktopClass db = myClass.FindResource("myDataSource") as RemoteDesktopClass;
          97:                 db.IsRemoteDesktopSession = b;
          98:  
          99:             }));
         100:         }
         101:         static IntPtr MainWindowHwndMessageFilter(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
         102:         {
         103:             switch (msg)
         104:             {
         105:                 case WM_WTSSESSION_CHANGE:
         106:  
         107:                     Console.Write("WM_WTSSESSION_CHANGE ");
         108:                     int param = ((int)wParam);
         109:                     switch (param)
         110:                     {
         111:                         case WTS_CONSOLE_CONNECT:
         112:                             Console.Write("WTS_CONSOLE_CONNECT\n");
         113:                             SetRemoteSessionStatus("WTS_CONSOLE_CONNECT");
         114:                             SetRemoteSessionState(false); // we are connected locally !
         115:                             break;
         116:                         case WTS_CONSOLE_DISCONNECT:
         117:                             Console.Write("WTS_CONSOLE_DISCONNECT\n");
         118:                             SetRemoteSessionStatus("WTS_CONSOLE_DISCONNECT");
         119:                             break;
         120:                         case WTS_REMOTE_CONNECT:
         121:                             Console.Write("WTS_REMOTE_CONNECT\n");
         122:                             SetRemoteSessionStatus("WTS_REMOTE_CONNECT");
         123:                             SetRemoteSessionState(true); // we are over Remote Session !
         124:                             break;
         125:                         case WTS_REMOTE_DISCONNECT:
         126:                             Console.Write("WTS_REMOTE_DISCONNECT\n");
         127:                             SetRemoteSessionStatus("WTS_REMOTE_DISCONNECT");
         128:                             break;
         129:                         case WTS_SESSION_LOGON:
         130:                             Console.Write("WTS_SESSION_LOGON\n");
         131:                             SetRemoteSessionStatus("WTS_SESSION_LOGON");
         132:                             break;
         133:                         case WTS_SESSION_LOGOFF:
         134:                             Console.Write("WTS_SESSION_LOGOFF\n");
         135:                             SetRemoteSessionStatus("WTS_SESSION_LOGOFF");
         136:                             break;
         137:                         case WTS_SESSION_LOCK:
         138:                             Console.Write("WTS_SESSION_LOCK\n");
         139:                             SetRemoteSessionStatus("WTS_SESSION_LOCK");
         140:                             break;
         141:                         case WTS_SESSION_UNLOCK:
         142:                             Console.Write("WTS_SESSION_UNLOCK\n");
         143:                             SetRemoteSessionStatus("WTS_SESSION_UNLOCK");
         144:                             break;
         145:                         case WTS_SESSION_REMOTE_CONTROL:
         146:                             Console.Write("WTS_SESSION_REMOTE_CONTROL\n");
         147:                             SetRemoteSessionStatus("WTS_SESSION_REMOTE_CONTROL");
         148:                             break;
         149:                     }
         150:                     break;
         151:                 default:
         152:                     break;
         153:             }
         154:             return IntPtr.Zero;
         155:         }
         156:         private void Window_Unloaded(object sender, RoutedEventArgs e)
         157:         {
         158:             if (!WTSUnRegisterSessionNotification(hwnd))
         159:                 Console.WriteLine("WTSUnRegisterSessionNotification failure");
         160:         }
         161:     }
         162:     public class RemoteDesktopClass : INotifyPropertyChanged
         163:     {
         164:         string _RemoteDesktopStatus;
         165:         bool _IsRemoteDesktopSession;
         166:         public RemoteDesktopClass()
         167:         {
         168:         }
         169:         public RemoteDesktopClass(string value)
         170:         {
         171:             this.RemoteDesktopStatus = value;
         172:         }
         173:         public string RemoteDesktopStatus
         174:         {
         175:             get { return _RemoteDesktopStatus; }
         176:             set
         177:             {
         178:                 _RemoteDesktopStatus = value;
         179:                 OnPropertyChanged("RemoteDesktopStatus");
         180:             }
         181:         }
         182:         public bool IsRemoteDesktopSession
         183:         {
         184:             get { return _IsRemoteDesktopSession; }
         185:             set
         186:             {
         187:                 _IsRemoteDesktopSession = value;
         188:                 OnPropertyChanged("IsRemoteDesktopSession");
         189:             }
         190:         }
         191:         public event PropertyChangedEventHandler PropertyChanged;  //OnPropertyChanged -update property value in binding
         192:         private void OnPropertyChanged(String info)
         193:         {
         194:             if (PropertyChanged != null)
         195:                 PropertyChanged(this, new PropertyChangedEventArgs(info));
         196:         }
         197:     }
         198: }

      • WPF Performance and .NET Framework Client Profile

        WPF 4 and Visual Studio 2010 performance on Tablets and Touch-enabled machines

        • 0 Comments

        In Microsoft .NET Framework 4, WPF added UI Automation (UIA) virtualization support. This did not exist in WPF in previous .Net releases.

        This allows any WPF app that target NET4 and have virtualized elements (such as ListView, Tree View, etc ) to benefits from significantly improved performance on machines that have Accessibility clients running (for example: Screen Reader). 

        This is typical on Tablet and other touch-enabled machines because the Accessibility clients TabTip.exe (the "Tablet PC Input Panel") is running by default.

        It is also common on non-tablet machines since any machine can run UI Automation client app (for example, UI Spy, Narrator, Magnifier, etc) or have devices connected that also use UI Automation (for example, Wacom touch & pen input type device)

        Visuals Studio 2010 is an example of a WPF 4 app that uses virtualized WPF elements and can benefit from the UIA Virtualization.

        For the UIA virtualization to work, under the covers WPF uses Windows Automation API 3.0 (aka "UI Automation API 3.0").

        These APIs are included by default on Windows 7 & Windows 2008 Server R2.

        The gotcha is that the Windows Automation API 3.0 are not included on other down-level OS's (such as XP/Vista) and must be installed separately in order to get the full Perf benefits.

        These APIs can be installed from this location:  http://support.microsoft.com/kb/971513/
        Please note that the download site currently do not support XP 64 bit and you musty have the latest SP installed (e.g. Vista SP2, XP SP3)

        So in summary:
        Do you notice VS 2010 or other WPF based app performance issues?

        • If your machine is Windows 7 or Windows 2008 Server R2, you should be fine. There is nothing for you to do.
        • Otherwise, if your machine has any of below:
          • A Tablet PC (even if you aren't using the pen)
          • Has multi-touch screen drivers enabled
          • Has an external input device like a pen or Wacom tablet
          • Has a screen-reader enabled or have other UIA Client app running (such as UI Spy or Narrator)
        • Then install Windows Automation API 3.0

        Related blogs:
        WPF 3.5 SP1 Performance on Tablet & Touch-enabled machines
        This blog is about improving UI Automation for WPF 3.5 SP1 apps and has no impact on .NET 4 RC apps or later nor Visual Studio 2010 RC or later. The reason is that this optimization is already included in .NET 4 RC or later. Note that we now have a Hotfix for .NET 3.5 SP1, see here.

        Intellisense Crashing on VS 2010 RC
        This blog discusses crashes in VS 2010 RC when using Intelisense which are related UIA but is a separate issue from UIA performance issue above.
        You would still need to install Windows Automation API 3.0 on XP/Vista to get the optimal perf for WPF 4 and Visual Studio 2010

      Page 1 of 3 (41 items) 123