Microsoft .NET Framework 1.1 and 2.0 Compatibility Testing Scenarios
2009-02-20 20:43
525 查看
.NET Framework Deployment
Compatibility Testing Scenarios
Microsoft Corporation
May 2006
Applies to:
.NET Framework
Summary: This document outlines best practices for testing a managed application or component for compatibility with newer runtime versions. It covers different configurations you should test to ensure that the application continues to run properly. Full details on compatibility are available in Microsoft .NET Framework 1.1 and 2.0 Compatibility. If you have not already read that document, we recommend that you read it before proceeding. (7 printed pages)
Application Scenarios
Test 1: Installs correctly on a computer with the .NET Framework 1.x and 2.0 installed side-by-side
Test 2: Runs correctly on a computer with the .NET Framework 1.x and 2.0 installed side-by-side
Test 3: Runs correctly on a computer with the .NET Framework 1.x and 2.0 installed Side-by-side with the application configured to run against the .NET Framework 1.x
Test 4: Runs correctly on a computer with the .NET Framework 1.x and 2.0 installed side-by-side with the application configured to run against the .NET Framework 2.0
Test 5: Installs correctly on a computer with only the .NET Framework 2.0 installed
Background
One of the important principles of .NET Framework compatibility is the idea of Side-by-side (SxS) execution. As covered in detail in Side-by-Side Execution of the .NET Framework, this means that a fully managed application will try to run against the version of the .NET Framework with which it was built. In certain configurations, including when being hosted in a native application, the application or component will need to run with the most recent version of the .NET Framework available on the computer, potentially exposing a compatibility issue.
Our testing has shown that it is important to test both installing and running the application. Installation of the application will sometimes depend on a particular version of the .NET Framework being present on the computer.
The scenarios that need to be tested for each of your applications are:
1. Installs correctly on a computer with the .NET Framework 1.x and 2.0 installed side-by-side
2. Runs correctly on a computer with the .NET Framework 1.x and 2.0 installed side-by-side.
3. Runs correctly on a computer with the .NET Framework 1.x and 2.0 installed side-by-side with the application configured to run against the .NET Framework 1.x.
4. Runs correctly on a computer with the .NET Framework 1.x and 2.0 installed side-by-side with the application configured to run against the .NET Framework 2.0.
5. Installs correctly on a computer with only the .NET Framework 2.0 installed.
2. If you already have an older version of the .NET Framework 2.0, uninstall it so that you can download the latest .NET Framework 2.0 bits.
3. Before you install .NET Framework 2.0, test the behavior of your application on a clean 1.x computer. Uninstall the application once you're done.
4. Download and install the latest .NET Framework 2.0.
5. Install your application on this computer.
6. Record your results
No—The application failed during installation. Please try the following:
· Uninstall the .NET Framework 2.0 from your computer.
· Install on your application on the computer.
· Reinstall .NET 2.0.
· Move on to Test 2.
No Installer—the application does not need an installer. Proceed to Test 2.
2. Explore all possible features to ensure that they are working correctly (covering as much code as possible). Pay particular attention to areas that save or recover serialized data.
Yes—The application ran as expected. Proceed to Test 4.
No—The application did not run as expected. Proceed to Test 3.
This scenario tests to see if your application can be made to work correctly by locking it to an older runtime when v2.0 is installed on the computer. This is only applicable if the application or component is hosted by a native application.
2. Add this snippet to the file:
Copy Code
You can use the same code fragment to lock-back to v1.0 except that the version should be v1.0.3705.
Note In production you should NOT lock back add-ins by locking back the main executable; for more details look at the Microsoft .NET Framework 1.1 and 2.0 Compatibility white paper.
3. Run the application once more and test the feature(s) that failed in Test 2.
No—The application still did not run as expected.
Not Tested—Please proceed to Test 4.
2. Create or set the following registry key:
Copy Code
3. GotDotNet User Sample: Ensuring your Applications Execute on the Whidbey CLR contains a zip file containing two files that let you toggle the value stored in this registry key.
4. Explore all possible features of your application in order to verify that they work correctly using the .NET Framework 2.0.
5. Restore "OnlyUseLatestCLR"=dword:00000000 after you're done with this test.
No—You will need to fix the issues.
2. Install your application on that computer. Your application may require that you download .NET Framework 1.x in order to proceed with the installation.
Yes after installing the .NET Framework 1.x—The application required the .NET Framework 1.x and required its installation
No—The application did not install as expected. Please fill out a bug report with the details.
No Installer—The application does not require an installer.
Big Red Switch information on GotDotNet
.Config file information
Side-by-Side Execution of the .NET Framework
ASP.NET application in IIS; see .NET Framework Developer's Guide: Configuring an ASP.NET Application for an ASP.NET Version
.NET Framework Developer's Guide: Side-by-Side Execution for COM Interop
Compatibility Considerations and Version Changes
Ref: http://msdn.microsoft.com/en-us/library/ms994381.aspx
Compatibility Testing Scenarios
Microsoft Corporation
May 2006
Applies to:
.NET Framework
Summary: This document outlines best practices for testing a managed application or component for compatibility with newer runtime versions. It covers different configurations you should test to ensure that the application continues to run properly. Full details on compatibility are available in Microsoft .NET Framework 1.1 and 2.0 Compatibility. If you have not already read that document, we recommend that you read it before proceeding. (7 printed pages)
Contents
IntroductionApplication Scenarios
Test 1: Installs correctly on a computer with the .NET Framework 1.x and 2.0 installed side-by-side
Test 2: Runs correctly on a computer with the .NET Framework 1.x and 2.0 installed side-by-side
Test 3: Runs correctly on a computer with the .NET Framework 1.x and 2.0 installed Side-by-side with the application configured to run against the .NET Framework 1.x
Test 4: Runs correctly on a computer with the .NET Framework 1.x and 2.0 installed side-by-side with the application configured to run against the .NET Framework 2.0
Test 5: Installs correctly on a computer with only the .NET Framework 2.0 installed
Background
Introduction
Many applications using managed code require that a particular version of the .NET Framework be present on the computer. Some applications redistribute a particular release of the.NET Framework. In some cases, applications that were developed on a specific version of the .NET Framework may encounter issues when trying to execute on a newer version of the Framework. As explained in Microsoft .NET Framework 1.1 and 2.0 Compatibility, managed applications run by default on the version of the Framework they were built against. However, in certain situations where only a newer version of the Framework is available or a hosting application requires a particular version, an application may run against a newer version. To ensure the best customer experience, we recommend that you test your applications for compatibility according to the steps described below.Application Scenarios
There are 5 scenarios that have to be covered to verify that your application works correctly against the newer .NET Framework version. In order to ensure that we can address any compatibility issues that are discovered during the testing process.One of the important principles of .NET Framework compatibility is the idea of Side-by-side (SxS) execution. As covered in detail in Side-by-Side Execution of the .NET Framework, this means that a fully managed application will try to run against the version of the .NET Framework with which it was built. In certain configurations, including when being hosted in a native application, the application or component will need to run with the most recent version of the .NET Framework available on the computer, potentially exposing a compatibility issue.
Our testing has shown that it is important to test both installing and running the application. Installation of the application will sometimes depend on a particular version of the .NET Framework being present on the computer.
The scenarios that need to be tested for each of your applications are:
1. Installs correctly on a computer with the .NET Framework 1.x and 2.0 installed side-by-side
2. Runs correctly on a computer with the .NET Framework 1.x and 2.0 installed side-by-side.
3. Runs correctly on a computer with the .NET Framework 1.x and 2.0 installed side-by-side with the application configured to run against the .NET Framework 1.x.
4. Runs correctly on a computer with the .NET Framework 1.x and 2.0 installed side-by-side with the application configured to run against the .NET Framework 2.0.
5. Installs correctly on a computer with only the .NET Framework 2.0 installed.
Test 1: Installs correctly on a computer with the .NET Framework 1.x and 2.0 installed side-by-side
This test verifies that your application will install correctly on a computer that has the .NET Framework 1.x and 2.0 installed on it.Testing Steps
1. Make sure you have the .NET Framework 1.x installed on your computer.2. If you already have an older version of the .NET Framework 2.0, uninstall it so that you can download the latest .NET Framework 2.0 bits.
3. Before you install .NET Framework 2.0, test the behavior of your application on a clean 1.x computer. Uninstall the application once you're done.
4. Download and install the latest .NET Framework 2.0.
5. Install your application on this computer.
6. Record your results
Possible Results
Yes—The application installed as expected, proceed to Test 2.No—The application failed during installation. Please try the following:
· Uninstall the .NET Framework 2.0 from your computer.
· Install on your application on the computer.
· Reinstall .NET 2.0.
· Move on to Test 2.
No Installer—the application does not need an installer. Proceed to Test 2.
Test 2: Runs correctly on a computer with the .NET Framework 1.x and 2.0 installed side-by-side
This test verifies that your application functions correctly on a computer that has the .NET Framework 1.x and 2.0 installed on it.Testing Steps
1. Run your application on the computer.2. Explore all possible features to ensure that they are working correctly (covering as much code as possible). Pay particular attention to areas that save or recover serialized data.
Possible Results
The possible results are Yes/No.Yes—The application ran as expected. Proceed to Test 4.
No—The application did not run as expected. Proceed to Test 3.
Test 3: Runs correctly on a computer with the .NET Framework 1.x and 2.0 installed Side-by-side with the application configured to run against the .NET Framework 1.x
Note You can skip this test if Test 2 passed.This scenario tests to see if your application can be made to work correctly by locking it to an older runtime when v2.0 is installed on the computer. This is only applicable if the application or component is hosted by a native application.
Testing Steps
1. Create a configuration file to force your application to load using a particular version of the .NET Framework. To do this you would have to create a new file and call it <appname>.exe.config (unless it already exists). This file should be placed in the same directory as the application being tested.2. Add this snippet to the file:
Copy Code
<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
</startup>
</configuration>
You can use the same code fragment to lock-back to v1.0 except that the version should be v1.0.3705.
Note In production you should NOT lock back add-ins by locking back the main executable; for more details look at the Microsoft .NET Framework 1.1 and 2.0 Compatibility white paper.
3. Run the application once more and test the feature(s) that failed in Test 2.
Possible Results
Yes—The application now ran as expected. Proceed to Test 4.No—The application still did not run as expected.
Not Tested—Please proceed to Test 4.
Test 4: Runs correctly on a computer with the .NET Framework 1.x and 2.0 installed side-by-side with the application configured to run against the .NET Framework 2.0
This test configures all applications on your computer to run against the .NET Framework 2.0 and allows you to test forward-compatibility.Testing Steps
1. Configure all managed applications on your computer to require the latest version of the .NET Framework2. Create or set the following registry key:
Copy Code
[HKEY_LOCAL_COMPUTER"SOFTWARE"Microsoft".NETFramework]
"OnlyUseLatestCLR"=dword:00000001
3. GotDotNet User Sample: Ensuring your Applications Execute on the Whidbey CLR contains a zip file containing two files that let you toggle the value stored in this registry key.
4. Explore all possible features of your application in order to verify that they work correctly using the .NET Framework 2.0.
5. Restore "OnlyUseLatestCLR"=dword:00000000 after you're done with this test.
Possible Results
Yes—All applications functioned as expected.No—You will need to fix the issues.
Test 5: Installs correctly on a computer with only the .NET Framework 2.0 installed
This test verifies that your application installs correctly on a computer that has only the .NET Framework 2.0 installed on it.Testing Steps
1. Create a clean computer or Virtual PC image with only the .NET Framework 2.0 installed.2. Install your application on that computer. Your application may require that you download .NET Framework 1.x in order to proceed with the installation.
Possible Results
Yes—The application installed correctly.Yes after installing the .NET Framework 1.x—The application required the .NET Framework 1.x and required its installation
No—The application did not install as expected. Please fill out a bug report with the details.
No Installer—The application does not require an installer.
Background
.NET Framework SDK documents and articles describe Side-by-side in further detail and how to configure your application to run a particular release of the .NET Framework for a particular application model e.g. .EXE application, web application, managed COM component.MSDN documentation
.NET Framework Developer's Guide: Targeting a .NET Framework VersionBig Red Switch information on GotDotNet
.Config file information
Side-by-Side Execution of the .NET Framework
ASP.NET application in IIS; see .NET Framework Developer's Guide: Configuring an ASP.NET Application for an ASP.NET Version
.NET Framework Developer's Guide: Side-by-Side Execution for COM Interop
Compatibility Considerations and Version Changes
Ref: http://msdn.microsoft.com/en-us/library/ms994381.aspx
相关文章推荐
- Microsoft .NET Framework 1.1 and 2.0 Compatibility
- New examples for the Microsoft .NET Framework 2.0 online and Google group Ajax.NET
- Microsoft .NET Framework 1.1 和 2.0 兼容性
- 【摘要】Advanced Serialization: Format Your Way to Success with the .NET Framework Versions 1.1 and 2.0
- Comparing the Microsoft .NET Framework 1.1 Data Provider for Oracle and the Oracle Data Provider for .NET
- Microsoft .NET Framework 1.1 和 2.0(测试版)兼容性
- Testing ASP.NET 2.0 and Visual Web Developer
- How to Code .NET: Tips and Tricks for Coding .NET 1.1 and .NET 2.0 Applications Effectively
- Microsoft .NET Framework 各个版本之间的关系?如何安装2.0,3.0,4.0?向下兼容?
- Microsoft .NET Pet Shop 4:将 ASP.NET 1.1 应用程序迁移到 2.0
- Microsoft ship Visual Studio 2005 and .NET 2.0
- ASP.NET Remote Debugging, Windows XP SP2 and .NET Framework 2.0
- Microsoft .NET Framework 2.0 Application Development Foundation 翻译系列1(简介及目录)
- Microsoft .NET Pet Shop 4: Migrating an ASP.NET 1.1 Application to 2.0
- Microsoft .NET Framework 2.0 Application Development Foundation 翻译系列6(第一章:第二课公共引用类型的使用②)
- NLog 2.0 for Silverlight 4 and .NET Framework 4.0 preview builds
- Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1 (ISO)
- Setup 64-bit Windows Server for Running ASP.NET 1.1 and ASP.NET 2.0 at the Same Time
- [MSDN]Microsoft .NET Pet Shop 4:将 ASP.NET 1.1 应用程序迁移到 2.0
- Microsoft .NET Pet Shop 4:将 ASP.NET 1.1 应用程序迁移到 2.0