diff --git a/.openpublishing.redirection.framework.json b/.openpublishing.redirection.framework.json index c37908bfba58c..fc1ce33af060e 100644 --- a/.openpublishing.redirection.framework.json +++ b/.openpublishing.redirection.framework.json @@ -926,7 +926,7 @@ }, { "source_path_from_root": "/docs/framework/deployment/windows/10.md", - "redirect_url": "/dotnet/framework/install/on-windows-10" + "redirect_url": "/dotnet/framework/install/on-windows-and-server" }, { "source_path_from_root": "/docs/framework/deployment/windows/7.md", @@ -934,7 +934,7 @@ }, { "source_path_from_root": "/docs/framework/deployment/windows/8.md", - "redirect_url": "/dotnet/framework/install/on-windows-8" + "redirect_url": "/dotnet/framework/install/on-windows-and-server" }, { "source_path_from_root": "/docs/framework/deployment/windows/index.md", @@ -985,6 +985,34 @@ "redirect_url": "/previous-versions/dotnet/framework/install/on-windows-7", "redirect_document_id": false }, + { + "source_path_from_root": "/docs/framework/install/on-windows-8.md", + "redirect_url": "/dotnet/framework/install/on-windows-and-server" + }, + { + "source_path_from_root": "/docs/framework/install/on-windows-8-1.md", + "redirect_url": "/dotnet/framework/install/on-windows-and-server" + }, + { + "source_path_from_root": "/docs/framework/install/on-windows-10.md", + "redirect_url": "/dotnet/framework/install/on-windows-and-server" + }, + { + "source_path_from_root": "/docs/framework/install/on-windows-11.md", + "redirect_url": "/dotnet/framework/install/on-windows-and-server" + }, + { + "source_path_from_root": "/docs/framework/install/on-server-2019.md", + "redirect_url": "/dotnet/framework/install/on-windows-and-server" + }, + { + "source_path_from_root": "/docs/framework/install/on-server-2022.md", + "redirect_url": "/dotnet/framework/install/on-windows-and-server" + }, + { + "source_path_from_root": "/docs/framework/install/on-server-2025.md", + "redirect_url": "/dotnet/framework/install/on-windows-and-server" + }, { "source_path_from_root": "/docs/framework/install/on-windows-vista.md", "redirect_url": "/previous-versions/dotnet/framework/install/on-windows-vista", @@ -995,6 +1023,10 @@ "redirect_url": "/previous-versions/dotnet/framework/install/on-windows-xp", "redirect_document_id": false }, + { + "source_path_from_root": "/docs/framework/install/run-net-framework-1-1-apps.md", + "redirect_url": "/dotnet/framework/install/dotnet-35-windows" + }, { "source_path_from_root": "/docs/framework/interop/applying-interop-attributes.md", "redirect_url": "/dotnet/standard/native-interop/apply-interop-attributes", @@ -1113,6 +1145,14 @@ "source_path_from_root": "/docs/framework/migration-guide/application-compatibility-in-the-net-framework-4-7.md", "redirect_url": "/dotnet/framework/migration-guide/application-compatibility" }, + { + "source_path_from_root": "/docs/framework/migration-guide/how-to-determine-which-versions-are-installed.md", + "redirect_url": "/dotnet/framework/install/how-to-determine-which-versions-are-installed" + }, + { + "source_path_from_root": "/docs/framework/migration-guide/how-to-determine-which-net-framework-updates-are-installed.md", + "redirect_url": "/dotnet/framework/install/how-to-determine-which-net-framework-updates-are-installed" + }, { "source_path_from_root": "/docs/framework/migration-guide/migration-guide/mitigation-culture-and-asynchronous-operations.md", "redirect_url": "/dotnet/framework/migration-guide/retargeting/4.6.x" @@ -1151,7 +1191,7 @@ }, { "source_path_from_root": "/docs/framework/migration-guide/minimum-release-dword.md", - "redirect_url": "/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed" + "redirect_url": "/dotnet/framework/install/how-to-determine-which-versions-are-installed" }, { "source_path_from_root": "/docs/framework/migration-guide/mitigation-claimsidentity-constructor.md", @@ -1167,7 +1207,7 @@ }, { "source_path_from_root": "/docs/framework/migration-guide/release-keys-and-os-versions.md", - "redirect_url": "/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed" + "redirect_url": "/dotnet/framework/install/how-to-determine-which-versions-are-installed" }, { "source_path_from_root": "/docs/framework/migration-guide/retargeting-changes-in-the-net-framework-4-5-1.md", @@ -1673,6 +1713,10 @@ "source_path_from_root": "/docs/framework/migration-guide/runtime/index.md", "redirect_url": "/dotnet/framework/migration-guide/application-compatibility" }, + { + "source_path_from_root": "/docs/framework/migration-guide/versions-and-dependencies.md", + "redirect_url": "/dotnet/framework/install/versions-and-dependencies" + }, { "source_path_from_root": "/docs/framework/misc/binding.md", "redirect_url": "/dotnet/framework/configure-apps/file-schema/wcf/bindings" diff --git a/docfx.json b/docfx.json index 9c2b5973f1b6a..da0023f683699 100644 --- a/docfx.json +++ b/docfx.json @@ -323,11 +323,11 @@ "_csharpstandard/**/*.md": "billwagner", "_roslyn/docs/compilers/CSharp/*.md": "billwagner", "_vblang/spec/*.md": "billwagner", - "docs/azure/**/*.*": "alexwolfmsft", - "docs/orleans/**/*.*": "IEvangelist", + "docs/ai/**/*.*": "gewarren", "docs/architecture/**/**.md": "jamesmontemagno", "docs/architecture/grpc-for-wcf-developers/**/**.md": "JamesNK", "docs/architecture/modernize-desktop/**/**.md": "OliaG", + "docs/azure/**/*.*": "alexwolfmsft", "docs/core/**/**.md": "gewarren", "docs/core/compatibility/**/**.md": "camsoper", "docs/core/deploying/**/**.md": "adegeo", @@ -377,7 +377,8 @@ "docs/fundamentals/runtime-libraries/**/**.md": "gewarren", "docs/fundamentals/syslib-diagnostics/**/**.md": "gewarren", "docs/iot/**/*.*": "camsoper", - "docs/machine-learning/**/**.md": "luisquintanilla", + "docs/machine-learning/**/**.md": "gewarren", + "docs/orleans/**/*.*": "IEvangelist", "docs/standard/**/**.md": "gewarren", "docs/standard/analyzers/**/**.md": "IEvangelist", "docs/standard/assembly/**/**.md": "IEvangelist", @@ -414,7 +415,7 @@ "_csharpstandard/**/*.md": "wiwagn", "_roslyn/docs/compilers/CSharp/*.md": "wiwagn", "_vblang/spec/*.md": "wiwagn", - "docs/ai/**/*.*": "alexwolf", + "docs/ai/**/*.*": "gewarren", "docs/architecture/**/**.md": "jamont", "docs/architecture/grpc-for-wcf-developers/**/**.md": "jamesnk", "docs/architecture/modernize-desktop/**/**.md": "oliag", @@ -466,7 +467,7 @@ "docs/fundamentals/runtime-libraries/**/**.md": "gewarren", "docs/fundamentals/syslib-diagnostics/**/**.md": "gewarren", "docs/iot/**/*.*": "casoper", - "docs/machine-learning/**/**.md": "luquinta", + "docs/machine-learning/**/**.md": "gewarren", "docs/standard/**/**.md": "gewarren", "docs/standard/analyzers/**/**.md": "dapine", "docs/standard/assembly/**/**.md": "dapine", diff --git a/docs/ai/conceptual/evaluation-libraries.md b/docs/ai/conceptual/evaluation-libraries.md new file mode 100644 index 0000000000000..e07e9eca8c355 --- /dev/null +++ b/docs/ai/conceptual/evaluation-libraries.md @@ -0,0 +1,59 @@ +--- +title: The Microsoft.Extensions.AI.Evaluation libraries +description: Learn about the Microsoft.Extensions.AI.Evaluation libraries, which simplify the process of evaluating the quality and accuracy of responses generated by AI models in .NET intelligent apps. +ms.topic: concept-article +ms.date: 02/19/2025 +--- +# The Microsoft.Extensions.AI.Evaluation libraries (Preview) + +The Microsoft.Extensions.AI.Evaluation libraries (currently in preview) simplify the process of evaluating the quality and accuracy of responses generated by AI models in .NET intelligent apps. Various metrics measure aspects like relevance, truthfulness, coherence, and completeness of the responses. Evaluations are crucial in testing, because they help ensure that the AI model performs as expected and provides reliable and accurate results. + +The evaluation libraries, which are built on top of the [Microsoft.Extensions.AI abstractions](../ai-extensions.md), are composed of the following NuGet packages: + +- [📦 Microsoft.Extensions.AI.Evaluation](https://www.nuget.org/packages/Microsoft.Extensions.AI.Evaluation) – Defines the core abstractions and types for supporting evaluation. +- [📦 Microsoft.Extensions.AI.Evaluation.Quality](https://www.nuget.org/packages/Microsoft.Extensions.AI.Evaluation.Quality) – Contains evaluators that assess the quality of LLM responses in an app according to metrics such as relevance, fluency, coherence, and truthfulness. +- [📦 Microsoft.Extensions.AI.Evaluation.Reporting](https://www.nuget.org/packages/Microsoft.Extensions.AI.Evaluation.Reporting) – Contains support for caching LLM responses, storing the results of evaluations, and generating reports from that data. +- [📦 Microsoft.Extensions.AI.Evaluation.Reporting.Azure](https://www.nuget.org/packages/Microsoft.Extensions.AI.Evaluation.Reporting.Azure) - Supports the reporting library with an implementation for caching LLM responses and storing the evaluation results in an [Azure Storage](/azure/storage/common/storage-introduction) container. +- [📦 Microsoft.Extensions.AI.Evaluation.Console](https://www.nuget.org/packages/Microsoft.Extensions.AI.Evaluation.Console) – A command-line tool for generating reports and managing evaluation data. + +## Test integration + +The libraries are designed to integrate smoothly with existing .NET apps, allowing you to leverage existing testing infrastructures and familiar syntax to evaluate intelligent apps. You can use any test framework (for example, [MSTest](../../core/testing/index.md#mstest), [xUnit](../../core/testing/index.md#xunit), or [NUnit](../../core/testing/index.md#nunit)) and testing workflow (for example, [Test Explorer](/visualstudio/test/run-unit-tests-with-test-explorer), [dotnet test](../../core/tools/dotnet-test.md), or a CI/CD pipeline). The library also provides easy ways to do online evaluations of your application by publishing evaluation scores to telemetry and monitoring dashboards. + +## Comprehensive evaluation metrics + +The evaluation libraries were built in collaboration with data science researchers from Microsoft and GitHub, and were tested on popular Microsoft Copilot experiences. The following table shows the built-in evaluators. + +| Metric | Description | Evaluator type | +|------------------------------------|----------------------------------------------|----------------| +| Relevance, truth, and completeness | How effectively a response addresses a query | | +| Fluency | Grammatical accuracy, vocabulary range, sentence complexity, and overall readability| | +| Coherence | The logical and orderly presentation of ideas | | +| Equivalence | The similarity between the generated text and its ground truth with respect to a query | | +| Groundedness | How well a generated response aligns with the given context | | + +You can also customize to add your own evaluations by implementing the interface or extending the base classes such as and . + +## Cached responses + +The library uses *response caching* functionality, which means responses from the AI model are persisted in a cache. In subsequent runs, if the request parameters (prompt and model) are unchanged, responses are then served from the cache to enable faster execution and lower cost. + +## Reporting + +The library contains support for storing evaluation results and generating reports. The following image shows an example report in an Azure DevOps pipeline: + +:::image type="content" source="../media/ai-extensions/pipeline-report.jpg" lightbox="../media/ai-extensions/pipeline-report.jpg" alt-text="Screenshot of an AI evaluation report in an Azure DevOps pipeline."::: + +The `dotnet aieval` tool, which ships as part of the `Microsoft.Extensions.AI.Evaluation.Console` package, also includes functionality for generating reports and managing the stored evaluation data and cached responses. + +## Configuration + +The libraries are designed to be flexible. You can pick the components that you need. For example, you can disable response caching or tailor reporting to work best in your environment. You can also customize and configure your evaluations, for example, by adding customized metrics and reporting options. + +## Samples + +For a more comprehensive tour of the functionality and APIs available in the Microsoft.Extensions.AI.Evaluation libraries, see the [API usage examples (dotnet/ai-samples repo)](https://github.com/dotnet/ai-samples/blob/main/src/microsoft-extensions-ai-evaluation/api/). These examples are structured as a collection of unit tests. Each unit test showcases a specific concept or API and builds on the concepts and APIs showcased in previous unit tests. + +## See also + +- [Evaluation of generative AI apps (Azure AI Foundry)](/azure/ai-studio/concepts/evaluation-approach-gen-ai) diff --git a/docs/ai/media/ai-extensions/pipeline-report.jpg b/docs/ai/media/ai-extensions/pipeline-report.jpg new file mode 100644 index 0000000000000..b128780c45010 Binary files /dev/null and b/docs/ai/media/ai-extensions/pipeline-report.jpg differ diff --git a/docs/ai/toc.yml b/docs/ai/toc.yml index 5a8deb6c52d1e..2b716ec4f8272 100644 --- a/docs/ai/toc.yml +++ b/docs/ai/toc.yml @@ -3,7 +3,7 @@ items: href: index.yml - name: Overview href: get-started/dotnet-ai-overview.md -- name: Quickstart - Connect to and prompt an AI model +- name: "Quickstart: Connect to and prompt an AI model" href: quickstarts/quickstart-openai-summarize-text.md - name: AI frameworks and SDKs items: @@ -75,7 +75,9 @@ items: href: /azure/ai-services/openai/how-to/risks-safety-monitor?toc=/dotnet/ai/toc.json&bc=/dotnet/ai/toc.json - name: Evaluation items: - - name: Evaluate LLM prompt completions + - name: The Microsoft.Extensions.AI.Evaluation libraries + href: conceptual/evaluation-libraries.md + - name: "Tutorial: Evaluate LLM prompt completions" href: tutorials/llm-eval.md - name: Resources items: diff --git a/docs/azure/includes/dotnet-all.md b/docs/azure/includes/dotnet-all.md index 6a1a98357bd18..52fccfd2d0b10 100644 --- a/docs/azure/includes/dotnet-all.md +++ b/docs/azure/includes/dotnet-all.md @@ -462,7 +462,7 @@ | Speech Xamarin iOS | NuGet [1.25.0](https://www.nuget.org/packages/Microsoft.CognitiveServices.Speech.Xamarin.iOS/1.25.0) | | | | Spell Check | NuGet [4.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Language.SpellCheck/4.1.0-preview.1) | | GitHub [4.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Language.SpellCheck_4.1.0-preview.1/sdk/cognitiveservices/Language.SpellCheck) | | Spring Cloud Client | NuGet [2.0.0-preview.3](https://www.nuget.org/packages/Microsoft.Azure.SpringCloud.Client/2.0.0-preview.3) | | | -| Storage - Files Data Lake | NuGet [2.0.1](https://www.nuget.org/packages/Microsoft.Azure.DataLake.Store/2.0.1) | [docs](https://learn.microsoft.com/dotnet/api/overview/azure/data-lake-store) | GitHub [2.0.1](https://github.com/Azure/azure-data-lake-store-net/tree/1.2.3-alpha) | +| Storage - Files Data Lake | NuGet [2.0.2](https://www.nuget.org/packages/Microsoft.Azure.DataLake.Store/2.0.2) | [docs](https://learn.microsoft.com/dotnet/api/overview/azure/data-lake-store) | GitHub [2.0.2](https://github.com/Azure/azure-data-lake-store-net/tree/1.2.3-alpha) | | Synapse Analytics | NuGet [0.1.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Synapse/0.1.0-preview) | | GitHub [0.1.0-preview](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Synapse_0.1.0-preview/sdk/synapse/Microsoft.Azure.Synapse/) | | Tables | NuGet [2.1.2](https://www.nuget.org/packages/Microsoft.Azure.CosmosDB.Table/2.1.2) | | | | Video Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingVideoSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingVideoSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingVideoSearch) | diff --git a/docs/core/compatibility/9.0.md b/docs/core/compatibility/9.0.md index 687fdb5e1db89..249b1c36ed8d2 100644 --- a/docs/core/compatibility/9.0.md +++ b/docs/core/compatibility/9.0.md @@ -112,10 +112,11 @@ If you're migrating an app to .NET 9, the breaking changes listed here might aff ## Serialization -| Title | Type of change | Introduced version | -|-------------------------------------------------------------------------------|-------------------|--------------------| -| [BinaryFormatter always throws](serialization/9.0/binaryformatter-removal.md) | Behavioral change | Preview 6 | -| [Nullable JsonDocument properties deserialize to JsonValueKind.Null](serialization/9.0/jsondocument-props.md) | Behavioral change | Preview 1 | +| Title | Type of change | Introduced version | +|---------------------------------------------------------------------------------------------------------------------|-------------------|--------------------| +| [BinaryFormatter always throws](serialization/9.0/binaryformatter-removal.md) | Behavioral change | Preview 6 | +| [Nullable JsonDocument properties deserialize to JsonValueKind.Null](serialization/9.0/jsondocument-props.md) | Behavioral change | Preview 1 | +| [System.Text.Json metadata reader now unescapes metadata property names](serialization/9.0/json-metadata-reader.md) | Behavioral change | GA | ## Windows Forms diff --git a/docs/core/compatibility/serialization/9.0/json-metadata-reader.md b/docs/core/compatibility/serialization/9.0/json-metadata-reader.md new file mode 100644 index 0000000000000..e74c7591622dc --- /dev/null +++ b/docs/core/compatibility/serialization/9.0/json-metadata-reader.md @@ -0,0 +1,67 @@ +--- +title: "Breaking change: System.Text.Json metadata reader now unescapes metadata property names" +description: System.Text.Json now unescapes metadata property names, affecting reference preservation and metadata property validation. +ms.date: 2/13/2025 +ai-usage: ai-assisted +ms.custom: https://github.com/dotnet/docs/issues/44748 +--- + +# System.Text.Json metadata reader now unescapes metadata property names + +The library has been updated to unescape metadata property names. This change affects how JSON documents are interpreted in the context of reference preservation, polymorphism, and metadata property validation. + +## Version introduced + +.NET 9 + +## Previous behavior + +Previously, didn't unescape metadata property names. This would lead to invalid property names being accepted, which could bypass metadata property validation. + +For example, the following code would succeed in the first call but throw an exception in the second call: + +```csharp +JsonSerializerOptions options = new() { ReferenceHandler = ReferenceHandler.Preserve }; +JsonSerializer.Deserialize("""{"\u0024invalid" : 42 }""", options); +JsonSerializer.Deserialize("""{"$invalid" : 42 }""", options); + +record MyPoco; +``` + +The unescaping behavior could also cause polymorphism issues when roundtripping metadata properties whose names require escaping, as seen here: + +```csharp +string json = JsonSerializer.Serialize(new Derived()); +Console.WriteLine(json); // {"categor\u00EDa":"derived"} +Console.WriteLine(JsonSerializer.Deserialize(json) is Derived); // False + +[JsonPolymorphic(TypeDiscriminatorPropertyName = "categoría")] +[JsonDerivedType(typeof(Derived), "derived")] +public record Base; +public record Derived : Base; +``` + +## New behavior + + now unescapes metadata property names. This new behavior means that the line `Console.WriteLine(JsonSerializer.Deserialize(json) is Derived);` from the polymorphic deserialization example now returns `true`, and that invalid property names correctly fail to deserialize with the following exception: + +```output +Unhandled exception. System.Text.Json.JsonException: Properties that start with '$' are not allowed in types that support metadata. +``` + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +The change improves correctness and reliability by ensuring that metadata property names are properly unescaped, preventing the bypass of metadata property validation. For more details, see the [reported issue](https://github.com/dotnet/runtime/issues/112288). + +## Recommended action + +Avoid using escaping to bypass metadata property validation. Instead, pick property names that don't conflict with metadata properties. + +## Affected APIs + +* +* diff --git a/docs/core/compatibility/serialization/9.0/jsondocument-props.md b/docs/core/compatibility/serialization/9.0/jsondocument-props.md index 410878c677d90..e8af4da5d809a 100644 --- a/docs/core/compatibility/serialization/9.0/jsondocument-props.md +++ b/docs/core/compatibility/serialization/9.0/jsondocument-props.md @@ -1,5 +1,5 @@ --- -title: "Nullable JsonDocument properties deserialize to JsonValueKind.Null" +title: "Breaking change: Nullable JsonDocument properties deserialize to JsonValueKind.Null" description: Learn about the breaking change in serialization in .NET 9 where nullable JsonDocument values deserialize to JsonValueKind.Null instead of null. ms.date: 12/5/2024 ai-usage: ai-assisted diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index d150372072525..010a040254339 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -166,6 +166,8 @@ items: href: serialization/9.0/binaryformatter-removal.md - name: Nullable JsonDocument properties deserialize to JsonValueKind.Null href: serialization/9.0/jsondocument-props.md + - name: System.Text.Json metadata reader now unescapes metadata property names + href: serialization/9.0/json-metadata-reader.md - name: Windows Forms items: - name: BindingSource.SortDescriptions doesn't return null @@ -2022,6 +2024,8 @@ items: href: serialization/9.0/binaryformatter-removal.md - name: Nullable JsonDocument properties deserialize to JsonValueKind.Null href: serialization/9.0/jsondocument-props.md + - name: System.Text.Json metadata reader now unescapes metadata property names + href: serialization/9.0/json-metadata-reader.md - name: .NET 8 items: - name: BinaryFormatter disabled for most projects diff --git a/docs/core/compatibility/windows-forms/9.0/statusstrip-renderer.md b/docs/core/compatibility/windows-forms/9.0/statusstrip-renderer.md index c788c82837115..084ac979f68b6 100644 --- a/docs/core/compatibility/windows-forms/9.0/statusstrip-renderer.md +++ b/docs/core/compatibility/windows-forms/9.0/statusstrip-renderer.md @@ -32,7 +32,7 @@ The previous default behavior didn't meet accessibility standards. The focus ind The new behavior is recommended for accessibility reasons. If you want to revert to the previous behavior, set the `RenderMode` property to . > [!NOTE] -> The new behavior was reverted to the previous behavior in .NET 10 Preview 1. +> The new behavior was reverted to the previous behavior in a .NET 9 servicing release and [.NET 10 Preview 1](../10.0/statusstrip-renderer.md). ## Affected APIs diff --git a/docs/core/install/how-to-detect-installed-versions.md b/docs/core/install/how-to-detect-installed-versions.md index 57ae421718bd9..91b10e84594b3 100644 --- a/docs/core/install/how-to-detect-installed-versions.md +++ b/docs/core/install/how-to-detect-installed-versions.md @@ -197,4 +197,4 @@ You can see both the SDK versions and runtime versions with the command `dotnet ## See also -- [Determine which .NET Framework versions are installed](../../framework/migration-guide/how-to-determine-which-versions-are-installed.md) +- [Determine which .NET Framework versions are installed](../../framework/install/how-to-determine-which-versions-are-installed.md) diff --git a/docs/csharp/language-reference/compiler-options/index.md b/docs/csharp/language-reference/compiler-options/index.md index 5af1b8bddc7ca..52001f1618464 100644 --- a/docs/csharp/language-reference/compiler-options/index.md +++ b/docs/csharp/language-reference/compiler-options/index.md @@ -58,4 +58,4 @@ For .NET Framework projects, you can also run *csc.exe* from the command line. E If you use the **Developer Command Prompt for Visual Studio** window, all the necessary environment variables are set for you. For information on how to access this tool, see [Developer Command Prompt for Visual Studio](/visualstudio/ide/reference/command-prompt-powershell). -The *csc.exe* executable file is usually located in the Microsoft.NET\Framework\\*\* folder under the *Windows* directory. Its location might vary depending on the exact configuration of a particular computer. If more than one version of .NET Framework is installed on your computer, you'll find multiple versions of this file. For more information about such installations, see [How to: determine which versions of the .NET Framework are installed](../../../framework/migration-guide/how-to-determine-which-versions-are-installed.md). +The *csc.exe* executable file is usually located in the Microsoft.NET\Framework\\*\* folder under the *Windows* directory. Its location might vary depending on the exact configuration of a particular computer. If more than one version of .NET Framework is installed on your computer, you'll find multiple versions of this file. For more information about such installations, see [How to: determine which versions of the .NET Framework are installed](../../../framework/install/how-to-determine-which-versions-are-installed.md). diff --git a/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md b/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md index 0494fd4c6c6c1..9fbef850bb76a 100644 --- a/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md +++ b/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md @@ -44,7 +44,7 @@ The bitwise and shift operators include unary bitwise complement, binary left an - Binary [`<<` (left shift)](#left-shift-operator-), [`>>` (right shift)](#right-shift-operator-), and [`>>>` (unsigned right shift)](#unsigned-right-shift-operator-) operators - Binary [`&` (logical AND)](#logical-and-operator-), [`|` (logical OR)](#logical-or-operator-), and [`^` (logical exclusive OR)](#logical-exclusive-or-operator-) operators -Those operators are defined for the `int`, `uint`, `long`, and `ulong` types. When both operands are of other integral types (`sbyte`, `byte`, `short`, `ushort`, or `char`), their values are converted to the `int` type, which is also the result type of an operation. When operands are of different integral types, their values are converted to the closest containing integral type. For more information, see the [Numeric promotions](~/_csharpstandard/standard/expressions.md#1247-numeric-promotions) section of the [C# language specification](~/_csharpstandard/standard/README.md). The compound operators (such as `>>=`) don't convert their arguments to `int` or have the result type as `int`. +Those operators are defined for the `int`, `uint`, `long`, `ulong`, `nint`, and `nuint` types. When both operands are of other integral types (`sbyte`, `byte`, `short`, `ushort`, or `char`), their values are converted to the `int` type, which is also the result type of an operation. When operands are of different integral types, their values are converted to the closest containing integral type. For more information, see the [Numeric promotions](~/_csharpstandard/standard/expressions.md#1247-numeric-promotions) section of the [C# language specification](~/_csharpstandard/standard/README.md). The compound operators (such as `>>=`) don't convert their arguments to `int` or have the result type as `int`. The `&`, `|`, and `^` operators are also defined for operands of the `bool` type. For more information, see [Boolean logical operators](boolean-logical-operators.md). diff --git a/docs/csharp/language-reference/statements/selection-statements.md b/docs/csharp/language-reference/statements/selection-statements.md index c5d0bad51f614..51b8a997a4535 100644 --- a/docs/csharp/language-reference/statements/selection-statements.md +++ b/docs/csharp/language-reference/statements/selection-statements.md @@ -66,11 +66,21 @@ You can specify multiple case patterns for one section of a `switch` statement, Within a `switch` statement, control can't fall through from one switch section to the next. As the examples in this section show, typically you use the `break` statement at the end of each switch section to pass control out of a `switch` statement. You can also use the [return](jump-statements.md#the-return-statement) and [throw](exception-handling-statements.md#the-throw-statement) statements to pass control out of a `switch` statement. To imitate the fall-through behavior and pass control to other switch section, you can use the [`goto` statement](jump-statements.md#the-goto-statement). -In an expression context, you can use the [`switch` expression](../operators/switch-expression.md) to evaluate a single expression from a list of candidate expressions based on a pattern match with an expression. +> [!IMPORTANT] +> Every *switch section* must end with a `break`, `goto` or `return`. Falling through from one switch section to the next generates a compiler error. However, multiple switch labels can be applied to the same switch section, like `case < 0:` in example above. This deliberate design choice allows for concisely handling multiple cases that share the same or interdependent logic. + +In an expression context, you can use the [`switch` expression](../operators/switch-expression.md) to evaluate a single expression from a list of candidate expressions based on a pattern match with an expression.
+ +> [!IMPORTANT] +> Differences between **switch expression** and **switch statement**: +> +> - **switch statement** is used to control the execution flow within a block of code. +> - **switch expression** is typically used in contexts of value return and value assignment, often as a [expression-bodied members](../../programming-guide/statements-expressions-operators/expression-bodied-members.md). +> - a **switch expression** case section cannot be empty, a **switch statement** can. ### Case guards -A case pattern may be not expressive enough to specify the condition for the execution of the switch section. In such a case, you can use a *case guard*. That is an additional condition that must be satisfied together with a matched pattern. A case guard must be a Boolean expression. You specify a case guard after the `when` keyword that follows a pattern, as the following example shows: +A case pattern may not be expressive enough to specify the condition for the execution of the switch section. In such a case, you can use a *case guard*. That is an additional condition that must be satisfied together with a matched pattern. A case guard must be a Boolean expression. You specify a case guard after the `when` keyword that follows a pattern, as the following example shows: :::code language="csharp" source="snippets/selection-statements/SwitchStatement.cs" id="WithCaseGuard"::: diff --git a/docs/csharp/programming-guide/classes-and-structs/partial-classes-and-methods.md b/docs/csharp/programming-guide/classes-and-structs/partial-classes-and-methods.md index faa81d601e6ac..453df520a446a 100644 --- a/docs/csharp/programming-guide/classes-and-structs/partial-classes-and-methods.md +++ b/docs/csharp/programming-guide/classes-and-structs/partial-classes-and-methods.md @@ -148,7 +148,7 @@ partial void OnNameChanged() ## C# Language Specification -For more information, see [Partial types](~/_csharpstandard/standard/classes.md#1527-partial-declarations) and [Partial methods](~/_csharpstandard/standard/classes.md#1569-partial-methods) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. The new features for partial methods are defined in the [feature specification](~/_csharplang/proposals/csharp-9.0/extending-partial-methods.md). +For more information, see [Partial types](~/_csharpstandard/standard/classes.md#1527-partial-type-declarations) and [Partial methods](~/_csharpstandard/standard/classes.md#1569-partial-methods) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. The new features for partial methods are defined in the [feature specification](~/_csharplang/proposals/csharp-9.0/extending-partial-methods.md). ## See also diff --git a/docs/framework/deployment/index.md b/docs/framework/deployment/index.md index 55faecbdbe2a3..0b806bd39b509 100644 --- a/docs/framework/deployment/index.md +++ b/docs/framework/deployment/index.md @@ -63,9 +63,9 @@ Use the following links to other MSDN topics for specific information about depl - For general information, see the [.NET Framework blog](https://devblogs.microsoft.com/dotnet/). -- [Detecting versions](../migration-guide/how-to-determine-which-versions-are-installed.md) +- [Detecting versions](../install/how-to-determine-which-versions-are-installed.md) -- [Detecting service packs and updates](../migration-guide/how-to-determine-which-net-framework-updates-are-installed.md) +- [Detecting service packs and updates](../install/how-to-determine-which-net-framework-updates-are-installed.md) ## Features That Simplify Deployment diff --git a/docs/framework/get-started/index.md b/docs/framework/get-started/index.md index f4e998b7e7bc8..ce03122485ba7 100644 --- a/docs/framework/get-started/index.md +++ b/docs/framework/get-started/index.md @@ -45,7 +45,7 @@ In general, you shouldn't uninstall versions of .NET Framework that are installe - If an app that you use depends on a specific version of .NET Framework, that app may break if that version is removed. -- Some versions of .NET Framework are in-place updates to earlier versions. For example, .NET Framework 3.5 is an in-place update to version 2.0, and .NET Framework 4.8 is an in-place update to versions 4 through 4.7.2. For more information, see [.NET Framework Versions and Dependencies](../migration-guide/versions-and-dependencies.md). +- Some versions of .NET Framework are in-place updates to earlier versions. For example, .NET Framework 3.5 is an in-place update to version 2.0, and .NET Framework 4.8 is an in-place update to versions 4 through 4.7.2. For more information, see [.NET Framework Versions and Dependencies](../install/versions-and-dependencies.md). On Windows versions before Windows 8, if you do choose to remove .NET Framework, always use **Programs and Features** from Control Panel to uninstall it. Never remove a version of .NET Framework manually. On Windows 8 and above, .NET Framework is an operating system component and cannot be independently uninstalled. diff --git a/docs/framework/get-started/system-requirements.md b/docs/framework/get-started/system-requirements.md index c8541b3a90f31..6d209230ff0ba 100644 --- a/docs/framework/get-started/system-requirements.md +++ b/docs/framework/get-started/system-requirements.md @@ -17,7 +17,7 @@ The tables in this article provide the hardware, operating system, and software - .NET Framework 4.7 and its point releases (4.7.1 and 4.7.2). - .NET Framework 4.6.2. -For information on earlier .NET Framework versions, see [.NET Framework versions and dependencies](../migration-guide/versions-and-dependencies.md). +For information on earlier .NET Framework versions, see [.NET Framework versions and dependencies](../install/versions-and-dependencies.md). Development environments that enable you to develop apps for .NET Framework have a separate set of requirements. diff --git a/docs/framework/install/dotnet-35-windows.md b/docs/framework/install/dotnet-35-windows.md index 903f3ed55ab9d..3acb1ce451c29 100644 --- a/docs/framework/install/dotnet-35-windows.md +++ b/docs/framework/install/dotnet-35-windows.md @@ -1,43 +1,73 @@ --- -title: Install .NET Framework 3.5 on Windows 11, 10, 8.1, 8 -description: Learn how to install the .NET Framework 3.5 on Windows 11, Windows 10, Windows 8.1, and Windows 8. -ms.date: 10/06/2021 +title: Install .NET Framework 3.5 on Windows +description: Learn how to install .NET Framework 3.5 on Windows and Windows Server. .NET Framework 3.5 can run apps that target .NET Framework 1.0 through 3.5. +ms.date: 02/10/2025 --- -# Install .NET Framework 3.5 on Windows 11, Windows 10, Windows 8.1, and Windows 8 +# Install .NET Framework 3.5 on Windows and Windows Server -You may need the .NET Framework 3.5 to run an app on Windows 11, Windows 10, Windows 8.1, and Windows 8. You can also use these instructions for earlier Windows versions. +You might need .NET Framework 3.5 to run an app on Windows or Windows Server. Windows and Windows Server come with .NET Framework 4, which doesn't support apps built with .NET Framework 1.1 through 3.5. To run these apps, install .NET Framework 3.5. If you're a developer that requires .NET Framework 3.5, see the section [Developers and .NET Framework 3.5](#developers-and-net-framework-35). -## Install .NET Framework 3.5 on Demand +> [!TIP] +> You might be able to use a config file to force the app to run on .NET Framework 4. For more information, see [Migration: Retarget or Recompile](../migration-guide/migrating-from-the-net-framework-1-1.md#retarget-or-recompile). -You may see the following configuration dialog if you try to run an app that requires .NET Framework 3.5. Choose **Install this feature** to enable .NET Framework 3.5. This option requires an Internet connection. +## Install .NET Framework 3.5 on demand -![Screenshot of the .NET Framework installation dialog.](./media/dotnet-35-windows/dotnet-framework-installation-dialog.png) +You might see the following configuration dialog if you try to run an app that requires an older version of .NET Framework. Depending on your version of Windows, the dialog might be slightly different. Choose **Download and install this feature** to enable .NET Framework 3.5. This option requires an internet connection. + +:::image type="content" source="./media/dotnet-35-windows/dotnet-framework-installation-dialog.png" alt-text="Screenshot of the .NET Framework installation dialog."::: ### Why am I getting this pop-up? -The .NET Framework is created by Microsoft and provides an environment for running applications. There are different versions available. Many companies develop their apps to run using the .NET Framework, and these apps target a specific version. If you see this pop-up, you're trying to run an application that requires .NET Framework version 3.5, but that version is not installed on your system. +.NET Framework is created by Microsoft and provides an environment for running apps. There are different versions available. Many companies develop their apps to run using the .NET Framework, and these apps target a specific version. If you see this pop-up, you're trying to run an app that requires a .NET Framework version that isn't installed on your system. + +## Enable .NET Framework 3.5 on Windows Server + +Enable .NET Framework 3.5 through the **Add Roles and Features Wizard**. -## Enable .NET Framework 3.5 in Control Panel +1. Press the Start :::image type="icon" source="media/dotnet-35-windows/windows-keyboard-logo.png" border="false"::: button on the taskbar. +1. Search for **Add Roles and Features Wizard** and open it. +1. Search for **Windows Features** and open it. The **Turn Windows features on or off** dialog box appears. +1. Navigate through the wizard until you reach **Features**. +1. Select **.NET Framework 3.5 Features** in the list. +1. Select **Install** to start installing .NET Framework 3.5. -You can enable the .NET Framework 3.5 through the Windows Control Panel. This option requires an Internet connection. +:::image type="content" source="media/dotnet-35-windows/server-features.png" alt-text="The Add Roles and Features Wizard dialog box from Windows Server. .NET Framework 3.5 is selected."::: -1. Press the Windows key ![Screenshot of the Windows key logo.](./media/dotnet-35-windows/windows-keyboard-logo.png) on your keyboard, type "Windows Features", and press Enter. The **Turn Windows features on or off** dialog box appears. +## Enable .NET Framework 3.5 on Windows -2. Select the **.NET Framework 3.5 (includes .NET 2.0 and 3.0)** check box, select **OK**, and reboot your computer if prompted. +You can enable the .NET Framework 3.5 through the Windows Control Panel. This option requires an internet connection. - ![Screenshot showing installation of .NET with the control panel.](./media/dotnet-35-windows/dotnet-control-panel.png) +1. Press the Start :::image type="icon" source="media/dotnet-35-windows/windows-keyboard-logo.png" border="false"::: button on the taskbar. +1. Search for **Windows Features** and open it. The **Turn Windows features on or off** dialog box appears. +1. Select the **.NET Framework 3.5 (includes .NET 2.0 and 3.0)** check box, select **OK**, and reboot your computer if prompted. - You don't need to select the child items for **Windows Communication Foundation (WCF) HTTP Activation** and **Windows Communication Foundation (WCF) Non-HTTP Activation** unless you're a developer or server administrator who requires this functionality. +:::image type="content" source="media/dotnet-35-windows/dotnet-control-panel.png" alt-text="Screenshot of the Windows Features dialog box. .NET Framework 3.5 is selected."::: + +You don't need to select the child items for **Windows Communication Foundation (WCF) HTTP Activation** and **Windows Communication Foundation (WCF) Non-HTTP Activation** unless you're a developer or server administrator who requires this functionality. ## Download the offline installer -For Windows versions prior to Windows 10, the .NET Framework 3.5 SP1 offline installer is available on the [.NET Framework 3.5 SP1 Download page](https://dotnet.microsoft.com/download/dotnet-framework/net35-sp1?wt.mc_id=install-docs). +The .NET Framework 3.5 SP1 offline installer is available for Windows versions prior to Windows 10 and Windows Server 2016. For more information, see [.NET Framework 3.5 SP1 Download page](https://dotnet.microsoft.com/download/dotnet-framework/net35-sp1?wt.mc_id=install-docs). ## Troubleshoot the installation -During installation, you may encounter error 0x800f0906, 0x800f0907, 0x800f081f, or 0x800F0922, in which case refer to [.NET Framework 3.5 installation error: 0x800f0906, 0x800f0907, or 0x800f081f](https://support.microsoft.com/help/2734782/net-framework-3-5-installation-error-0x800f0906--0x800f081f--0x800f09) to see how to resolve these issues. +During installation, you might encounter error **0x800f0906**, **0x800f0907**, **0x800f081f**, or **0x800F0922**, in which case refer to [.NET Framework 3.5 installation error](https://support.microsoft.com/help/2734782/net-framework-3-5-installation-error-0x800f0906--0x800f081f--0x800f09) to see how to resolve these issues. -If you still can't resolve your installation issue or you don't have an Internet connection, you can try installing it using your Windows installation media. For more information, see [Deploy .NET Framework 3.5 by using Deployment Image Servicing and Management (DISM)](/windows-hardware/manufacture/desktop/deploy-net-framework-35-by-using-deployment-image-servicing-and-management--dism). If you're using Windows 7, Windows 8.1, the latest release Windows 10, or Windows 11, but you don't have the installation media, create an up-to-date installation media here: [Create installation media for Windows](https://support.microsoft.com/help/15088/windows-create-installation-media). Additional information about Windows 11 and Windows 10 Features on Demand: [Features on Demand](/windows-hardware/manufacture/desktop/features-on-demand-v2--capabilities). +If you still can't resolve your installation issue or you don't have an internet connection, you can try installing it using your Windows installation media. For more information, see [Deploy .NET Framework 3.5 by using Deployment Image Servicing and Management (DISM)](/windows-hardware/manufacture/desktop/deploy-net-framework-35-by-using-deployment-image-servicing-and-management--dism). If you don't have the installation media, follow the instructions on [Create installation media for Windows](https://support.microsoft.com/help/15088/windows-create-installation-media). For more information about Windows 11 and Windows 10 Features on Demand, see [Features on Demand](/windows-hardware/manufacture/desktop/features-on-demand-v2--capabilities). > [!WARNING] > If you're not relying on Windows Update as the source for installing .NET Framework 3.5, you must ensure to strictly use sources from the same corresponding Windows operating system version. Using sources from a different Windows operating system version will either install a mismatched version of .NET Framework 3.5 or cause the installation to fail, leaving the system in an unsupported and unserviceable state. + +## Developers and .NET Framework 3.5 + +If you're a developer that maintains existing software and you need to use .NET Framework 3.5, enable it with the following steps: + +1. Install .NET Framework 3.5 on your system using the instructions in this article. +1. Enable **.NET Framework 3.5 Development Tools** in Visual Studio. It's listed in the **Individual Components** page. + +## See also + +- [Install .NET Framework on Windows and Windows Server](on-windows-and-server.md) +- [Install .NET Framework for developers](guide-for-developers.md) +- [How to: Determine which .NET Framework versions are installed](how-to-determine-which-versions-are-installed.md) +- [Versions and dependencies](versions-and-dependencies.md) diff --git a/docs/framework/install/guide-for-developers.md b/docs/framework/install/guide-for-developers.md index ae2de8e5174b4..7e5d3bfccbf2a 100644 --- a/docs/framework/install/guide-for-developers.md +++ b/docs/framework/install/guide-for-developers.md @@ -11,10 +11,10 @@ ms.assetid: daf9d9d5-84ac-4bd9-a864-27665ffd0f5c --- # Install .NET Framework for developers -.NET is an integral part of many apps running on Windows and provides common functionality for those apps to run. For developers, .NET Framework provides a comprehensive and consistent programming model for building apps that have visually stunning user experiences and seamless and secure communication. +.NET Framework is an integral part of many apps running on Windows and provides common functionality for those apps to run. For developers, .NET Framework provides a comprehensive and consistent programming model for building apps that have visually stunning user experiences and seamless and secure communication. > [!NOTE] -> This article is intended for **developers** who either want to install .NET Framework on their own system or who want to install it with their applications. For **users** interested in installing .NET Framework, see the individual articles that discuss installing .NET Framework on specific operating systems, such as [Install .NET Framework on Windows 10 and Windows Server 2016](on-windows-10.md). +> This article is intended for **developers** who either want to install .NET Framework on their own system or who want to install it with their applications. For **users** interested in installing .NET Framework, see [Install .NET Framework on Windows and Windows Server](on-windows-and-server.md). This article provides links for installing all versions of .NET Framework from .NET Framework 4.5 to .NET Framework 4.8.1 on your computer. If you're a developer, you can also use these links to download and redistribute .NET Framework with your apps. For information on deploying a version of .NET Framework with your app, see [.NET Framework deployment guide for developers](../deployment/deployment-guide-for-developers.md). @@ -22,7 +22,7 @@ This article provides links for installing all versions of .NET Framework from . [!INCLUDE[net-framework-4-versions](../../../includes/net-framework-4x-versions.md)] -For more information about versions of .NET Framework and how to determine which versions are installed on a computer, see [Versions and Dependencies](../migration-guide/versions-and-dependencies.md) and [How to: Determine Which .NET Framework Versions Are Installed](../migration-guide/how-to-determine-which-versions-are-installed.md). +For more information about versions of .NET Framework and how to determine which versions are installed on a computer, see [Versions and Dependencies](../install/versions-and-dependencies.md) and [How to: Determine Which .NET Framework Versions Are Installed](../install/how-to-determine-which-versions-are-installed.md). > [!NOTE] > For information on .NET Framework 3.5, see [Install the .NET Framework 3.5 on Windows 11, Windows 10, Windows 8.1, and Windows 8](dotnet-35-windows.md). diff --git a/docs/framework/migration-guide/how-to-determine-which-net-framework-updates-are-installed.md b/docs/framework/install/how-to-determine-which-net-framework-updates-are-installed.md similarity index 98% rename from docs/framework/migration-guide/how-to-determine-which-net-framework-updates-are-installed.md rename to docs/framework/install/how-to-determine-which-net-framework-updates-are-installed.md index c8b1c1484c9da..66bca7be1ee6c 100644 --- a/docs/framework/migration-guide/how-to-determine-which-net-framework-updates-are-installed.md +++ b/docs/framework/install/how-to-determine-which-net-framework-updates-are-installed.md @@ -109,5 +109,5 @@ KB2600217 ## See also - [How to: Determine which .NET Framework versions are installed](how-to-determine-which-versions-are-installed.md) -- [Install the .NET Framework for developers](../install/guide-for-developers.md) +- [Install the .NET Framework for developers](guide-for-developers.md) - [Versions and dependencies](versions-and-dependencies.md) diff --git a/docs/framework/migration-guide/how-to-determine-which-versions-are-installed.md b/docs/framework/install/how-to-determine-which-versions-are-installed.md similarity index 95% rename from docs/framework/migration-guide/how-to-determine-which-versions-are-installed.md rename to docs/framework/install/how-to-determine-which-versions-are-installed.md index f15ac2e66a40c..d0948a6fb91a3 100644 --- a/docs/framework/migration-guide/how-to-determine-which-versions-are-installed.md +++ b/docs/framework/install/how-to-determine-which-versions-are-installed.md @@ -1,7 +1,7 @@ --- title: Determine which .NET Framework versions are installed description: Use code, regedit.exe, or PowerShell to detect which versions of .NET Framework are installed on a machine by querying the Windows registry. Or, check Control Panel. -ms.date: 04/03/2024 +ms.date: 02/14/2025 dev_langs: - "csharp" - "vb" @@ -116,7 +116,7 @@ To determine whether a *minimum* version of .NET Framework is present, check for 1. Check for a REG_DWORD entry named **Release**. If it exists, then you have .NET Framework 4.5 or later installed. Its value corresponds to a particular version of .NET Framework. In the following figure, for example, the value of the **Release** entry is 528040, which is the release key for .NET Framework 4.8. - ![Registry entry for .NET Framework 4.5](./media/clr-installdir.png ) + :::image type="content" source="./media/how-to-determine-which-versions-are-installed/clr-installdir.png" alt-text="A screenshot of the RegEdit tool showing the registry entry for .NET Framework 4.5"::: #### Use PowerShell to check for a minimum version @@ -142,8 +142,8 @@ The following example checks the value of the **Release** entry in the registry > [!TIP] > Add the directive `using Microsoft.Win32` or `Imports Microsoft.Win32` at the top of your code file if you haven't already done so. -:::code language="csharp" source="snippets/csharp/versions-installed.cs" id="2"::: -:::code language="vb" source="snippets/visual-basic/versions-installed.vb" id="2"::: +:::code language="csharp" source="snippets/how-to-determine-which-versions-are-installed/csharp/Program.cs" id="Get45PlusFromRegistry"::: +:::code language="vb" source="snippets/how-to-determine-which-versions-are-installed/vb/Module1.vb" id="Get45PlusFromRegistry"::: The example displays output like the following: @@ -216,7 +216,7 @@ Notice that the registry path to the .NET Framework 1.0 subkey is different from The following figure shows the subkey and its **Version** value for .NET Framework 3.5. - ![The registry entry for .NET Framework 3.5.](./media/net-4-and-earlier.png) + :::image type="content" source="./media/how-to-determine-which-versions-are-installed/net-4-and-earlier.png" alt-text="A screenshot of the RegEdit tool showing the registry entry for .NET Framework 3.5"::: #### Query the registry using code (older framework versions) @@ -227,8 +227,8 @@ Use the class to The following example finds the versions of .NET Framework 1-4 that are installed: -:::code language="csharp" source="snippets/csharp/versions-installed.cs" id="1"::: -:::code language="vb" source="snippets/visual-basic/versions-installed.vb" id="1"::: +:::code language="csharp" source="snippets/how-to-determine-which-versions-are-installed/csharp/Program.cs" id="GetVersionFromRegistry"::: +:::code language="vb" source="snippets/how-to-determine-which-versions-are-installed/vb/Module1.vb" id="GetVersionFromRegistry"::: The example displays output similar to the following: @@ -341,5 +341,5 @@ Version: 4.0.30319.18010 - [How to: Determine which .NET Framework updates are installed](how-to-determine-which-net-framework-updates-are-installed.md) - [Troubleshoot: Determine which versions and service packs of .NET Framework are installed](/troubleshoot/developer/dotnet/framework/general/determine-dotnet-versions-service-pack-levels) -- [Install .NET Framework for developers](../install/guide-for-developers.md) +- [Install .NET Framework for developers](guide-for-developers.md) - [.NET Framework versions and dependencies](versions-and-dependencies.md) diff --git a/docs/framework/install/includes/server-35.md b/docs/framework/install/includes/server-35.md deleted file mode 100644 index 6f7b8e50dccf5..0000000000000 --- a/docs/framework/install/includes/server-35.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -author: adegeo -ms.author: adegeo -ms.date: 05/31/2024 -ms.topic: include ---- - -.NET Framework 3.5 supports apps built for .NET Framework 1.0 through 3.5. - -Enable .NET Framework 3.5 through the **Add Roles and Features Wizard**. - -1. Open the Start Menu. -1. Search for **Add Roles and Features Wizard** and open it. -1. Navigate through the wizard until you reach **Features**. -1. Select **.NET Framework 3.5 Features** in the list. -1. Finally, select **Install** to start installing .NET Framework 3.5. - -:::image type="content" source="../media/includes-server-35/features.png" alt-text="The Add Roles and Features Wizard dialog box from Windows Server. .NET Framework 3.5 Features is selected."::: diff --git a/docs/framework/install/index.md b/docs/framework/install/index.md index 15b0703fa6764..a49174e2c12f8 100644 --- a/docs/framework/install/index.md +++ b/docs/framework/install/index.md @@ -1,7 +1,7 @@ --- title: .NET Framework installation guide description: Learn about how to install the .NET Framework on Windows, and which versions of Windows support .NET Framework. -ms.date: 05/15/2024 +ms.date: 02/14/2025 --- # Installation guide @@ -9,22 +9,22 @@ You can install .NET Framework on various Windows versions. [!INCLUDE [net-framework-future](../../../includes/net-framework-future.md)] -If you need to install .NET Framework 2.0 through 3.5, see [Install .NET Framework 3.5 on Windows 11, Windows 10, Windows 8.1, and Windows 8](dotnet-35-windows.md). +If you need to install .NET Framework 1.1 through 3.5, see [Install .NET Framework 3.5 on Windows](dotnet-35-windows.md). ## Supported Windows versions -- [Windows 11](on-windows-11.md) (.NET Framework 4.8 included) -- [Windows Server 2022](on-server-2022.md) (.NET Framework 4.8 included) -- [Windows Server 2019](on-server-2019.md) (.NET Framework 4.7.2 included) -- [Windows 10 and Windows Server 2016](on-windows-10.md) -- [Windows 8.1 and Windows Server 2012 R2](on-windows-8-1.md) -- [Windows 8 and Windows Server 2012](on-windows-8.md) +- [Windows 11](on-windows-and-server.md#windows-11) (.NET Framework 4.8 included) +- [Windows 10](on-windows-and-server.md#windows-10) (.NET Framework 4.6.2 through 4.8 included) +- [Windows Server 2025](on-windows-and-server.md#windows-server) (.NET Framework 4.8 included) +- [Windows Server 2022](on-windows-and-server.md#windows-server) (.NET Framework 4.8 included) ## Unsupported Windows versions -- [Windows XP and Windows Server 2003](/previous-versions/dotnet/framework/install/on-windows-xp) +- [Windows 8.1](on-windows-and-server.md#windows-81-8-7-vista-xp) and [Windows Server 2012 R2](on-windows-and-server.md#windows-server) +- [Windows 8](on-windows-and-server.md#windows-81-8-7-vista-xp) and [Windows Server 2012](on-windows-and-server.md#windows-server) - [Windows 7 and Windows Server 2008 R2](/previous-versions/dotnet/framework/install/on-windows-7) - [Windows Vista and Windows Server 2008](/previous-versions/dotnet/framework/install/on-windows-vista) +- [Windows XP and Windows Server 2003](/previous-versions/dotnet/framework/install/on-windows-xp) ## See also diff --git a/docs/framework/install/media/dotnet-35-windows/dotnet-control-panel.png b/docs/framework/install/media/dotnet-35-windows/dotnet-control-panel.png index cdeb8c86303ee..79127ca698e35 100644 Binary files a/docs/framework/install/media/dotnet-35-windows/dotnet-control-panel.png and b/docs/framework/install/media/dotnet-35-windows/dotnet-control-panel.png differ diff --git a/docs/framework/install/media/dotnet-35-windows/dotnet-framework-installation-dialog.png b/docs/framework/install/media/dotnet-35-windows/dotnet-framework-installation-dialog.png index d7b18389f042b..553f39cd39b5e 100644 Binary files a/docs/framework/install/media/dotnet-35-windows/dotnet-framework-installation-dialog.png and b/docs/framework/install/media/dotnet-35-windows/dotnet-framework-installation-dialog.png differ diff --git a/docs/framework/install/media/includes-server-35/features.png b/docs/framework/install/media/dotnet-35-windows/server-features.png similarity index 100% rename from docs/framework/install/media/includes-server-35/features.png rename to docs/framework/install/media/dotnet-35-windows/server-features.png diff --git a/docs/framework/install/media/dotnet-35-windows/windows-keyboard-logo.png b/docs/framework/install/media/dotnet-35-windows/windows-keyboard-logo.png index 5439c2eef747a..c4ceb65eb76e0 100644 Binary files a/docs/framework/install/media/dotnet-35-windows/windows-keyboard-logo.png and b/docs/framework/install/media/dotnet-35-windows/windows-keyboard-logo.png differ diff --git a/docs/framework/migration-guide/media/how-to-determine-which-net-framework-updates-are-installed/windows-keyboard-logo.png b/docs/framework/install/media/how-to-determine-which-net-framework-updates-are-installed/windows-keyboard-logo.png similarity index 100% rename from docs/framework/migration-guide/media/how-to-determine-which-net-framework-updates-are-installed/windows-keyboard-logo.png rename to docs/framework/install/media/how-to-determine-which-net-framework-updates-are-installed/windows-keyboard-logo.png diff --git a/docs/framework/migration-guide/media/clr-installdir.png b/docs/framework/install/media/how-to-determine-which-versions-are-installed/clr-installdir.png similarity index 100% rename from docs/framework/migration-guide/media/clr-installdir.png rename to docs/framework/install/media/how-to-determine-which-versions-are-installed/clr-installdir.png diff --git a/docs/framework/migration-guide/media/net-4-and-earlier.png b/docs/framework/install/media/how-to-determine-which-versions-are-installed/net-4-and-earlier.png similarity index 100% rename from docs/framework/migration-guide/media/net-4-and-earlier.png rename to docs/framework/install/media/how-to-determine-which-versions-are-installed/net-4-and-earlier.png diff --git a/docs/framework/install/on-server-2019.md b/docs/framework/install/on-server-2019.md deleted file mode 100644 index 259f4056653ea..0000000000000 --- a/docs/framework/install/on-server-2019.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: Install .NET Framework on Windows Server 2019 -description: Learn how to install .NET Framework on Windows Server 2019. .NET Framework 4.7.2 is included, but .NET Framework 4.8 can be installed separately. -ms.date: 06/27/2024 ---- - -# Install .NET Framework on Windows Server 2019 - -.NET Framework 4.7.2 is included with Server 2019, and runs any .NET Framework 4.x app. - -## .NET Framework 4.8 - -.NET Framework 4.8 is the last supported version of .NET Framework for Windows Server 2019. - -> [!div class="button"] -> [Download .NET Framework 4.8](https://dotnet.microsoft.com/download/dotnet-framework/net48) - -## .NET Framework 3.5 - -[!INCLUDE [server-35](includes/server-35.md)] - -## See also - -- [.NET Downloads](https://dotnet.microsoft.com/download) -- [Troubleshoot blocked .NET Framework installations and uninstallations](troubleshoot-blocked-installations-and-uninstallations.md) -- [Install .NET Framework for developers](guide-for-developers.md) -- [Determine which .NET Framework versions are installed](../migration-guide/how-to-determine-which-versions-are-installed.md) diff --git a/docs/framework/install/on-server-2022.md b/docs/framework/install/on-server-2022.md deleted file mode 100644 index 8544ff7c21d75..0000000000000 --- a/docs/framework/install/on-server-2022.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: Install .NET Framework on Windows Server 2022 -description: Learn how to install .NET Framework on Windows Server 2022. .NET Framework 4.8 is included, but .NET Framework 4.8.1 can be installed separately. -ms.date: 05/15/2024 ---- - -# Install .NET Framework on Windows Server 2022 - -.NET Framework 4.8 is included with Server 2022, and runs any .NET Framework 4.x app. - -## .NET Framework 4.8.1 - -.NET 4.8.1 is supported on Windows Server 2022. - -> [!div class="button"] -> [Download .NET Framework 4.8.1](https://dotnet.microsoft.com/download/dotnet-framework/net481) - -## .NET Framework 3.5 - -[!INCLUDE [server-35](includes/server-35.md)] - -## See also - -- [.NET Downloads](https://dotnet.microsoft.com/download) -- [Troubleshoot blocked .NET Framework installations and uninstallations](troubleshoot-blocked-installations-and-uninstallations.md) -- [Install .NET Framework for developers](guide-for-developers.md) -- [Determine which .NET Framework versions are installed](../migration-guide/how-to-determine-which-versions-are-installed.md) diff --git a/docs/framework/install/on-server-2025.md b/docs/framework/install/on-server-2025.md deleted file mode 100644 index 3ef79bb19c9bb..0000000000000 --- a/docs/framework/install/on-server-2025.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Install .NET Framework on Windows Server 2025 -description: Learn how to install .NET Framework on Windows Server 2025. -ms.date: 12/05/2024 ---- - -# Install .NET Framework on Windows Server 2025 - -.NET Framework 4.8.1 is included with Server 2025, and runs any .NET Framework 4.x app. - -## .NET Framework 4.8.1 - -.NET 4.8.1 is supported on Windows Server 2025 and newer operating systems. - -## .NET Framework 3.5 - -[!INCLUDE [server-35](includes/server-35.md)] - -## See also - -- [.NET Downloads](https://dotnet.microsoft.com/download) -- [Troubleshoot blocked .NET Framework installations and uninstallations](troubleshoot-blocked-installations-and-uninstallations.md) -- [Install .NET Framework for developers](guide-for-developers.md) -- [Determine which .NET Framework versions are installed](../migration-guide/how-to-determine-which-versions-are-installed.md) diff --git a/docs/framework/install/on-windows-10.md b/docs/framework/install/on-windows-10.md deleted file mode 100644 index 978c6ed357413..0000000000000 --- a/docs/framework/install/on-windows-10.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: Install the .NET Framework on Windows 10 -description: Learn how to install the .NET Framework on Windows 10 or Windows Server 2016. -ms.date: 10/06/2021 ---- -# Install .NET Framework on Windows 10 and Windows Server 2016 and later - -The .NET Framework is required to run many applications on Windows. The instructions in this article should help you install the .NET Framework versions that you need. The [.NET Framework 4.8](https://github.com/Microsoft/dotnet/tree/main/releases/net48) is the latest available version. - -You may have arrived on this page after trying to run an application and seeing a dialog on your machine similar to the following one: - -![This application could not be started](./media/this-application-could-not-be-started.png) - -## .NET Framework 4.8 - -.NET Framework 4.8 is included with: - -- [Windows 10 May 2021 Update](/windows/whats-new/whats-new-windows-10-version-21h1) -- [Windows 10 October 2020 Update](/windows/whats-new/whats-new-windows-10-version-20h2) -- [Windows 10 May 2020 Update](/windows/whats-new/whats-new-windows-10-version-2004) -- [Windows 10 November 2019 Update](/windows/whats-new/whats-new-windows-10-version-1909) -- [Windows 10 May 2019 Update](/windows/whats-new/whats-new-windows-10-version-1903) - -> [!div class="button"] -> [Download .NET Framework 4.8](https://dotnet.microsoft.com/download/dotnet-framework/net48) - -[.NET Framework 4.8](https://dotnet.microsoft.com/download/dotnet-framework/net48) can be used to run applications built for the .NET Framework 4.0 through 4.8. - -You can install [.NET Framework 4.8](https://dotnet.microsoft.com/download/dotnet-framework/net48) on: - -- Windows 10 October 2018 Update (version 1809) -- Windows 10 April 2018 Update (version 1803) -- Windows 10 Fall Creators Update (version 1709) -- Windows 10 Creators Update (version 1703) -- Windows 10 Anniversary Update (version 1607) -- Windows Server 2019 -- Windows Server, version 1809 -- Windows Server, version 1803 -- Windows Server 2016 - -The .NET Framework 4.8 is not supported on: - -- Windows 10 1507 -- Windows 10 1511 - -If you're using Windows 10 1507 or 1511 and you want to install .NET Framework 4.8, you first need to upgrade to a later Windows 10 version. - -## .NET Framework 4.6.2 - -The [.NET Framework 4.6.2](https://dotnet.microsoft.com/download/dotnet-framework/net462) is the latest supported .NET Framework version on Windows 10 1507 and 1511. - -The .NET Framework 4.6.2 supports apps built for the .NET Framework 4.0 through 4.6.2. - -## .NET Framework 3.5 - -Follow the instructions to install [.NET Framework 3.5 on Windows 10](dotnet-35-windows.md). - -The .NET Framework 3.5 supports apps built for the .NET Framework 1.0 through 3.5. - -## Additional information - -.NET Framework 4.x versions are in-place updates to earlier versions. That means the following: - -- You can only have one version of the .NET Framework 4.x installed on your machine. - -- You cannot install an earlier version of the .NET Framework on your machine if a later version is already installed. - -- 4.x versions of the .NET Framework can be used to run applications built for the .NET Framework 4.0 through that version. For example, .NET Framework 4.7 can be used to run applications built for the .NET Framework 4.0 through 4.7. The latest version (the .NET Framework 4.8) can be used to run applications built with all versions of the .NET Framework starting with 4.0. - -For a list of all the versions of the .NET Framework available to download, see the [.NET Downloads](https://dotnet.microsoft.com/download) page. - -## Help - -If you cannot get the correct version of the .NET Framework installed, you can [contact Microsoft for help](mailto:dotnet-install-help@service.microsoft.com?subject=Install-Help). - -## See also - -- [.NET Downloads](https://dotnet.microsoft.com/download) -- [Troubleshoot blocked .NET Framework installations and uninstallations](troubleshoot-blocked-installations-and-uninstallations.md) -- [Install the .NET Framework for developers](guide-for-developers.md) -- [Determine which .NET Framework versions are installed](../migration-guide/how-to-determine-which-versions-are-installed.md) diff --git a/docs/framework/install/on-windows-11.md b/docs/framework/install/on-windows-11.md deleted file mode 100644 index 6257c5de020d1..0000000000000 --- a/docs/framework/install/on-windows-11.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Install .NET Framework on Windows 11 -description: Learn how to install .NET Framework on Windows 11. -ms.date: 10/06/2021 ---- -# Install .NET Framework on Windows 11 - -.NET Framework 4.8 is included with Windows 11, and runs any .NET Framework 4.x app. - -## .NET Framework 4.8.1 - -.NET 4.8.1 is supported on Windows 11, version 22H2 and newer operating systems. - -## .NET Framework 3.5 - -[!INCLUDE [server-35](includes/server-35.md)] - -## See also - -- [.NET Downloads](https://dotnet.microsoft.com/download) -- [Troubleshoot blocked .NET Framework installations and uninstallations](troubleshoot-blocked-installations-and-uninstallations.md) -- [Install .NET Framework for developers](guide-for-developers.md) -- [Determine which .NET Framework versions are installed](../migration-guide/how-to-determine-which-versions-are-installed.md) diff --git a/docs/framework/install/on-windows-8-1.md b/docs/framework/install/on-windows-8-1.md deleted file mode 100644 index b16fe04d263a9..0000000000000 --- a/docs/framework/install/on-windows-8-1.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: Install the .NET Framework on Windows 8.1 -description: Learn how to install .NET Framework on Windows 8.1 -ms.date: 10/06/2021 ---- - -# Install .NET Framework on Windows 8.1 and Windows Server 2012 R2 - -The .NET Framework is required to run many applications on Windows. You can use the following instructions to install it. You may have arrived on this page after trying to run an application and seeing the following dialog on your machine. - -![This application could not be started](./media/this-application-could-not-be-started.png) - -These instructions will help you install the .NET Framework versions you need. [.NET Framework 4.8](https://github.com/Microsoft/dotnet/tree/main/releases/net48) is the latest version. It is supported on Windows 8.1 and Windows Server 2012 R2. It's included with Windows 11 and in Windows 10 starting with the [May 2019 Update](https://support.microsoft.com/help/4028685/windows-10-get-the-update). - -## .NET Framework 4.8 - -> [!div class="button"] -> [Download .NET Framework 4.8](https://dotnet.microsoft.com/download/dotnet-framework/net48) - -[.NET Framework 4.8](https://github.com/Microsoft/dotnet/tree/main/releases/net48) can be used to run applications built for .NET Framework 4.0 or later. - -## .NET Framework 3.5 - -Follow the instructions to install the [.NET Framework 3.5 on Windows 8.1, Windows 10, and Windows 11](dotnet-35-windows.md). - -The .NET Framework 3.5 supports apps built for .NET Framework 1.0 through 3.5. - -## Help - -You can [contact Microsoft for help](mailto:dotnet-install-help@service.microsoft.com?subject=Install-Help) if you cannot get the correct version of the .NET Framework installed. - -## See also - -- [Download the .NET Framework](https://dotnet.microsoft.com/download) -- [Troubleshoot blocked .NET Framework installations and uninstallations](troubleshoot-blocked-installations-and-uninstallations.md) -- [Install the .NET Framework for developers](guide-for-developers.md) diff --git a/docs/framework/install/on-windows-8.md b/docs/framework/install/on-windows-8.md deleted file mode 100644 index 76dd51f203736..0000000000000 --- a/docs/framework/install/on-windows-8.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: Install the .NET Framework on Windows 8 -description: Learn how to install .NET Framework on Windows 8 -ms.date: 10/06/2021 ---- - -# Install .NET Framework on Windows 8 and Windows Server 2012 - -The .NET Framework is required to run many applications on Windows. You can use the following instructions to install it. You may have arrived on this page after trying to run an application and seeing the following dialog on your machine. - -![This application could not be started](./media/this-application-could-not-be-started.png) - -These instructions will help you install the .NET Framework versions you need. [.NET Framework 4.8](https://github.com/Microsoft/dotnet/tree/main/releases/net48) is the latest version. It is supported on Windows Server 2012 but is not supported on Windows 8. It's included with Windows 11 and in Windows 10 starting with the [May 2019 Update](https://support.microsoft.com/help/4028685/windows-10-get-the-update). - -## .NET Framework 4.8 - -> [!div class="button"] -> [Download .NET Framework 4.8](https://dotnet.microsoft.com/download/dotnet-framework/net48) - -.NET Framework 4.8 is supported on Windows Server 2012. It is not supported on Windows 8. - -[.NET Framework 4.8](https://github.com/Microsoft/dotnet/tree/main/releases/net48) can be used to run applications built for .NET Framework 4.0 or later. - -## .NET Framework 4.6 - -The [.NET Framework 4.6](https://dotnet.microsoft.com/download/dotnet-framework/net46) is the latest supported .NET Framework version on Windows 8. - -The .NET Framework 4.6 supports apps built for .NET Framework 4.0 through 4.6. - -## .NET Framework 3.5 - -Follow the instructions to install the [.NET Framework 3.5 on Windows 8, Windows 10, and Windows 11](dotnet-35-windows.md). - -The .NET Framework 3.5 supports apps built for .NET Framework 1.0 through 3.5. - -## Help - -You can [contact Microsoft for help](mailto:dotnet-install-help@service.microsoft.com?subject=Install-Help) if you cannot get the correct version of the .NET Framework installed. - -## See also - -- [Download the .NET Framework](https://dotnet.microsoft.com/download) -- [Troubleshoot blocked .NET Framework installations and uninstallations](troubleshoot-blocked-installations-and-uninstallations.md) -- [Install the .NET Framework for developers](guide-for-developers.md) diff --git a/docs/framework/install/on-windows-and-server.md b/docs/framework/install/on-windows-and-server.md new file mode 100644 index 0000000000000..99aa73baa6deb --- /dev/null +++ b/docs/framework/install/on-windows-and-server.md @@ -0,0 +1,189 @@ +--- +title: Install .NET Framework on Windows +description: Learn how to install .NET Framework on Windows 11, Windows 10, and Windows Server. This article also includes information about .NET Framework and unsupported versions of Windows, such as Windows 8, Windows Vista, and Windows XP. +ms.date: 02/12/2025 +--- +# Install .NET Framework on Windows and Windows Server + +.NET Framework is included on all current versions of Windows and Windows Server. This article helps you understand which version of .NET Framework is included in Windows and Windows Server, and if an upgrade is available. + +The latest version of .NET Framework is 4.8.1. This version of .NET Framework supports all .NET Framework 4 apps. For more information about a specific release of .NET Framework, see [.NET Framework versions and dependencies](versions-and-dependencies.md). + +> [!NOTE] +> .NET Framework is a Windows-only technology, and is separate from .NET (formerly called .NET Core). For more information, see [Introduction to .NET](../../core/introduction.md). + +## Supported versions of .NET Framework + +The following versions of .NET Framework are still supported: + +- [.NET Framework 4.8.1](https://dotnet.microsoft.com/download/dotnet-framework/net481) +- [.NET Framework 4.8](https://dotnet.microsoft.com/download/dotnet-framework/net48) +- [.NET Framework 4.7.2](https://dotnet.microsoft.com/download/dotnet-framework/net472) +- [.NET Framework 4.7.1](https://dotnet.microsoft.com/download/dotnet-framework/net471) +- [.NET Framework 4.7](https://dotnet.microsoft.com/download/dotnet-framework/net47) +- [.NET Framework 4.6.2](https://dotnet.microsoft.com/download/dotnet-framework/net462) (support ends January 12, 2027) +- [.NET Framework 3.5 Service Pack 1](https://dotnet.microsoft.com/download/dotnet-framework/net35-sp1) (support ends January 9, 2029) + +### .NET Framework 3.5 + +.NET Framework 3.5 is still supported by Microsoft, even though it's an older version of .NET Framework. However, only the .NET Framework 3.5 runtime is supported, which runs apps. Developing new apps that target .NET Framework 3.5 isn't supported. This version of .NET Framework supports running apps that target versions 1.0 through 3.5, and can be installed alongside .NET Framework 4. + +If you try to run an app that targets .NET Framework 1.0 through 3.5, and .NET Framework 3.5 is missing, you're prompted to install it. For more information, see [Install .NET Framework 3.5 on Windows](dotnet-35-windows.md). + +### .NET Framework 4.x + +All .NET Framework 4.x versions are in-place updates. Only a single 4.x version can be present on Windows. Because .NET Framework is installed as part of Windows, consider that: + +- If there's a later 4.x version installed on the machine already, you can't install a previous 4.x version. +- If the OS comes preinstalled with a particular .NET Framework version, you can't install a previous 4.x version on the same machine. +- If you install a later version, you don't have to first uninstall the previous version. + +## Developers and Visual Studio + +Visual Studio uses .NET Framework Developer Packs to support targeting specific versions of .NET Framework 4. If you're a developer who must work on a project targeting an old version of .NET Framework 4, install the corresponding developer pack. For more information, see [Install .NET Framework for developers](guide-for-developers.md). + +## Windows 11 + +.NET Framework 4.8 was originally included with Windows 11. Starting with Windows 11 22H2 (released September 2022), .NET Framework 4.8.1 is included. + +In the following table, ❌ represents an unsupported version of Windows 11 and ✔️ represents a supported version of Windows 11. The table also describes which version of .NET Framework is included with Windows 11, and which version of .NET Framework you can upgrade to. + +| Windows 11 version | .NET Framework included | Latest .NET Framework supported | +|-----------------------|-------------------------|---------------------------------| +| ✔️ 24H2 (October 2024) | 4.8.1 | 4.8.1 | +| ✔️ 23H2 (October 2023) | 4.8.1 | 4.8.1 | +| ❌ 22H2 (September 2022) | 4.8.1 | 4.8.1 | +| ❌ 21H2 (October 2021) | 4.8 | 4.8.1 | + +For more information about Windows 11 end-of-support dates, see [Windows 11 Home and Pro Lifecycle](/lifecycle/products/windows-11-home-and-pro) and [Windows Lifecycle FAQ](/lifecycle/faq/windows). + +### Install .NET Framework on Windows 11 + +If you're using Windows 11 21H2, install .NET Framework 4.8.1 by downloading and running the installer. If you're using any other version of Windows 11, the latest .NET Framework is already installed. + +> [!div class="button"] +> [Download .NET Framework 4.8.1](https://dotnet.microsoft.com/download/dotnet-framework/net481) + +If you need to install .NET Framework 3.5, which supports .NET Framework apps 1.0 through 3.5, refer to the [.NET Framework 3.5 section](#net-framework-35). + +For more downloads, see [All downloads](#all-downloads). + +## Windows 10 + +.NET Framework 4.6 was originally included with Windows 10. However, newer releases of Windows 10 included upgraded versions of .NET Framework. + +Windows 10 22H2 is the last supported version of Windows 10. Support ends October 14, 2025. For more information about Windows 10 end-of-support dates, see [Windows 10 Home and Pro Lifecycle](/lifecycle/products/windows-10-home-and-pro) and [Windows Lifecycle FAQ](/lifecycle/faq/windows). + +In the following table, ❌ represents an unsupported version of Windows 10 and ✔️ represents a supported version of Windows 10. The table also describes which version of .NET Framework is included with a particular Windows 10 version, and which version of .NET Framework you can upgrade to. + +| Windows 10 version | .NET Framework included | Latest .NET Framework supported | +|----------------------|-------------------------|---------------------------------| +| ✔️ 22H2 (October 2022) | 4.8 | 4.8.1 | +| ❌ 21H2 (November 2021) | 4.8 | 4.8.1 | +| ❌ 21H1 (May 2021) | 4.8 | 4.8.1 | +| ❌ 20H2 (October 2020) | 4.8 | 4.8.1 | +| ❌ 2004 (May 2020) | 4.8 | 4.8 | +| ❌ 1909 (November 2019) | 4.8 | 4.8 | +| ❌ 1903 (May 2019) | 4.8 | 4.8 | +| ❌ 1809 (October 2018) | 4.7.2 | 4.8 | +| ❌ 1803 (April 2018) | 4.7.2 | 4.8 | +| ❌ 1709 (October 2017) | 4.7.1 | 4.8 | +| ❌ 1703 (April 2017) | 4.7 | 4.8 | +| ❌ 1607 (August 2016) | 4.6.2 | 4.8 | +| ❌ 1511 (November 2015) | 4.6.1 | 4.6.2 | +| ❌ 1507 (July 2015) | 4.6 | 4.6.2 | + +### Install .NET Framework on Windows 10 + +The latest version of .NET Framework is 4.8.1, which can be installed on Windows 10 22H2. + +> [!div class="button"] +> [Download .NET Framework 4.8.1](https://dotnet.microsoft.com/download/dotnet-framework/net481) + +If you need to install .NET Framework 3.5, which supports .NET Framework apps 1.0 through 3.5, refer to the [.NET Framework 3.5 section](#net-framework-35). + +For more downloads, see [All downloads](#all-downloads). + +## Windows Server + +Windows Server, whether it's in support or not, comes with a version of .NET Framework. Only Windows Server 2022 and Windows Server 2025 are supported, and they both support the latest version of .NET Framework. For more information about Windows Server end-of-support dates, see the following articles: + +- [Windows Server 2025 Lifecycle](/lifecycle/products/windows-server-2025) +- [Windows Server 2022 Lifecycle](/lifecycle/products/windows-server-2022) +- [Windows Server 2019 Lifecycle](/lifecycle/products/windows-server-2019) +- [Product Lifecycle Search Query - Windows Server](/lifecycle/products/?products=windows&terms=Windows%20Server) +- [Windows Lifecycle FAQ](/lifecycle/faq/windows). + +In the following table, ❌ represents an unsupported version of Windows Server and ✔️ represents a supported version of Windows Server. The table also describes which version of .NET Framework is included with a particular Windows Server version, and which version of .NET Framework you can upgrade to. + +| Windows Server | .NET Framework included | Latest .NET Framework supported | +|------------------------------|-------------------------|---------------------------------| +| ✔️ Windows Server 2025 | 4.8 | 4.8.1 | +| ✔️ Windows Server 2022 | 4.8 | 4.8.1 | +| ❌ Windows Server 2019 | 4.7.2 | 4.8 | +| ❌ Windows Server, version 1809 | 4.7.2 | 4.8 | +| ❌ Windows Server, version 1803 | 4.7.2 | 4.8 | +| ❌ Windows Server, version 1709 | 4.7.1 | 4.7.2 | +| ❌ Windows Server 2016 | 4.6.2 | 4.8 | +| ❌ Windows Server 2012 R2 | 4.5.1 | 4.8 | +| ❌ Windows Server 2012 | 4.5 | 4.8 | +| ❌ Windows Server 2008 R2 SP1 | 3.5 | 4.8 | +| ❌ Windows Server 2008 SP2 | 2.0 | 4.6 | +| ❌ Windows Server 2003 | 2.0 | 4.0 | + +### Install .NET Framework on Windows Server + +The latest version of .NET Framework is 4.8.1, which can be installed on Windows Server 2025 and Windows Server 2022. + +> [!div class="button"] +> [Download .NET Framework 4.8.1](https://dotnet.microsoft.com/download/dotnet-framework/net481) + +If you need to install .NET Framework 3.5, which supports .NET Framework apps 1.0 through 3.5, refer to the [.NET Framework 3.5 section](#net-framework-35). + +For more downloads, see [All downloads](#all-downloads). + +## Windows 8.1, 8, 7, Vista, XP + +The following table describes which version of .NET Framework was included with these older versions of Windows, and the last release of .NET Framework for that operating system. None of these operating systems are supported. This information is provided for historical purposes. + +| Windows | .NET Framework included | Latest .NET Framework supported | +|----------------|-------------------------|---------------------------------| +| Windows 8.1 | 4.5.1 | 4.8 | +| Windows 8 | 4.5 | 4.6.1 | +| Windows 7 | 3.5 | 4.8 | +| Windows Vista | 3.0 | 4.6 | +| Windows XP SP3 | None | 4.0.3 | +| Windows XP SP2 | None | 3.5 | +| Windows XP | None | 1.0 | + +### Install .NET Framework on older versions of Windows + +Some downloads aren't available for these older versions of windows, and some installers might not run. For example, the latest .NET Framework 4.8 installer might not run on Windows 8.1. You might need to search the internet for older downloads as they're no longer provided by Microsoft. + +For more downloads, see [All downloads](#all-downloads). + +## All downloads + +The following list is a link to each version of .NET Framework that can be downloaded from Microsoft. + +- [.NET Framework 4.8.1](https://dotnet.microsoft.com/download/dotnet-framework/net481) +- [.NET Framework 4.8](https://dotnet.microsoft.com/download/dotnet-framework/net48) +- [.NET Framework 4.7.2](https://dotnet.microsoft.com/download/dotnet-framework/net472) +- [.NET Framework 4.7.1](https://dotnet.microsoft.com/download/dotnet-framework/net471) +- [.NET Framework 4.7](https://dotnet.microsoft.com/download/dotnet-framework/net47) +- [.NET Framework 4.6.2](https://dotnet.microsoft.com/download/dotnet-framework/net462) +- [.NET Framework 4.6.1](https://dotnet.microsoft.com/download/dotnet-framework/net461) +- [.NET Framework 4.6](https://dotnet.microsoft.com/download/dotnet-framework/net46) +- [.NET Framework 4.5.2](https://dotnet.microsoft.com/download/dotnet-framework/net452) +- [.NET Framework 4.5.1](https://dotnet.microsoft.com/download/dotnet-framework/net451) +- [.NET Framework 4.5](https://dotnet.microsoft.com/download/dotnet-framework/net45) +- [.NET Framework 4.0](https://dotnet.microsoft.com/download/dotnet-framework/net40) +- [.NET Framework 3.5 Service Pack 1](https://dotnet.microsoft.com/download/dotnet-framework/net35-sp1) + +Downloads of other versions of .NET Framework are no longer provided by Microsoft. + +## See also + +- [Install .NET Framework for developers](guide-for-developers.md) +- [How to: Determine which .NET Framework versions are installed](how-to-determine-which-versions-are-installed.md) +- [Versions and dependencies](versions-and-dependencies.md) diff --git a/docs/framework/install/run-net-framework-1-1-apps.md b/docs/framework/install/run-net-framework-1-1-apps.md deleted file mode 100644 index 88dc3d00e7409..0000000000000 --- a/docs/framework/install/run-net-framework-1-1-apps.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: "Run .NET Framework 1.1 apps on Windows 8, 8.1, 10, or Windows 11" -description: "Describes how to accommodate apps that require .NET Framework 1.1, which is no longer supported on many versions of the Windows operating system." -ms.date: 10/06/2021 -helpviewer_keywords: - - "Windows 8, running .NET Framework 1.1 apps" - - ".NET Framework 1.1, running on Windows 8" -ms.assetid: fb14e195-fea5-4561-b9a8-60a67283edb9 ---- - -# Run .NET Framework 1.1 apps on Windows 8, Windows 8.1, Windows 10, or Windows 11 - -.NET Framework 1.1 is not supported on the Windows 8, Windows 8.1, Windows Server 2012, Windows Server 2012 R2, Windows 10, or Windows 11 operating systems. In some cases, .NET Framework 1.1 is required for an app to run. In those cases, refer to the [Install .NET Framework 3.5 on Windows article](./dotnet-35-windows.md). - -## Install .NET Framework 1.1 from a CD or download center - -It isn't possible to manually install .NET Framework 1.1 on Windows 8, Windows 8.1, Windows Server 2012, Windows Server 2012 R2, Windows 10, or Windows 11 from a CD or download center. It's no longer supported. If you try to install the package, the following error message is displayed: "Setup cannot continue because this version of the .NET Framework is incompatible with a previously installed one." To solve this problem, install [.NET Framework 3.5 SP1](https://www.microsoft.com/download/details.aspx?id=22). This version includes .NET Framework 2.0 (the release that follows .NET Framework 1.1), which is supported on Windows 8, Windows 8.1, Windows 10, and Windows 11. You should always try to install the app first to determine if it will automatically be updated to a later version of .NET Framework. If it doesn't, contact your ISV for an app update. - -## See also - -- [Migrating from the .NET Framework 1.1](../migration-guide/migrating-from-the-net-framework-1-1.md) -- [Install the .NET Framework 3.5 on Windows 11, Windows 10, Windows 8.1, and Windows 8](../install/dotnet-35-windows.md) diff --git a/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/csharp/App.config b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/csharp/App.config new file mode 100644 index 0000000000000..aee9adf485c91 --- /dev/null +++ b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/csharp/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/csharp/FrameworkVersions.csproj b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/csharp/FrameworkVersions.csproj new file mode 100644 index 0000000000000..286414239b6df --- /dev/null +++ b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/csharp/FrameworkVersions.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {611CF10C-ED53-4AEB-A157-4FE9A686DA0C} + Exe + FrameworkVersions + FrameworkVersions + v4.8.1 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/csharp/Program.cs b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/csharp/Program.cs new file mode 100644 index 0000000000000..c00fae4f9f8ea --- /dev/null +++ b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/csharp/Program.cs @@ -0,0 +1,133 @@ +using System; +using Microsoft.Win32; + +namespace FrameworkVersions +{ + internal class Program + { + static void Main(string[] args) + { + GetVersionFromRegistry(); + Get45PlusFromRegistry(); + } + + private static void GetVersionFromRegistry() + { + // + // Open the registry key for the .NET Framework entry. Dispose this object when done. + RegistryKey ndpKey = + RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32) + .OpenSubKey(@"SOFTWARE\Microsoft\NET Framework Setup\NDP\"); + + foreach (string versionKeyName in ndpKey.GetSubKeyNames()) + { + // Skip .NET Framework 4.5 version information. + if (versionKeyName == "v4") + continue; + + if (versionKeyName.StartsWith("v")) + { + RegistryKey versionKey = ndpKey.OpenSubKey(versionKeyName); + + // Get the .NET Framework version value. + string name = versionKey.GetValue("Version", "").ToString(); + + // Get the service pack (SP) number. + string sp = versionKey.GetValue("SP", "").ToString(); + + // Get the installation flag. + string install = versionKey.GetValue("Install", "").ToString(); + + if (string.IsNullOrEmpty(install)) + { + // No install info; it must be in a child subkey. + Console.WriteLine($"{versionKeyName} {name}"); + } + else if (install == "1") + { + // Install = 1 means the version is installed. + if (!string.IsNullOrEmpty(sp)) + Console.WriteLine($"{versionKeyName} {name} SP{sp}"); + else + Console.WriteLine($"{versionKeyName} {name}"); + } + + if (!string.IsNullOrEmpty(name)) + { + versionKey.Dispose(); + continue; + } + + // Iterate through the subkeys of the version subkey. + foreach (string subKeyName in versionKey.GetSubKeyNames()) + { + RegistryKey subKey = versionKey.OpenSubKey(subKeyName); + name = subKey.GetValue("Version", "").ToString(); + + if (!string.IsNullOrEmpty(name)) + sp = subKey.GetValue("SP", "").ToString(); + + install = subKey.GetValue("Install", "").ToString(); + + if (string.IsNullOrEmpty(install)) + { + // No install info; it must be later. + Console.WriteLine($" {versionKeyName} {name}"); + } + else if (install == "1") + { + if (!string.IsNullOrEmpty(sp)) + Console.WriteLine($" {subKeyName} {name} SP{sp}"); + else + Console.WriteLine($" {subKeyName} {name}"); + } + + // Clean up the subkey object. + subKey.Dispose(); + } + + versionKey.Dispose(); + } + } + + ndpKey.Dispose(); + // + } + + private static void Get45PlusFromRegistry() + { + // + const string subkey = @"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\"; + + using (RegistryKey baseKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32)) + using (RegistryKey ndpKey = baseKey.OpenSubKey(subkey)) + { + if (ndpKey != null && ndpKey.GetValue("Release") != null) + Console.WriteLine($".NET Framework Version: {CheckFor45PlusVersion((int)ndpKey.GetValue("Release"))}"); + else + Console.WriteLine(".NET Framework Version 4.5 or later is not detected."); + } + + // Checking the version using >= enables forward compatibility. + string CheckFor45PlusVersion(int releaseKey) + { + if (releaseKey >= 533320) return "4.8.1 or later"; + if (releaseKey >= 528040) return "4.8"; + if (releaseKey >= 461808) return "4.7.2"; + if (releaseKey >= 461308) return "4.7.1"; + if (releaseKey >= 460798) return "4.7"; + if (releaseKey >= 394802) return "4.6.2"; + if (releaseKey >= 394254) return "4.6.1"; + if (releaseKey >= 393295) return "4.6"; + if (releaseKey >= 379893) return "4.5.2"; + if (releaseKey >= 378675) return "4.5.1"; + if (releaseKey >= 378389) return "4.5"; + + // This code should never execute. A non-null release key should mean + // that 4.5 or later is installed. + return "No 4.5 or later version detected"; + } + // + } + } +} diff --git a/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/csharp/Properties/AssemblyInfo.cs b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/csharp/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000000..6a9b302f8809b --- /dev/null +++ b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/csharp/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("FrameworkVersions")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("FrameworkVersions")] +[assembly: AssemblyCopyright("Copyright © 2025")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("611cf10c-ed53-4aeb-a157-4fe9a686da0c")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/csharp/snippets.5000.json b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/csharp/snippets.5000.json new file mode 100644 index 0000000000000..da9ebf8da2f9d --- /dev/null +++ b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/csharp/snippets.5000.json @@ -0,0 +1,3 @@ +{ + "host": "visualstudio" +} diff --git a/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/App.config b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/App.config new file mode 100644 index 0000000000000..aee9adf485c91 --- /dev/null +++ b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/FrameworkVersions.vbproj b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/FrameworkVersions.vbproj new file mode 100644 index 0000000000000..ee1d8b91545c9 --- /dev/null +++ b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/FrameworkVersions.vbproj @@ -0,0 +1,110 @@ + + + + + Debug + AnyCPU + {03304585-8FEE-4E35-99F3-2EB16C1EBE20} + Exe + FrameworkVersions.Module1 + FrameworkVersions + FrameworkVersions + 512 + Console + v4.8.1 + true + true + + + AnyCPU + true + full + true + true + bin\Debug\ + FrameworkVersions.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + AnyCPU + pdbonly + false + true + true + bin\Release\ + FrameworkVersions.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + On + + + Binary + + + Off + + + On + + + + + + + + + + + + + + + + + + + + + + + + + + + True + Application.myapp + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + + \ No newline at end of file diff --git a/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/Module1.vb b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/Module1.vb new file mode 100644 index 0000000000000..dcf532dc21534 --- /dev/null +++ b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/Module1.vb @@ -0,0 +1,135 @@ +Imports Microsoft.Win32 + +Module Module1 + + Sub Main() + GetVersionFromRegistry() + Get45PlusFromRegistry() + End Sub + + Private Sub GetVersionFromRegistry() + ' + ' Open the registry key for the .NET Framework entry. Dispose this object when done. + Dim ndpKey As RegistryKey = + RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32) _ + .OpenSubKey("SOFTWARE\Microsoft\NET Framework Setup\NDP\") + + For Each versionKeyName In ndpKey.GetSubKeyNames() + ' Skip .NET Framework 4.5 and later. + If versionKeyName = "v4" Then Continue For + + If versionKeyName.StartsWith("v") Then + + Dim versionKey As RegistryKey = ndpKey.OpenSubKey(versionKeyName) + + ' Get the .NET Framework version value. + Dim name = versionKey.GetValue("Version", "").ToString() + + ' Get the service pack (SP) number. + Dim sp = versionKey.GetValue("SP", "").ToString() + + Dim install = versionKey.GetValue("Install", "").ToString() + + If String.IsNullOrEmpty(install) Then + + ' No install info; it must be in a child subkey. + Console.WriteLine($"{versionKeyName} {name}") + + ElseIf install = "1" Then + + ' Install = 1 means the version is installed. + If Not String.IsNullOrEmpty(sp) Then + Console.WriteLine($"{versionKeyName} {name} SP{sp}") + Else + Console.WriteLine($"{versionKeyName} {name}") + End If + + End If + + If Not String.IsNullOrEmpty(name) Then + + versionKey.Dispose() + Continue For + + End If + + ' Iterate through the subkeys of the version subkey. + For Each subKeyName In versionKey.GetSubKeyNames() + + Dim subKey As RegistryKey = versionKey.OpenSubKey(subKeyName) + name = subKey.GetValue("Version", "").ToString() + + If Not String.IsNullOrEmpty(name) Then + sp = subKey.GetValue("SP", "").ToString() + End If + + install = subKey.GetValue("Install", "").ToString() + + If String.IsNullOrEmpty(install) Then + + ' No install info; it must be later. + Console.WriteLine($" {versionKeyName} {name}") + + ElseIf install = "1" Then + + If Not String.IsNullOrEmpty(sp) Then + Console.WriteLine($" {subKeyName} {name} SP{sp}") + Else + Console.WriteLine($" {subKeyName} {name}") + End If + + End If + + ' Clean up the subkey object. + subKey.Dispose() + + Next + + versionKey.Dispose() + + End If + Next + + ndpKey.Dispose() + ' + End Sub + + ' + Private Sub Get45PlusFromRegistry() + Const subkey As String = "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\" + + Using baseKey As RegistryKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32), + ndpKey As RegistryKey = baseKey.OpenSubKey(subkey) + + If ndpKey IsNot Nothing AndAlso ndpKey.GetValue("Release") IsNot Nothing Then + Console.WriteLine($".NET Framework Version: {CheckFor45PlusVersion(ndpKey.GetValue("Release"))}") + Else + Console.WriteLine(".NET Framework Version 4.5 or later is not detected.") + End If + + End Using + + End Sub + + ' Checking the version using >= enables forward compatibility. + Private Function CheckFor45PlusVersion(releaseKey As Integer) As String + Select Case releaseKey + Case >= 533320 : Return "4.8.1 or later" + Case >= 528040 : Return "4.8" + Case >= 461808 : Return "4.7.2" + Case >= 461308 : Return "4.7.1" + Case >= 460798 : Return "4.7" + Case >= 394802 : Return "4.6.2" + Case >= 394254 : Return "4.6.1" + Case >= 393295 : Return "4.6" + Case >= 379893 : Return "4.5.2" + Case >= 378675 : Return "4.5.1" + Case >= 378389 : Return "4.5" + Case Else + Return "No 4.5 or later version detected" + End Select + End Function + ' + + +End Module diff --git a/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/My Project/Application.Designer.vb b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/My Project/Application.Designer.vb new file mode 100644 index 0000000000000..88dd01c78a618 --- /dev/null +++ b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/My Project/Application.Designer.vb @@ -0,0 +1,13 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + diff --git a/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/My Project/Application.myapp b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/My Project/Application.myapp new file mode 100644 index 0000000000000..e62f1a53381ed --- /dev/null +++ b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/My Project/Application.myapp @@ -0,0 +1,10 @@ + + + false + false + 0 + true + 0 + 2 + true + diff --git a/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/My Project/AssemblyInfo.vb b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/My Project/AssemblyInfo.vb new file mode 100644 index 0000000000000..0d5647c957dd7 --- /dev/null +++ b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/My Project/AssemblyInfo.vb @@ -0,0 +1,32 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' General Information about an assembly is controlled through the following +' set of attributes. Change these attribute values to modify the information +' associated with an assembly. + +' Review the values of the assembly attributes + + + + + + + + + + +'The following GUID is for the ID of the typelib if this project is exposed to COM + + +' Version information for an assembly consists of the following four values: +' +' Major Version +' Minor Version +' Build Number +' Revision +' + + + diff --git a/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/My Project/Resources.Designer.vb b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/My Project/Resources.Designer.vb new file mode 100644 index 0000000000000..38fc4dfb7eefc --- /dev/null +++ b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/My Project/Resources.Designer.vb @@ -0,0 +1,62 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My.Resources + + 'This class was auto-generated by the StronglyTypedResourceBuilder + 'class via a tool like ResGen or Visual Studio. + 'To add or remove a member, edit your .ResX file then rerun ResGen + 'with the /str option, or rebuild your VS project. + ''' + ''' A strongly-typed resource class, for looking up localized strings, etc. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Returns the cached ResourceManager instance used by this class. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("FrameworkVersions.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set(ByVal value As Global.System.Globalization.CultureInfo) + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/My Project/Resources.resx b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/My Project/Resources.resx new file mode 100644 index 0000000000000..af7dbebbacef5 --- /dev/null +++ b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/My Project/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/My Project/Settings.Designer.vb b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/My Project/Settings.Designer.vb new file mode 100644 index 0000000000000..58c78a0d4a772 --- /dev/null +++ b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) + +#Region "My.Settings Auto-Save Functionality" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.FrameworkVersions.My.MySettings + Get + Return Global.FrameworkVersions.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/My Project/Settings.settings b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/My Project/Settings.settings new file mode 100644 index 0000000000000..85b890b3c66b9 --- /dev/null +++ b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/My Project/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/snippets.5000.json b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/snippets.5000.json new file mode 100644 index 0000000000000..da9ebf8da2f9d --- /dev/null +++ b/docs/framework/install/snippets/how-to-determine-which-versions-are-installed/vb/snippets.5000.json @@ -0,0 +1,3 @@ +{ + "host": "visualstudio" +} diff --git a/docs/framework/install/troubleshoot-blocked-installations-and-uninstallations.md b/docs/framework/install/troubleshoot-blocked-installations-and-uninstallations.md index 4e568f7649912..df6dc5d627716 100644 --- a/docs/framework/install/troubleshoot-blocked-installations-and-uninstallations.md +++ b/docs/framework/install/troubleshoot-blocked-installations-and-uninstallations.md @@ -17,14 +17,14 @@ In Windows 8 and above, the .NET Framework is an operating system component and > [!IMPORTANT] > Because the 4.x versions of the .NET Framework are in-place updates, you cannot install an earlier version of the .NET Framework 4.x on a system that already has a later version installed. For example, on a system with Windows 10 Fall Creators Update, you cannot install the .NET Framework 4.6.2, since the .NET Framework 4.7.1 is preinstalled with the operating system. -You can determine which versions of the .NET Framework are installed on a system. See [How to: Determine Which .NET Framework Versions Are Installed](../migration-guide/how-to-determine-which-versions-are-installed.md) for more information. +You can determine which versions of the .NET Framework are installed on a system. See [How to: Determine Which .NET Framework Versions Are Installed](../install/how-to-determine-which-versions-are-installed.md) for more information. In this table, 4.5.x refers to the .NET Framework 4.5 and its point releases, 4.5.1, and 4.5.2, 4.6.x refers to the .NET Framework 4.6 and its point releases, 4.6.1 and 4.6.2, 4.7.x refers to the .NET Framework 4.7 and its point releases, 4.7.1 and 4.7.2, and 4.8.x refers to .NET Framework 4.8 and 4.8.1. |Blocking message|For more information or to resolve the issue| |----------------------|--------------------------------------------------| |Uninstalling the Microsoft .NET Framework may cause some applications to cease to function.|In general, you should not uninstall any versions of the .NET Framework that are installed on your computer, because an application you use may depend on a specific version of the .NET Framework. For more information, see [The .NET Framework for users](../get-started/index.md#ForUsers) in the *Getting Started* guide.| -|.NET Framework 4.5.x/4.6.x/4.7.x (ENU) or a later version is already installed on this computer.|No action necessary.

To determine which versions of the .NET Framework are installed on a system, see [How to: Determine Which .NET Framework Versions Are Installed](../migration-guide/how-to-determine-which-versions-are-installed.md).| +|.NET Framework 4.5.x/4.6.x/4.7.x (ENU) or a later version is already installed on this computer.|No action necessary.

To determine which versions of the .NET Framework are installed on a system, see [How to: Determine Which .NET Framework Versions Are Installed](../install/how-to-determine-which-versions-are-installed.md).| |The .NET Framework 4.5.x/4.6.x/4.7.x/4.8.x (*language*) requires the .NET Framework 4.5.x/4.6.x/4.7.x/4.8.x. Please install the .NET Framework 4.5.x/4.6.x/4.7.x/4.8.x from the Download Center and rerun Setup.|You must install the English version of the specified .NET Framework release before installing a language pack. For more information, see the section on [To install language packs](guide-for-developers.md#to-install-language-packs) in the installation guide.| |Cannot install the .NET Framework 4.5.x/4.6.x/4.7.x/4.8.x. Other applications on your computer are not compatible with this program.

-or-

Other applications on your computer are not compatible with this program.|The most likely cause of this message is that a preview or RC version of the .NET Framework was installed. Uninstall the preview or RC version and rerun Setup.| |.NET Framework 4.5.x/4.6.x/4.7.x/4.8.x cannot be uninstalled using this package. To uninstall .NET Framework 4.5.x/4.6.x/4.7.x/4.8.x from your computer, go to **Control Panel**, choose **Programs and Features**, choose **View installed updates**, select Update for Microsoft Windows (KB2828152) and then choose **Uninstall**.|The package you are installing doesn't uninstall preview or RC releases of the .NET Framework.

Uninstall the preview or RC release from Control Panel.| @@ -40,7 +40,7 @@ In this table, 4.5.x refers to the .NET Framework 4.5 and its point releases, 4. |Setup may not run properly because the Windows Update Service is not available on this computer.|The computer may be configured to use Windows Server Update Services (WSUS) instead of Microsoft Windows Update. For more information, see the section for error code 0x800F0906 in [.NET Framework 3.5 installation error: 0x800F0906, 0x800F081F, 0x800F0907](https://support.microsoft.com/help/2734782/net-framework-3-5-installation-error-0x800f0906-0x800f081f-0x800f0907).

Also see [How to update the Windows Update Agent to the latest version](https://support.microsoft.com/help/949104/how-to-update-the-windows-update-agent-to-the-latest-version) on the Microsoft Support website.| |Setup may not run properly because the Background Intelligent Transfer Service (BITS) is not available on this computer.|See [An update is available to fix a Background Intelligent Transfer Service (BITS) crash on a Windows Vista-based computer](https://support.microsoft.com/help/940520/an-update-is-available-to-fix-a-background-intelligent-transfer-servic) on the Microsoft Support website.| |Setup may not run properly because Windows update encountered an error and displayed error code 0x80070643 or 0x643.|See [.NET Framework update installation error: "0x80070643" or "0x643"](https://support.microsoft.com/kb/976982) on the Microsoft Support website.| -|The .NET Framework 4.5.x/4.6.x/4.7.x/4.8.x is already a part of this operating system. You do not need to install the .NET Framework 4.5.x/4.6.x/4.7.x/4.8.x redistributable.|No action.

To determine which versions of the .NET Framework are installed on a system, see [How to: Determine Which .NET Framework Versions Are Installed](../migration-guide/how-to-determine-which-versions-are-installed.md). See [System Requirements](../get-started/system-requirements.md) for supported operating systems.| +|The .NET Framework 4.5.x/4.6.x/4.7.x/4.8.x is already a part of this operating system. You do not need to install the .NET Framework 4.5.x/4.6.x/4.7.x/4.8.x redistributable.|No action.

To determine which versions of the .NET Framework are installed on a system, see [How to: Determine Which .NET Framework Versions Are Installed](../install/how-to-determine-which-versions-are-installed.md). See [System Requirements](../get-started/system-requirements.md) for supported operating systems.| |The .NET Framework 4.5.x/4.6.x/4.7.x/4.8.x is not supported on this operating system.|See [System Requirements](../get-started/system-requirements.md) for supported operating systems.

For failed installations of the .NET Framework on Windows 7, this message typically indicates that Windows 7 SP1 is not installed. On Windows 7 systems, the .NET Framework requires Windows 7 SP1. If you are on Windows 7 and have not yet installed Service Pack 1, you will need to do so before installing the .NET Framework. For information on installing Windows 7 SP1, see [Learn how to install Windows 7 Service Pack 1 (SP1)](https://windows.microsoft.com/windows7/install-windows-7-service-pack-1).| |Your computer is currently running a Server Core installation of Windows Server 2008 operating system. The .NET Framework 4.5.x requires a full release of the operating system or Server Core 2008 R2 SP1. Please install the full version of Windows Server 2008 SP2 or Windows Server 2008 R2 SP1 or Server Core 2008 R2 SP1 and rerun .NET Framework 4.5.x Setup.|The .NET Framework is supported in the Server Core role with Windows Server 2008 R2 SP1 or later. See [System Requirements](../get-started/system-requirements.md).| |The .NET Framework 4.5.x is already a part of this operating system but is currently turned off (Windows Server 2012 only).| Use **Turn Windows features on or off** in the **Control Panel** to turn on .NET Framework 4.5.x. | @@ -72,5 +72,5 @@ The .NET Framework installer cannot run in Program Compatibility mode. To resolv ## See also - [Install the .NET Framework for developers](guide-for-developers.md) -- [How to: Determine Which .NET Framework Versions Are Installed](../migration-guide/how-to-determine-which-versions-are-installed.md) -- [Versions and Dependencies](../migration-guide/versions-and-dependencies.md) +- [How to: Determine Which .NET Framework Versions Are Installed](../install/how-to-determine-which-versions-are-installed.md) +- [Versions and Dependencies](../install/versions-and-dependencies.md) diff --git a/docs/framework/migration-guide/versions-and-dependencies.md b/docs/framework/install/versions-and-dependencies.md similarity index 95% rename from docs/framework/migration-guide/versions-and-dependencies.md rename to docs/framework/install/versions-and-dependencies.md index 8ba432fcdfddf..4d8c01a2b7b3b 100644 --- a/docs/framework/migration-guide/versions-and-dependencies.md +++ b/docs/framework/install/versions-and-dependencies.md @@ -18,7 +18,7 @@ The CLR is identified by its own version number. The .NET Framework version numb > [!TIP] > > - For a complete list of supported operating systems, see [System requirements](../get-started/system-requirements.md). -> - For downloads, see [Install .NET Framework for developers](../install/guide-for-developers.md). +> - For downloads, see [Install .NET Framework for developers](guide-for-developers.md). > - For information about determining which versions of .NET Framework are installed on a computer, see [How to determine which .NET Framework versions are installed](how-to-determine-which-versions-are-installed.md). ## Version information @@ -27,7 +27,7 @@ The tables that follow summarize .NET Framework version history and correlate ea - The check mark icon ✔️ denotes OS versions on which .NET Framework is installed by default. - The plus sign icon ➕ denotes OS versions on which .NET Framework doesn't come installed but can be installed. -- The asterisk **\*** denotes OS versions on which .NET Framework (whether preinstalled or not) must be enabled [in Control Panel](../install/dotnet-35-windows.md) or, for Windows Server, through the Server Manager. +- The asterisk **\*** denotes OS versions on which .NET Framework (whether preinstalled or not) must be enabled [in Control Panel](dotnet-35-windows.md#enable-net-framework-35-on-windows) or, for Windows Server, through the [Server Manager](dotnet-35-windows.md#enable-net-framework-35-on-windows-server). Jump to: @@ -361,7 +361,7 @@ To determine the installed .NET version, use `Release` DWORD 378389. For more in > [!NOTE] > -> - .NET Framework must be enabled on this operating system through [Control Panel (for Windows) or the Server Manager (for Windows Server)](../install/dotnet-35-windows.md#enable-net-framework-35-in-control-panel). +> - .NET Framework must be enabled on this operating system through [Control Panel (for Windows)](dotnet-35-windows.md#enable-net-framework-35-on-windows) or the [Server Manager (for Windows Server)](dotnet-35-windows.md#enable-net-framework-35-on-windows-server). > - In general, you should not uninstall any versions of .NET Framework that are installed on your computer, because an application you use may depend on a specific version and may break if that version is removed. You can load multiple versions of .NET Framework on a single computer at the same time. This means that you can install .NET Framework without having to uninstall previous versions. For more information, see [Getting Started](../get-started/index.md). ## Remarks for version 4.5 and later @@ -377,13 +377,13 @@ The following guidelines apply: > [!NOTE] > .NET Framework 4.5.1 and .NET Framework 4.5 are used here only as examples. The principle described applies to any app that targets a later version of .NET Framework than the one installed on the system on which it's running. -Some changes in .NET Framework may require changes to your app code; see [Application Compatibility](application-compatibility.md) before you run your existing apps with .NET Framework 4.5 or later versions. For more information about installing the current version, see [Install the .NET Framework for developers](../install/guide-for-developers.md). For information about support for the .NET Framework, see [.NET Framework official support policy](https://dotnet.microsoft.com/platform/support/policy/dotnet-framework) on the .NET website. +Some changes in .NET Framework may require changes to your app code; see [Application Compatibility](../migration-guide/application-compatibility.md) before you run your existing apps with .NET Framework 4.5 or later versions. For more information about installing the current version, see [Install the .NET Framework for developers](guide-for-developers.md). For information about support for the .NET Framework, see [.NET Framework official support policy](https://dotnet.microsoft.com/platform/support/policy/dotnet-framework) on the .NET website. ## Remarks for older versions .NET Framework versions 2.0, 3.0, and 3.5 are built with the same version of the CLR (CLR 2.0). These versions represent successive layers of a single installation. Each version is built incrementally on top of the earlier versions. It's not possible to run versions 2.0, 3.0, and 3.5 side by side on a computer. When you install version 3.5, you get the 2.0 and 3.0 layers automatically, and apps that were built for versions 2.0, 3.0, and 3.5 can all run on version 3.5. However, .NET Framework 4 ends this layering approach, and it and later releases (.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, and 4.8) also represent successive layers of a single installation. Starting with .NET Framework 4, you can use in-process, side by side hosting to run multiple versions of the CLR in a single process. For more information, see [Assemblies and Side-by-Side Execution](../../standard/assembly/side-by-side-execution.md). -In addition, if your app targets version 2.0, 3.0, or 3.5, your users may be required to enable .NET Framework 3.5 on a Windows 8, Windows 8.1, or Windows 10 computer before they can run your app. For more information, see [Install the .NET Framework 3.5 on Windows 11, Windows 10, Windows 8.1, and Windows 8](../install/dotnet-35-windows.md). +In addition, if your app targets version 2.0, 3.0, or 3.5, your users may be required to enable .NET Framework 3.5 on a Windows 8, Windows 8.1, or Windows 10 computer before they can run your app. For more information, see [Install the .NET Framework 3.5 on Windows 11, Windows 10, Windows 8.1, and Windows 8](dotnet-35-windows.md). [!INCLUDE [net-framework-vs](../../../includes/net-framework-vs.md)] @@ -399,6 +399,6 @@ In addition, if your app targets version 2.0, 3.0, or 3.5, your users may be req ## See also -- [Version compatibility](version-compatibility.md) +- [Version compatibility](../migration-guide/version-compatibility.md) - [.NET Framework official support policy](https://dotnet.microsoft.com/platform/support/policy/dotnet-framework) -- [Troubleshoot blocked .NET Framework installations and uninstallations](../install/troubleshoot-blocked-installations-and-uninstallations.md) +- [Troubleshoot blocked .NET Framework installations and uninstallations](troubleshoot-blocked-installations-and-uninstallations.md) diff --git a/docs/framework/migration-guide/application-compatibility.md b/docs/framework/migration-guide/application-compatibility.md index 5eefc02d2d361..5b6c27c9a0030 100644 --- a/docs/framework/migration-guide/application-compatibility.md +++ b/docs/framework/migration-guide/application-compatibility.md @@ -51,6 +51,6 @@ A change that has no noticeable effect on the app's developer or user. The app s ## See also -- [Versions and dependencies](versions-and-dependencies.md) +- [Versions and dependencies](../install/versions-and-dependencies.md) - [What's new](../whats-new/index.md) - [What's obsolete](../whats-new/whats-obsolete.md) diff --git a/docs/framework/migration-guide/how-to-configure-an-app-to-support-net-framework-4-or-4-5.md b/docs/framework/migration-guide/how-to-configure-an-app-to-support-net-framework-4-or-4-5.md index 87bcb7a1ea961..037242031bc5d 100644 --- a/docs/framework/migration-guide/how-to-configure-an-app-to-support-net-framework-4-or-4-5.md +++ b/docs/framework/migration-guide/how-to-configure-an-app-to-support-net-framework-4-or-4-5.md @@ -6,6 +6,7 @@ helpviewer_keywords: - "configuring apps to support .NET Framework" - ".NET Framework, configuring apps" ms.assetid: 63c6b9a8-0088-4077-9aa3-521ab7290f79 +no-loc: [".config", "MyExecutable.exe", "MyExecutable.exe.config"] --- # How to: Configure an App to Support .NET Framework 4 or later versions @@ -25,7 +26,7 @@ All apps that host the common language runtime (CLR) need to start, or *activate If the version of the .NET Framework that the app was built on is not present and a configuration file does not specify a version in a [\ element](../configure-apps/file-schema/startup/supportedruntime-element.md), the app tries to run on the latest version of the .NET Framework that is present on the user's computer. - However, .NET Framework 1.0, 1.1, 2.0, 3.0, and 3.5 apps do not automatically run on the .NET Framework 4 or later, and in some cases, the user may receive an error and may be prompted to install .NET Framework 3.5. The activation behavior may also depend on the user’s operating system, because different versions of Windows system include different versions of the .NET Framework. If your app supports both the .NET Framework 3.5 and 4 or later, we recommend that you indicate this with multiple entries in the configuration file to avoid .NET Framework initialization errors. For more information, see [Versions and Dependencies](versions-and-dependencies.md). + However, .NET Framework 1.0, 1.1, 2.0, 3.0, and 3.5 apps do not automatically run on the .NET Framework 4 or later, and in some cases, the user may receive an error and may be prompted to install .NET Framework 3.5. The activation behavior may also depend on the user’s operating system, because different versions of Windows system include different versions of the .NET Framework. If your app supports both the .NET Framework 3.5 and 4 or later, we recommend that you indicate this with multiple entries in the configuration file to avoid .NET Framework initialization errors. For more information, see [Versions and Dependencies](../install/versions-and-dependencies.md). You might also want to configure your .NET Framework 3.5 apps to run on the .NET Framework 4 or later versions, even on computers that have the .NET Framework 3.5 installed, to take advantage of the performance improvements in versions 4 and later versions. @@ -34,35 +35,34 @@ All apps that host the common language runtime (CLR) need to start, or *activate For information about modifying your .NET Framework 1.0 and 1.1 apps to support Windows 7 and Windows 8, see [Migrating from the .NET Framework 1.1](migrating-from-the-net-framework-1-1.md). -## To configure your app to run on the .NET Framework 4 or later versions +## Run your app on .NET Framework 4.x -1. Add or locate the configuration file for the .NET Framework project. The configuration file for an app is in the same directory and has the same name as the app, but has a .config extension. For example, for an app named MyExecutable.exe, the application configuration file is named MyExecutable.exe.config. +1. Add or locate the configuration file for the .NET Framework project. - To add a configuration file, on the Visual Studio menu bar, choose **Project**, **Add New Item**. Choose **General** from the left pane, and then choose **Configuration File**. Name the configuration file *App.config*. These menu choices are not available for Windows Store app or Windows phone app projects, because you cannot change the activation policy on those platforms. + The configuration file for an app is an XML file that's in the same directory and has the same file name as the app, but with a _.config_ extension. For example, for an app named _MyExecutable.exe_, the application configuration file is named _MyExecutable.exe.config_. -2. Add the [\](../configure-apps/file-schema/startup/supportedruntime-element.md) element as follows to the application configuration file: + To add a configuration file in Visual Studio, find the menu bar and select **Project** > **Add New Item**. Choose **General** from the left pane, and then select **Configuration File**. Name the configuration file *App.config*. These menu choices aren't available for Windows Store apps because you cannot change the activation policy on that platform. - ```xml - - - - - - ``` +1. Add the [\](../configure-apps/file-schema/startup/supportedruntime-element.md) element as follows to the application configuration file: - where *\* specifies the CLR version that aligns with the .NET Framework version that your app supports. Use the following strings: + ```xml + + + + + + ``` - - .NET Framework 1.0: "v1.0.3705" + *\* specifies the CLR version that aligns with the .NET Framework version that your app supports. Use the following strings: - - .NET Framework 1.1: "v1.1.4322" + - .NET Framework 1.0: "v1.0.3705" + - .NET Framework 1.1: "v1.1.4322" + - .NET Framework 2.0, 3.0, and 3.5: "v2.0.50727" + - .NET Framework 4 and later versions: "v4.0" - - .NET Framework 2.0, 3.0, and 3.5: "v2.0.50727" + You can add multiple [\](../configure-apps/file-schema/startup/supportedruntime-element.md) elements, listed in order of preference, to specify support for multiple versions of the .NET Framework. - - .NET Framework 4 and later versions: "v4.0" - - You can add multiple [\](../configure-apps/file-schema/startup/supportedruntime-element.md) elements, listed in order of preference, to specify support for multiple versions of the .NET Framework. - - The following table demonstrates how application configuration file settings and the .NET Framework versions installed on a computer determine the version that a .NET Framework 3.5 app runs on. The examples are specific to a .NET Framework 3.5 application, but you can use similar logic to target applications built with earlier .NET Framework versions. Note that the .NET Framework 2.0 version number (v2.0.50727) is used to specify the .NET Framework 3.5 in the application configuration file. +The following table demonstrates how application configuration file settings and the .NET Framework versions installed on a computer determine the version that a .NET Framework 3.5 app runs on. The examples are specific to a .NET Framework 3.5 application, but you can use similar logic to target applications built with earlier .NET Framework versions. Note that the .NET Framework 2.0 version number (v2.0.50727) is used to specify the .NET Framework 3.5 in the application configuration file. |App.config file setting|On computer with version 3.5 installed|On computer with versions 3.5 and 4 or later versions installed|On computer with version 4 or later versions installed| |-|-|-|-| diff --git a/docs/framework/migration-guide/index.md b/docs/framework/migration-guide/index.md index b02d180a2478f..93ac2e38f4bb2 100644 --- a/docs/framework/migration-guide/index.md +++ b/docs/framework/migration-guide/index.md @@ -17,7 +17,7 @@ However, some changes in .NET Framework require changes to your code. You may al Review the following documents before you migrate your app from earlier versions of .NET Framework to version 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, or 4.8.1: -- See [Versions and Dependencies](versions-and-dependencies.md) to understand the CLR version underlying each version of the .NET Framework and to review guidelines for targeting your apps successfully. +- See [Versions and Dependencies](../install/versions-and-dependencies.md) to understand the CLR version underlying each version of .NET Framework and to review guidelines for targeting your apps successfully. - Review [Application compatibility](application-compatibility.md) to find out about runtime and retargeting changes that might affect your app and how to handle them. @@ -30,7 +30,7 @@ Review the following documents before you migrate your app from earlier versions - [Application compatibility](application-compatibility.md) - [Migrating from the .NET Framework 1.1](migrating-from-the-net-framework-1-1.md) - [Version Compatibility](version-compatibility.md) -- [Versions and Dependencies](versions-and-dependencies.md) +- [Versions and Dependencies](../install/versions-and-dependencies.md) - [How to: Configure an app to support .NET Framework 4 or later versions](how-to-configure-an-app-to-support-net-framework-4-or-4-5.md) - [What's New](../whats-new/index.md) - [What's Obsolete in the Class Library](../whats-new/whats-obsolete.md) diff --git a/docs/framework/migration-guide/migrating-from-the-net-framework-1-1.md b/docs/framework/migration-guide/migrating-from-the-net-framework-1-1.md index d6eb4276327ce..8e28e14e06106 100644 --- a/docs/framework/migration-guide/migrating-from-the-net-framework-1-1.md +++ b/docs/framework/migration-guide/migrating-from-the-net-framework-1-1.md @@ -1,43 +1,50 @@ --- -title: "Migrating from the .NET Framework 1.1" +title: "Migrate from .NET Framework 1.1, 2.0, and 3.5" description: Learn about the steps required to run an application compiled using .NET Framework 1.1 on Windows 7 or later. -ms.date: "03/30/2017" +ms.date: 02/14/2025 helpviewer_keywords: - ".NET Framework 4.5, migrating from 1.1" - ".NET Framework 1.1, migrating to .NET Framework 4.5" ms.assetid: 7ead0cb3-3b19-414a-8417-a1c1fa198d9e +no-loc: [".config", "MyExecutable.exe", "MyExecutable.exe.config"] --- -# Migrate from the .NET Framework 1.1 +# Migrate from .NET Framework 1.1, 2.0, and 3.5 to .NET Framework 4 -Windows 7 and later versions of the Windows operating system do not support .NET Framework 1.1. As a result, applications that target the .NET Framework 1.1 will not run without modification on Windows 7 or later operating system versions. This topic discusses the steps required to run an application that targets the .NET Framework 1.1 under Windows 7 and later versions of the Windows operating system. For more information about the .NET Framework 1.1 and Windows 8, see [Run .NET Framework 1.1 Apps on Windows 8 and later versions](../install/run-net-framework-1-1-apps.md). +Windows no longer supports .NET Framework 1.1 and 2.0. As a result, applications that target older .NET Framework versions won't run without explicitly installing .NET Framework 3.5. However, it's recommended that you upgrade the app to .NET Framework 4. This article discusses the steps required to run an application that targets an old version .NET Framework. ## Retarget or recompile -There are two ways to get an application that was compiled using the .NET Framework 1.1 to run on Windows 7 or a later Windows operating system: +There are two ways to get an application that was compiled using .NET Framework 1.1 to run on Windows 7 or a later Windows operating system: -- Retarget the application to run under .NET Framework 4 and later versions. Retargeting requires that you add a [\](../configure-apps/file-schema/startup/supportedruntime-element.md) element to the application's configuration file that allows it to run under .NET Framework 4 and later versions. Such a configuration file takes the following form: +- Retarget the application to run under .NET Framework 4 and later versions. - ```xml - - - - - - ``` + Retargeting requires that you add a [\](../configure-apps/file-schema/startup/supportedruntime-element.md) element to the application's configuration file that allows it to run under .NET Framework 4 and later versions. -- Recompile the application with a compiler that targets the .NET Framework 4 or a later version. If you originally used Visual Studio 2003 to develop and compile your solution, you can open the solution in Visual Studio 2010 (and possibly later versions too) and use the **Project Compatibility** dialog box to convert the solution and project files from the formats used by Visual Studio 2003 to the Microsoft Build Engine (MSBuild) format. + The configuration file for an app is an XML file that's in the same directory and has the same file name as the app, but with a _.config_ extension. For example, for an app named _MyExecutable.exe_, the application configuration file is named _MyExecutable.exe.config_. -Regardless of whether you prefer to recompile or retarget your application, you must determine whether your application is affected by any changes introduced in later versions of the .NET Framework. These changes are of two kinds: + Such a configuration file takes the following form: -- Breaking changes that occurred between the .NET Framework 1.1 and later versions of the .NET Framework. + ```xml + + + + + + ``` -- Types and type members that have been marked as deprecated or obsolete between the .NET Framework 1.1 and later versions of the .NET Framework. +- Recompile the application with a compiler that targets .NET Framework 4 or a later version. If you originally used Visual Studio 2003 to develop and compile your solution, you can open the solution in Visual Studio 2010 (and possibly later versions too) and use the **Project Compatibility** dialog box to convert the solution and project files from the formats used by Visual Studio 2003 to the Microsoft Build Engine (MSBuild) format. -Whether you retarget your application or recompile it, you should review both the breaking changes and the obsolete types and members for each version of the .NET Framework that was released after .NET Framework 1.1. + Regardless of whether you prefer to recompile or retarget your application, you must determine whether your application is affected by any changes introduced in later versions of .NET Framework. These changes are of two kinds: + +- Breaking changes that occurred between .NET Framework 1.1 and later versions of .NET Framework. + +- Types and type members that have been marked as deprecated or obsolete between .NET Framework 1.1 and later versions of .NET Framework. + +Whether you retarget your application or recompile it, you should review both the breaking changes and the obsolete types and members for each version of .NET Framework that was released after .NET Framework 1.1. ## Breaking changes -When a breaking change occurs, depending on the specific change, a workaround may be available both for retargeted and recompiled applications. In some cases, you can add a child element to the [\](../configure-apps/file-schema/startup/supportedruntime-element.md) element of your application's configuration file to restore the previous behavior. For example, the following configuration file restores the string sorting and comparison behavior used in the .NET Framework 1.1 and can be used either with a retargeted or a recompiled application. +When a breaking change occurs, depending on the specific change, a workaround may be available both for retargeted and recompiled applications. In some cases, you can add a child element to the [\](../configure-apps/file-schema/startup/supportedruntime-element.md) element of your application's configuration file to restore the previous behavior. For example, the following configuration file restores the string sorting and comparison behavior used in .NET Framework 1.1 and can be used either with a retargeted or a recompiled application. ```xml @@ -53,12 +60,12 @@ To assess the impact of possible breaking changes on your application, you must - [Breaking Changes in .NET Framework 2.0](/previous-versions/aa570326(v=msdn.10)) documents changes in .NET Framework 2.0 SP1 that can affect an application that targets .NET Framework 1.1. -- [Changes in .NET Framework 3.5 SP1](/previous-versions/dotnet/articles/dd310284(v=msdn.10)) documents changes between the .NET Framework 3.5 and the .NET Framework 3.5 SP1. +- [Changes in .NET Framework 3.5 SP1](/previous-versions/dotnet/articles/dd310284(v=msdn.10)) documents changes between .NET Framework 3.5 and .NET Framework 3.5 SP1. -- [.NET Framework 4 Migration Issues](net-framework-4-migration-issues.md) documents changes between the .NET Framework 3.5 SP1 and the .NET Framework 4. +- [.NET Framework 4 Migration Issues](net-framework-4-migration-issues.md) documents changes between .NET Framework 3.5 SP1 and .NET Framework 4. ## Obsolete types and members The impact of deprecated types and members is somewhat different for retargeted applications and recompiled applications. The use of obsolete types and members will not affect a retargeted application unless the obsolete type or member has been physically removed from its assembly. Recompiling an application that uses obsolete types or members usually produces a compiler warning rather than a compiler error. However, in some cases, it produces a compiler error, and code that uses the obsolete type or member does not compile successfully. In this case, you must rewrite the source code that calls the obsolete type or member before you recompile your application. For more information about obsolete types and members, see [What's Obsolete in the Class Library](../whats-new/whats-obsolete.md). -To assess the impact of types and members that have been deprecated since the release of the .NET Framework 2.0 SP1, see [What's Obsolete in the Class Library](../whats-new/whats-obsolete.md). Review the lists of obsolete types and member for the .NET Framework 2.0 SP1, .NET Framework 3.5, and the .NET Framework 4. +To assess the impact of types and members that have been deprecated since the release of .NET Framework 2.0 SP1, see [What's Obsolete in the Class Library](../whats-new/whats-obsolete.md). Review the lists of obsolete types and member for .NET Framework 2.0 SP1, .NET Framework 3.5, and .NET Framework 4. diff --git a/docs/framework/migration-guide/mitigation-product-versioning.md b/docs/framework/migration-guide/mitigation-product-versioning.md index 79dc449f87372..14111daa1b9d5 100644 --- a/docs/framework/migration-guide/mitigation-product-versioning.md +++ b/docs/framework/migration-guide/mitigation-product-versioning.md @@ -24,7 +24,7 @@ The following are the detailed changes: In general, applications should depend on the recommended techniques for detecting such things as the runtime version of the .NET Framework and the installation directory: -- To detect the runtime version of the .NET Framework, see [How to: Determine Which .NET Framework Versions Are Installed](how-to-determine-which-versions-are-installed.md). +- To detect the runtime version of the .NET Framework, see [How to: Determine Which .NET Framework Versions Are Installed](../install/how-to-determine-which-versions-are-installed.md). - To determine the installation path for the .NET Framework, use the value of the `InstallPath` entry in the `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full` key. diff --git a/docs/framework/migration-guide/snippets/csharp/FrameworkVersions.csproj b/docs/framework/migration-guide/snippets/csharp/FrameworkVersions.csproj deleted file mode 100644 index f2217a78a7de8..0000000000000 --- a/docs/framework/migration-guide/snippets/csharp/FrameworkVersions.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - Exe - net7.0-windows - - - - - - - diff --git a/docs/framework/migration-guide/snippets/csharp/versions-installed.cs b/docs/framework/migration-guide/snippets/csharp/versions-installed.cs deleted file mode 100644 index b951f15025c62..0000000000000 --- a/docs/framework/migration-guide/snippets/csharp/versions-installed.cs +++ /dev/null @@ -1,145 +0,0 @@ -using Microsoft.Win32; -using System; - -public static class VersionTest -{ - public static void Main() - { - GetVersionFromRegistry(); - //Get45PlusFromRegistry(); - } - - private static void GetVersionFromRegistry() - { - // - // Open the registry key for the .NET Framework entry. - using (RegistryKey ndpKey = - RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32). - OpenSubKey(@"SOFTWARE\Microsoft\NET Framework Setup\NDP\")) - { - foreach (var versionKeyName in ndpKey.GetSubKeyNames()) - { - // Skip .NET Framework 4.5 version information. - if (versionKeyName == "v4") - { - continue; - } - - if (versionKeyName.StartsWith("v")) - { - RegistryKey versionKey = ndpKey.OpenSubKey(versionKeyName); - - // Get the .NET Framework version value. - var name = (string)versionKey.GetValue("Version", ""); - // Get the service pack (SP) number. - var sp = versionKey.GetValue("SP", "").ToString(); - - // Get the installation flag. - var install = versionKey.GetValue("Install", "").ToString(); - if (string.IsNullOrEmpty(install)) - { - // No install info; it must be in a child subkey. - Console.WriteLine($"{versionKeyName} {name}"); - } - else if (install == "1") - { - // Install = 1 means the version is installed. - - if (!string.IsNullOrEmpty(sp)) - { - Console.WriteLine($"{versionKeyName} {name} SP{sp}"); - } - else - { - Console.WriteLine($"{versionKeyName} {name}"); - } - } - - if (!string.IsNullOrEmpty(name)) - { - continue; - } - // else print out info from subkeys... - - // Iterate through the subkeys of the version subkey. - foreach (var subKeyName in versionKey.GetSubKeyNames()) - { - RegistryKey subKey = versionKey.OpenSubKey(subKeyName); - name = (string)subKey.GetValue("Version", ""); - if (!string.IsNullOrEmpty(name)) - sp = subKey.GetValue("SP", "").ToString(); - - install = subKey.GetValue("Install", "").ToString(); - if (string.IsNullOrEmpty(install)) - { - // No install info; it must be later. - Console.WriteLine($" {versionKeyName} {name}"); - } - else if (install == "1") - { - if (!string.IsNullOrEmpty(sp)) - { - Console.WriteLine($" {subKeyName} {name} SP{sp}"); - } - else - { - Console.WriteLine($" {subKeyName} {name}"); - } - } - } - } - } - } - // - } - - private static void Get45PlusFromRegistry() - { - // - const string subkey = @"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\"; - - using (var baseKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32)) - using (var ndpKey = baseKey.OpenSubKey(subkey)) - { - if (ndpKey != null && ndpKey.GetValue("Release") != null) - { - Console.WriteLine($".NET Framework Version: {CheckFor45PlusVersion((int)ndpKey.GetValue("Release"))}"); - } - else - { - Console.WriteLine(".NET Framework Version 4.5 or later is not detected."); - } - } - - // Checking the version using >= enables forward compatibility. - string CheckFor45PlusVersion(int releaseKey) - { - if (releaseKey >= 533320) - return "4.8.1 or later"; - if (releaseKey >= 528040) - return "4.8"; - if (releaseKey >= 461808) - return "4.7.2"; - if (releaseKey >= 461308) - return "4.7.1"; - if (releaseKey >= 460798) - return "4.7"; - if (releaseKey >= 394802) - return "4.6.2"; - if (releaseKey >= 394254) - return "4.6.1"; - if (releaseKey >= 393295) - return "4.6"; - if (releaseKey >= 379893) - return "4.5.2"; - if (releaseKey >= 378675) - return "4.5.1"; - if (releaseKey >= 378389) - return "4.5"; - // This code should never execute. A non-null release key should mean - // that 4.5 or later is installed. - return "No 4.5 or later version detected"; - } - // - } -} diff --git a/docs/framework/migration-guide/snippets/visual-basic/FrameworkVersions.vbproj b/docs/framework/migration-guide/snippets/visual-basic/FrameworkVersions.vbproj deleted file mode 100644 index 07a9b28389fef..0000000000000 --- a/docs/framework/migration-guide/snippets/visual-basic/FrameworkVersions.vbproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - Exe - FrameworkVersions - net7.0-windows - - - - - - - diff --git a/docs/framework/migration-guide/snippets/visual-basic/versions-installed.vb b/docs/framework/migration-guide/snippets/visual-basic/versions-installed.vb deleted file mode 100644 index b760cc9194923..0000000000000 --- a/docs/framework/migration-guide/snippets/visual-basic/versions-installed.vb +++ /dev/null @@ -1,116 +0,0 @@ -Imports Microsoft.Win32 - -Module Program - Sub Main() - GetVersionFromRegistry() - Get45PlusFromRegistry() - End Sub - - Private Sub GetVersionFromRegistry() - ' - ' Opens the registry key for the .NET Framework entry. - Using ndpKey As RegistryKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32). - OpenSubKey("SOFTWARE\Microsoft\NET Framework Setup\NDP\") - - For Each versionKeyName In ndpKey.GetSubKeyNames() - ' Skip .NET Framework 4.5 and later. - If versionKeyName = "v4" Then Continue For - - If versionKeyName.StartsWith("v") Then - Dim versionKey As RegistryKey = ndpKey.OpenSubKey(versionKeyName) - ' Get the .NET Framework version value. - Dim name = DirectCast(versionKey.GetValue("Version", ""), String) - ' Get the service pack (SP) number. - Dim sp = versionKey.GetValue("SP", "").ToString() - - Dim install = versionKey.GetValue("Install", "").ToString() - If String.IsNullOrEmpty(install) Then - ' No install info; it must be in a child subkey. - Console.WriteLine($"{versionKeyName} {name}") - ElseIf install = "1" Then - - If Not String.IsNullOrEmpty(sp) Then - Console.WriteLine($"{versionKeyName} {name} SP{sp}") - Else - Console.WriteLine($"{versionKeyName} {name}") - End If - - End If - - If Not String.IsNullOrEmpty(name) Then - Continue For - End If - - For Each subKeyName In versionKey.GetSubKeyNames() - Dim subKey As RegistryKey = versionKey.OpenSubKey(subKeyName) - name = DirectCast(subKey.GetValue("Version", ""), String) - If Not String.IsNullOrEmpty(name) Then - sp = subKey.GetValue("SP", "").ToString() - End If - - install = subKey.GetValue("Install", "").ToString() - If String.IsNullOrEmpty(install) Then - ' No install info; it must be later. - Console.WriteLine($" {versionKeyName} {name}") - ElseIf install = "1" Then - - If Not String.IsNullOrEmpty(sp) Then - Console.WriteLine($" {subKeyName} {name} SP{sp}") - Else - Console.WriteLine($" {subKeyName} {name}") - End If - - End If - Next - End If - Next - End Using - ' - End Sub - - ' - Private Sub Get45PlusFromRegistry() - Const subkey As String = "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\" - - Using baseKey As RegistryKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32), - ndpKey As RegistryKey = baseKey.OpenSubKey(subkey) - If ndpKey IsNot Nothing AndAlso ndpKey.GetValue("Release") IsNot Nothing Then - Console.WriteLine($".NET Framework Version: {CheckFor45PlusVersion(ndpKey.GetValue("Release"))}") - Else - Console.WriteLine(".NET Framework Version 4.5 or later is not detected.") - End If - End Using - End Sub - - ' Checking the version using >= enables forward compatibility. - Private Function CheckFor45PlusVersion(releaseKey As Integer) As String - If releaseKey >= 533320 Then - Return "4.8.1 or later" - ElseIf releaseKey >= 528040 Then - Return "4.8" - ElseIf releaseKey >= 461808 Then - Return "4.7.2" - ElseIf releaseKey >= 461308 Then - Return "4.7.1" - ElseIf releaseKey >= 460798 Then - Return "4.7" - ElseIf releaseKey >= 394802 Then - Return "4.6.2" - ElseIf releaseKey >= 394254 Then - Return "4.6.1" - ElseIf releaseKey >= 393295 Then - Return "4.6" - ElseIf releaseKey >= 379893 Then - Return "4.5.2" - ElseIf releaseKey >= 378675 Then - Return "4.5.1" - ElseIf releaseKey >= 378389 Then - Return "4.5" - End If - ' This code should never execute. A non-null release key should mean - ' that 4.5 or later is installed. - Return "No 4.5 or later version detected" - End Function - ' - -End Module diff --git a/docs/framework/toc.yml b/docs/framework/toc.yml index 3692626ee690e..646cda2b79f5c 100644 --- a/docs/framework/toc.yml +++ b/docs/framework/toc.yml @@ -15,36 +15,26 @@ items: items: - name: Overview href: install/index.md + - name: Install on Windows and Windows Server + href: install/on-windows-and-server.md - name: For developers href: install/guide-for-developers.md - - name: By OS version - items: - - name: Windows 11 - href: install/on-windows-11.md - - name: Windows 10 and Windows Server 2016 - href: install/on-windows-10.md - - name: Windows 8.1 and Windows Server 2012 R2 - href: install/on-windows-8-1.md - - name: Windows 8 and Windows Server 2012 - href: install/on-windows-8.md - - name: Windows Server 2025 - href: install/on-server-2025.md - - name: Windows Server 2022 - href: install/on-server-2022.md - - name: Windows Server 2019 - href: install/on-server-2019.md - - name: Repair .NET framework - href: install/repair.md + - name: Versions and dependencies + href: install/versions-and-dependencies.md + - name: Find installed versions + href: install/how-to-determine-which-versions-are-installed.md + - name: Find installed updates + href: install/how-to-determine-which-net-framework-updates-are-installed.md - name: Troubleshoot items: + - name: Repair .NET framework + href: install/repair.md - name: Troubleshoot install and uninstall href: install/troubleshoot-blocked-installations-and-uninstallations.md - name: Troubleshoot 'This application could not be started' href: install/application-not-started.md - - name: .NET Framework 3.5 on Windows 8 through Windows 11 + - name: .NET Framework 3.5 href: install/dotnet-35-windows.md - - name: .NET Framework 1.1 on Windows 8 through Windows 11 - href: install/run-net-framework-1-1-apps.md - name: Migration guide items: - name: Overview @@ -116,14 +106,6 @@ items: href: migration-guide/mitigation-ziparchiveentry-fullname-path-separator.md - name: Version compatibility href: migration-guide/version-compatibility.md - - name: .NET Framework versions - items: - - name: Versions and dependencies - href: migration-guide/versions-and-dependencies.md - - name: Find installed versions - href: migration-guide/how-to-determine-which-versions-are-installed.md - - name: Find installed updates - href: migration-guide/how-to-determine-which-net-framework-updates-are-installed.md - name: Configure an app to support .NET Framework 4 or later href: migration-guide/how-to-configure-an-app-to-support-net-framework-4-or-4-5.md - name: Migrate from .NET Framework 1.1 diff --git a/docs/standard/clr.md b/docs/standard/clr.md index 4bdec26512e37..19a5723ec231b 100644 --- a/docs/standard/clr.md +++ b/docs/standard/clr.md @@ -59,7 +59,7 @@ Language compilers and tools expose the runtime's functionality in ways that are .NET Core and .NET 5+ releases have a single product version, that is, there's no separate CLR version. For a list of .NET Core versions, see [Download .NET Core](https://dotnet.microsoft.com/download/dotnet). -However, the .NET Framework version number doesn't necessarily correspond to the version number of the CLR it includes. For a list of .NET Framework versions and their corresponding CLR versions, see [.NET Framework versions and dependencies](../framework/migration-guide/versions-and-dependencies.md). +However, the .NET Framework version number doesn't necessarily correspond to the version number of the CLR it includes. For a list of .NET Framework versions and their corresponding CLR versions, see [.NET Framework versions and dependencies](../framework/install/versions-and-dependencies.md). ## Related articles diff --git a/docs/whats-new/dotnet-docs-mod0.md b/docs/whats-new/dotnet-docs-mod0.md index aebb6eace64e3..35581513d5d0a 100644 --- a/docs/whats-new/dotnet-docs-mod0.md +++ b/docs/whats-new/dotnet-docs-mod0.md @@ -68,7 +68,7 @@ Welcome to what's new in the .NET docs for December 2024. This article lists som ### New articles -- [Install .NET Framework on Windows Server 2025](../framework/install/on-server-2025.md) +- [Install .NET Framework on Windows Server 2025](../framework/install/on-windows-and-server.md#install-net-framework-on-windows-server) - [November 2024 cumulative update preview](../framework/release-notes/2024/11-21-november-preview-cumulative-update.md) ## Community contributors diff --git a/includes/net-framework-future.md b/includes/net-framework-future.md index f954e08c36988..50b01e84af5a7 100644 --- a/includes/net-framework-future.md +++ b/includes/net-framework-future.md @@ -1,2 +1,2 @@ > [!NOTE] -> .NET Framework is serviced independently from Windows updates with security and reliability bug fixes. In general, security updates are released quarterly. .NET Framework will continue to be included with Windows, with no plans to remove it. You don't need to migrate your .NET Framework apps, but for new development, use [.NET 8 or later](~/docs/core/introduction.md). +> .NET Framework is serviced independently from Windows updates with security and reliability bug fixes. In general, security updates are released quarterly. .NET Framework will continue to be included with Windows, with no plans to remove it. You don't need to migrate your .NET Framework apps, but for new development, use [.NET instead of .NET Framework](../docs/core/introduction.md). diff --git a/includes/net-framework-retired-versions.md b/includes/net-framework-retired-versions.md index 2d599d0001f26..1d6149469ff87 100644 --- a/includes/net-framework-retired-versions.md +++ b/includes/net-framework-retired-versions.md @@ -1,9 +1,9 @@ > [!IMPORTANT] -> .NET Framework content previously digitally signed using certificates that use the SHA1 algorithm, will be retired in order to support evolving industry standards. +> .NET Framework content that was previously digitally signed using certificates that use the SHA1 algorithm must be retired in order to support evolving industry standards. > -> The following versions of .NET Framework will reach end-of-support on _April 26, 2022_: 4.5.2, 4.6, and 4.6.1. After this date, security fixes, updates, and technical support for these versions will no longer be provided. +> The following versions of .NET Framework are no longer supported as of _April 26, 2022_: 4.5.2, 4.6, and 4.6.1. Security fixes, updates, and technical support for these versions are no longer provided. > -> If you're using .NET Framework 4.5.2, 4.6, or 4.6.1, update your deployed runtime to a more recent version, such as **.NET Framework 4.6.2**, before _April 26, 2022_ in order to continue to receive updates and technical support. +> If you're using .NET Framework 4.5.2, 4.6, or 4.6.1, update your deployed runtime to a more recent version, such as **.NET Framework 4.6.2** or **.NET Framework 4.8.1**, to continue to receive updates and technical support. > -> Updated SHA2 signed installers will be available for .NET Framework 3.5 SP1, and 4.6.2 through 4.8. For more information, see the [SHA1 retirement plan](https://support.microsoft.com/topic/-net-framework-retiring-sha-1-content-9750f20d-a9ef-4d43-853f-2075f0a9d7da), the [.NET 4.5.2, 4.6, and 4.6.1 lifecycle update blog post](https://devblogs.microsoft.com/dotnet/net-framework-4-5-2-4-6-4-6-1-will-reach-end-of-support-on-april-26-2022/), and the [FAQ](https://support.microsoft.com/topic/-net-framework-4-5-2-4-6-4-6-1-end-of-support-faq-72b7d8ca-3057-4f0c-8404-67305d40cc04). +> Updated SHA2 signed installers are available for .NET Framework 3.5 SP1, and 4.6.2 through 4.8. For more information, see the [SHA1 retirement plan](https://support.microsoft.com/topic/-net-framework-retiring-sha-1-content-9750f20d-a9ef-4d43-853f-2075f0a9d7da), the [.NET 4.5.2, 4.6, and 4.6.1 lifecycle update blog post](https://devblogs.microsoft.com/dotnet/net-framework-4-5-2-4-6-4-6-1-will-reach-end-of-support-on-april-26-2022/), and the [FAQ](https://support.microsoft.com/topic/-net-framework-4-5-2-4-6-4-6-1-end-of-support-faq-72b7d8ca-3057-4f0c-8404-67305d40cc04).