Skip to content

Commit 680ad73

Browse files
author
Cam Soper
authored
MSBUILDCUSTOMBUILDEVENTWARNING breaking change (#45006)
* initial commit * lint * tweaks
1 parent e1e5b78 commit 680ad73

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

docs/core/compatibility/10.0.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af
4141
| [X500DistinguishedName validation is stricter](cryptography/10.0/x500distinguishedname-validation.md) | Behavioral change | Preview 1 |
4242
| [Environment variable renamed to DOTNET_OPENSSL_VERSION_OVERRIDE](cryptography/10.0/version-override.md) | Behavioral change | Preview 1 |
4343

44+
## SDK
45+
46+
| Title | Type of change | Introduced version |
47+
|-----------------------------------------------------------------------------------------------|-------------------|--------------------|
48+
| [MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed](sdk/10.0/custom-build-event-warning.md) | Behavioral change | Preview 1 |
49+
4450
## Windows Forms
4551

4652
| Title | Type of change | Introduced version |
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: "Breaking change - MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed"
3+
description: "Learn about the breaking change where the MSBUILDCUSTOMBUILDEVENTWARNING environment variable is no longer supported."
4+
ms.date: 2/25/2025
5+
ai-usage: ai-assisted
6+
ms.custom: https://github.com/dotnet/docs/issues/44998
7+
---
8+
9+
# MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed
10+
11+
The `MSBUILDCUSTOMBUILDEVENTWARNING` environment variable, which previously allowed custom build events derived from <xref:Microsoft.Build.Framework.BuildEventArgs>, is no longer supported.
12+
13+
## Version introduced
14+
15+
.NET 10 Preview 1
16+
17+
## Previous behavior
18+
19+
Users could set the `MSBUILDCUSTOMBUILDEVENTWARNING` environment variable to enable processing of custom build events.
20+
21+
## New behavior
22+
23+
The value of the `MSBUILDCUSTOMBUILDEVENTWARNING` environment variable is not respected anymore.
24+
25+
## Type of breaking change
26+
27+
This is a [behavioral change](../../categories.md#behavioral-change).
28+
29+
## Reason for change
30+
31+
The escape hatch mechanism provided by the `MSBUILDCUSTOMBUILDEVENTWARNING` environment variable was a temporary workaround. For more information, see the [original breaking change](../8.0/custombuildeventargs.md).
32+
33+
## Recommended action
34+
35+
Use one of the following newly introduced, built-in events for extensibility instead of your custom derived build event:
36+
37+
- <xref:Microsoft.Build.Framework.ExtendedCustomBuildEventArgs>
38+
- <xref:Microsoft.Build.Framework.ExtendedBuildErrorEventArgs>
39+
- <xref:Microsoft.Build.Framework.ExtendedBuildMessageEventArgs>
40+
- <xref:Microsoft.Build.Framework.ExtendedBuildWarningEventArgs>
41+
42+
## Affected APIs
43+
44+
- <xref:Microsoft.Build.Framework.CustomBuildEventArgs?displayProperty=fullName>

docs/core/compatibility/toc.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ items:
3434
items:
3535
- name: Environment variable renamed to DOTNET_ICU_VERSION_OVERRIDE
3636
href: globalization/10.0/version-override.md
37+
- name: SDK and MSBuild
38+
items:
39+
- name: MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed
40+
href: sdk/10.0/custom-build-event-warning.md
3741
- name: Windows Forms
3842
items:
3943
- name: Renamed parameter in HtmlElement.InsertAdjacentElement
@@ -1872,6 +1876,10 @@ items:
18721876
href: reflection/8.0/function-pointer-reflection.md
18731877
- name: SDK and MSBuild
18741878
items:
1879+
- name: .NET 10
1880+
items:
1881+
- name: MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed
1882+
href: sdk/10.0/custom-build-event-warning.md
18751883
- name: .NET 9
18761884
items:
18771885
- name: "`dotnet restore` audits transitive packages"

0 commit comments

Comments
 (0)