Skip to content

Commit bc4be79

Browse files
Merge pull request #42889 from dotnet/main
Merge main into live
2 parents e4e4449 + 4338ad7 commit bc4be79

10 files changed

+495
-21
lines changed

docs/core/tools/dotnet-run.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dotnet run -h|--help
2727

2828
## Description
2929

30-
The `dotnet run` command provides a convenient option to run your application from the source code with one command. It's useful for fast iterative development from the command line. The command depends on the [`dotnet build`](dotnet-build.md) command to build the code. Any requirements for the build, such as that the project must be restored first, apply to `dotnet run` as well.
30+
The `dotnet run` command provides a convenient option to run your application from the source code with one command. It's useful for fast iterative development from the command line. The command depends on the [`dotnet build`](dotnet-build.md) command to build the code. Any requirements for the build apply to `dotnet run` as well.
3131

3232
> [!NOTE]
3333
> `dotnet run` doesn't respect arguments like `/property:property=value`, which are respected by `dotnet build`.
Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,41 @@
11
---
2-
description: "ref keyword - C# Reference"
3-
title: "ref keyword"
2+
description: "Understand the different uses for the `ref` keyword and get more information on those uses"
3+
title: "The multiple uses of the `ref` keyword"
44
ms.date: 09/23/2023
55
f1_keywords:
66
- "ref_CSharpKeyword"
77
helpviewer_keywords:
88
- "parameters [C#], ref"
99
- "ref keyword [C#]"
1010
---
11-
# ref (C# reference)
11+
# The `ref` keyword
1212

1313
You use the `ref` keyword in the following contexts:
1414

1515
- In a method signature and in a method call, to pass an argument to a method [by reference](./method-parameters.md#ref-parameter-modifier).
1616

17-
:::code language="csharp" source="./snippets/PassParameters.cs" id="PassByValueOrReference":::
17+
:::code language="csharp" source="./snippets/refKeyword.cs" id="PassByReference":::
1818

1919
- In a method signature, to return a value to the caller by reference. For more information, see [`ref return`](../statements/jump-statements.md#ref-returns).
2020

21-
:::code language="csharp" source="../statements/snippets/jump-statements/ReturnStatement.cs" id="RefReturn":::
21+
:::code language="csharp" source="./snippets/refKeyword.cs" id="ReturnByReference":::
2222

2323
- In a declaration of a local variable, to declare a [reference variable](../statements/declarations.md#reference-variables).
2424

25-
```csharp
26-
ref int aliasOfvariable = ref variable;
27-
```
25+
:::code language="csharp" source="./snippets/refKeyword.cs" id="LocalRef":::
2826

2927
- As the part of a [conditional ref expression](../operators/conditional-operator.md#conditional-ref-expression) or a [ref assignment operator](../operators/assignment-operator.md#ref-assignment).
3028

31-
:::code language="csharp" source="../operators/snippets/shared/AssignmentOperator.cs" id="SnippetRefAssignment":::
29+
:::code language="csharp" source="./snippets/refKeyword.cs" id="ConditionalRef":::
3230

3331
- In a `struct` declaration, to declare a `ref struct`. For more information, see the [`ref` structure types](../builtin-types/ref-struct.md) article.
3432

35-
:::code language="csharp" source="../builtin-types/snippets/shared/StructType.cs" id="SnippetRefStruct":::
33+
:::code language="csharp" source="./snippets/refKeyword.cs" id="SnippetRefStruct":::
3634

3735
- In a `ref struct` definition, to declare a `ref` field. For more information, see the [`ref` fields](../builtin-types/ref-struct.md#ref-fields) section of the [`ref` structure types](../builtin-types/ref-struct.md) article.
3836

39-
:::code language="csharp" source="../builtin-types/snippets/shared/StructType.cs" id="SnippetRefField":::
37+
:::code language="csharp" source="./snippets/refKeyword.cs" id="SnippetRefField":::
4038

4139
- In a generic type declaration to specify that a type parameter [`allows ref struct`](../../programming-guide/generics/constraints-on-type-parameters.md#allows-ref-struct) types.
4240

43-
```csharp
44-
class SomeClass<T, S>
45-
where T : allows ref struct
46-
where S : T
47-
{
48-
// etc
49-
}
50-
```
41+
:::code language="csharp" source="./snippets/refKeyword.cs" id="SnippetRefGeneric":::
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
public class RefKeywordExamples
2+
{
3+
// <PassByReference>
4+
public void M(ref int refParameter)
5+
{
6+
refParameter += 42;
7+
}
8+
// </PassByReference>
9+
10+
// <ReturnByReference>
11+
public ref int RefMax(ref int left, ref int right)
12+
{
13+
if (left > right)
14+
{
15+
return ref left;
16+
}
17+
else
18+
{
19+
return ref right;
20+
}
21+
}
22+
// </ReturnByReference>
23+
24+
// <LocalRef>
25+
public void M2(int variable)
26+
{
27+
ref int aliasOfvariable = ref variable;
28+
}
29+
// </LocalRef>
30+
31+
// <ConditionalRef>
32+
public ref int RefMaxConditions(ref int left, ref int right)
33+
{
34+
ref int returnValue = ref left > right ? ref left : ref right;
35+
return ref returnValue;
36+
}
37+
// </ConditionalRef>
38+
}
39+
40+
// <SnippetRefStruct>
41+
public ref struct CustomRef
42+
{
43+
public ReadOnlySpan<int> Inputs;
44+
public ReadOnlySpan<int> Outputs;
45+
}
46+
// </SnippetRefStruct>
47+
48+
// <SnippetRefField>
49+
public ref struct RefFieldExample
50+
{
51+
private ref int number;
52+
}
53+
// </SnippetRefField>
54+
55+
// <SnippetRefGeneric>
56+
class RefStructGeneric<T, S>
57+
where T : allows ref struct
58+
where S : T
59+
{
60+
// etc
61+
}
62+
// </SnippetRefGeneric>
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
title: January 2024 security and quality rollup
3+
description: Learn about the improvements in the .NET Framework January 2024 security and quality rollup.
4+
ms.date: 01/08/2024
5+
---
6+
# January 2024 security and quality rollup
7+
8+
_Released January 8, 2024_
9+
10+
## Summary of what's new in this release
11+
12+
- [Security improvements](#security-improvements)
13+
- [Quality and reliability improvements](#quality-and-reliability-improvements)
14+
15+
### Security improvements
16+
17+
#### CVE-2023-36042 – Denial of service vulnerability
18+
19+
This security update addresses a remote code execution vulnerability detailed in [CVE 2023-36042](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2023-36042).
20+
21+
#### CVE-2024-0056 – Security feature bypass vulnerability
22+
23+
This security update addresses a security feature bypass vulnerability detailed in [CVE 2024-0056](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-0056).
24+
25+
#### CVE-2024-0057 – Security feature vulnerability
26+
27+
This security update addresses a security feature vulnerability detailed in [CVE 2024-0057](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-0057).
28+
29+
#### CVE-2024-21312 – Denial of service vulnerability
30+
31+
This security update addresses a denial of service vulnerability detailed in [CVE 2024-21312](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-21312).
32+
33+
#### Remote code execution vulnerability
34+
35+
This security update addresses a remote code execution vulnerability to HTTP .NET remoting server channel chain.
36+
37+
### Quality and reliability improvements
38+
39+
There are no new Quality and Reliability Improvements in this update.
40+
41+
## Known issues
42+
43+
This release contains no known issues.
44+
45+
## Summary tables
46+
47+
The following table outlines the updates in this release.
48+
49+
| Product version | Cumulative update |
50+
| --- | --- |
51+
| **Microsoft server operating system, version 23H2** | |
52+
| .NET Framework 3.5, 4.8.1 | [5033917](https://support.microsoft.com/kb/5033917) |
53+
| **Windows 11, version 22H2 and Windows 11, version 23H2** | |
54+
| .NET Framework 3.5, 4.8.1 | [5033920](https://support.microsoft.com/kb/5033920) |
55+
| **Windows 11, version 21H2** | **[5034276](https://support.microsoft.com/kb/5034276)** |
56+
| .NET Framework 3.5, 4.8 | [5033912](https://support.microsoft.com/kb/5033912) |
57+
| .NET Framework 3.5, 4.8.1 | [5033919](https://support.microsoft.com/kb/5033919) |
58+
| **Microsoft server operating system, version 22H2** | **[5034272](https://support.microsoft.com/kb/5034272)** |
59+
| .NET Framework 3.5, 4.8 | [5033914](https://support.microsoft.com/kb/5033914) |
60+
| .NET Framework 3.5, 4.8.1 | [5033922](https://support.microsoft.com/kb/5033922) |
61+
| **Microsoft server operating system, version 21H2** | **[5034272](https://support.microsoft.com/kb/5034272)** |
62+
| .NET Framework 3.5, 4.8 | [5033914](https://support.microsoft.com/kb/5033914) |
63+
| .NET Framework 3.5, 4.8.1 | [5033922](https://support.microsoft.com/kb/5033922) |
64+
| **Windows 10, version 22H2** | **[5034275](https://support.microsoft.com/kb/5034275)** |
65+
| .NET Framework 3.5, 4.8 | [5033909](https://support.microsoft.com/kb/5036608) |
66+
| .NET Framework 3.5, 4.8.1 | [5033918](https://support.microsoft.com/kb/5033918) |
67+
| **Windows 10, version 21H2** | **[5037035](https://support.microsoft.com/kb/5037035)** |
68+
| .NET Framework 3.5, 4.8 | [5033909](https://support.microsoft.com/kb/5036608) |
69+
| .NET Framework 3.5, 4.8.1 | [5033918](https://support.microsoft.com/kb/5033918) |
70+
| **Windows 10 1809 and Windows Server 2019** | **[5034273](https://support.microsoft.com/kb/5034273)** |
71+
| .NET Framework 3.5, 4.7.2 | [5033904](https://support.microsoft.com/kb/5033904) |
72+
| .NET Framework 3.5, 4.8 | [5033911](https://support.microsoft.com/kb/5033911) |
73+
| **Windows 10 1607 and Windows Server 2016** | |
74+
| .NET Framework 3.5, 4.6.2, 4.7, 4.7.1, 4.7.2 | [5034119](https://support.microsoft.com/kb/5034119) |
75+
| .NET Framework 4.8 | [5033910](https://support.microsoft.com/kb/5033910) |
76+
| **Windows 10 1507** | |
77+
| .NET Framework 3.5, 4.6, 4.6.2 | [5034134](https://support.microsoft.com/kb/5034134) |
78+
79+
The following table is for earlier Windows and Windows Server versions for Security and Quality Rollup updates.  
80+
81+
| Product version | Security and quality rollup |
82+
| --- | --- |
83+
| **Windows Server 2012 R2** | **[5034279](https://support.microsoft.com/kb/5034279)** |
84+
| .NET Framework 3.5 | [5033900](https://support.microsoft.com/kb/5033900) |
85+
| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5033906](https://support.microsoft.com/kb/5033906) |
86+
| .NET Framework 4.8 | [5033915](https://support.microsoft.com/kb/5033915) |
87+
| **Windows Server 2012** | **[5034278](https://support.microsoft.com/kb/5034278)** |
88+
| .NET Framework 3.5 | [5033897](https://support.microsoft.com/kb/5033897) |
89+
| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5033905](https://support.microsoft.com/kb/5033905) |
90+
| .NET Framework 4.8 | [5033913](https://support.microsoft.com/kb/5033913) |
91+
| **Windows Server 2008 R2** | **[5034277](https://support.microsoft.com/kb/5033977)** |
92+
| .NET Framework 3.5.1 | [5033899](https://support.microsoft.com/kb/5033899) |
93+
| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5033907](https://support.microsoft.com/kb/5033907) |
94+
| .NET Framework 4.8 |[5033916](https://support.microsoft.com/kb/5033916) |
95+
| **Windows Server 2008** | **[5034280](https://support.microsoft.com/kb/5034280)** |
96+
| .NET Framework 2.0, 3.0 | [5033898](https://support.microsoft.com/kb/5033898) |
97+
| .NET Framework 3.5 SP1 | [5034008](https://support.microsoft.com/kb/5034008) |
98+
| .NET Framework 4.6.2 | [5033907](https://support.microsoft.com/kb/5033907) |
99+
100+
The following table is for earlier Windows and Windows Server versions for Security Only updates, which aren't cumulative.
101+
102+
| Product version | Security only update |
103+
| --- | --- |
104+
| **Windows Server 2008 R2** | **[5034269](https://support.microsoft.com/kb/5034269)** |
105+
| .NET Framework 3.5.1 | [5033946](https://support.microsoft.com/kb/5033946) |
106+
| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5033947](https://support.microsoft.com/kb/5033947) |
107+
| .NET Framework 4.8 |[5033948](https://support.microsoft.com/kb/5033948) |
108+
| **Windows Server 2008** | **[5034270](https://support.microsoft.com/kb/5034270)** |
109+
| .NET Framework 2.0, 3.0 | [5033945](https://support.microsoft.com/kb/5033945) |
110+
| .NET Framework 3.5 SP1 | [5033952](https://support.microsoft.com/kb/5033952) |
111+
| .NET Framework 4.6.2 | [5033947](https://support.microsoft.com/kb/5033947) |
112+
113+
The operating system row lists a KB which will be used for update offering purposes. When the operating system KB is offered, the applicability logic will determine the specific .NET Framework update(s) will be installed. Updates for individual .NET Framework versions will be installed based on the version of .NET Framework that is already present on the device. Because of this the operating system KB is not expected to be listed as installed updates on the device. The expected update to be installed are the .NET Framework specific version updates listed in the preceding table.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: January 2024 cumulative update preview
3+
description: Learn about the improvements in the .NET Framework January 2024 cumulative update preview.
4+
ms.date: 01/23/2024
5+
---
6+
# January 2024 cumulative update preview
7+
8+
_Released January 23, 2024_
9+
10+
## Summary of what's new in this release
11+
12+
- [Security improvements](#security-improvements)
13+
- [Quality and reliability improvements](#quality-and-reliability-improvements)
14+
15+
### Security improvements
16+
17+
There are no new security improvements in this release. This update is cumulative and contains all previously released security improvements.
18+
19+
### Quality and reliability improvements
20+
21+
This release contains the following quality and reliability improvements.
22+
23+
#### ASP.NET
24+
25+
Addresses an issue with "System.ArgumentException: Illegal characters in path" in some ASP.NET MVC requests. (*Applies to: .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1.*)
26+
27+
#### .NET libraries
28+
29+
Addresses an issue where version of the OSS zlib library is out of date. (*Applies to: .NET Framework 4.8, 4.8.1.*)
30+
31+
## Known issues
32+
33+
This release contains no known issues.
34+
35+
## Summary tables
36+
37+
The following table outlines the updates in this release.
38+
39+
| Product version | Cumulative update preview |
40+
| --- | --- |
41+
| **Windows 11, version 22H2 and Windows 11, version 23H2** | |
42+
| .NET Framework 3.5, 4.8.1 | [5034467](https://support.microsoft.com/kb/5034467) |
43+
| **Windows 10, version 22H2** | **[5034582](https://support.microsoft.com/kb/5034582)** |
44+
| .NET Framework 3.5, 4.8 | [5034468](https://support.microsoft.com/kb/5034468) |
45+
| .NET Framework 3.5, 4.8.1 | [5034466](https://support.microsoft.com/kb/5034466) |
46+
47+
The operating system row lists a KB which will be used for update offering purposes. When the operating system KB is offered, the applicability logic will determine the specific .NET Framework update(s) will be installed. Updates for individual .NET Framework versions will be installed based on the version of .NET Framework that is already present on the device. Because of this the operating system KB is not expected to be listed as installed updates on the device. The expected update to be installed are the .NET Framework specific version updates listed in the table above.
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: February 2024 security and quality rollup
3+
description: Learn about the improvements in the .NET Framework February 2024 security and quality rollup.
4+
ms.date: 02/14/2024
5+
---
6+
# February 2024 security and quality rollup
7+
8+
_Released February 14, 2024_
9+
10+
## Summary of what's new in this release
11+
12+
- [Security improvements](#security-improvements)
13+
- [Quality and reliability improvements](#quality-and-reliability-improvements)
14+
15+
### Security improvements
16+
17+
There are no new security improvements in this release. This update is cumulative and contains all previously released security improvements.
18+
19+
### Quality and reliability improvements
20+
21+
This release contains the following quality and reliability improvements.
22+
23+
#### ASP.NET
24+
25+
Addresses an issue with “System.ArgumentException: Illegal characters in path” in some ASP.NET MVC requests. (*Applies to: .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1.*)
26+
27+
#### .NET libraries
28+
29+
Addresses an issue where version of the OSS zlib library is out of date. (*Applies to: .NET Framework 4.8, 4.8.1.*)
30+
31+
## Known issues
32+
33+
This release contains no known issues.
34+
35+
## Summary tables
36+
37+
The following table outlines the updates in this release.
38+
39+
| Product version | Cumulative update |
40+
| --- | --- |
41+
| **Microsoft server operating system, version 23H2** | |
42+
| .NET Framework 3.5, 4.8.1 | [5034626](https://support.microsoft.com/kb/5034626) |
43+
| **Windows 11, version 22H2 and Windows 11, version 23H2** | |
44+
| .NET Framework 3.5, 4.8.1 | [5034467](https://support.microsoft.com/kb/5034467) |
45+
| **Windows 11, version 21H2** | **[5034686](https://support.microsoft.com/kb/5034686)** |
46+
| .NET Framework 3.5, 4.8 | [5034625](https://support.microsoft.com/kb/5034625) |
47+
| .NET Framework 3.5, 4.8.1 | [5034612](https://support.microsoft.com/kb/5034612) |
48+
| **Microsoft server operating system, version 22H2** | **[5034923](https://support.microsoft.com/kb/5034923)** |
49+
| .NET Framework 3.5, 4.8 | [5034613](https://support.microsoft.com/kb/5034613) |
50+
| .NET Framework 3.5, 4.8.1 | [5034611](https://support.microsoft.com/kb/5034611) |
51+
| **Microsoft server operating system, version 21H2** | **[5034682](https://support.microsoft.com/kb/5034682)** |
52+
| .NET Framework 3.5, 4.8 | [5034613](https://support.microsoft.com/kb/5034613) |
53+
| .NET Framework 3.5, 4.8.1 | [5034611](https://support.microsoft.com/kb/5034611) |
54+
| **Windows 10, version 22H2** | **[5034685](https://support.microsoft.com/kb/5034685)** |
55+
| .NET Framework 3.5, 4.8 | [5034468](https://support.microsoft.com/kb/5034468) |
56+
| .NET Framework 3.5, 4.8.1 | [5034466](https://support.microsoft.com/kb/5034466) |
57+
| **Windows 10, version 21H2** | **[5034684](https://support.microsoft.com/kb/5034684)** |
58+
| .NET Framework 3.5, 4.8 | [5034468](https://support.microsoft.com/kb/5034468) |
59+
| .NET Framework 3.5, 4.8.1 | [5034466](https://support.microsoft.com/kb/5034466) |
60+
| **Windows 10 1809 and Windows Server 2019** | **[5034683](https://support.microsoft.com/kb/5034683)** |
61+
| .NET Framework 3.5, 4.7.2 | [5034619](https://support.microsoft.com/kb/5034619) |
62+
| .NET Framework 3.5, 4.8 | [5034624](https://support.microsoft.com/kb/5034624) |
63+
| **Windows 10 1607 and Windows Server 2016** | |
64+
| .NET Framework 3.5, 4.6.2, 4.7, 4.7.1, 4.7.2 | [5034767](https://support.microsoft.com/kb/5034767) |
65+
| .NET Framework 4.8 | [5034614](https://support.microsoft.com/kb/5034614) |
66+
67+
The following table is for earlier Windows and Windows Server versions for Security and Quality Rollup updates.  
68+
69+
| Product version | Security and quality rollup |
70+
| --- | --- |
71+
| **Windows Server 2012 R2** | **[5034689](https://support.microsoft.com/kb/5034689)** |
72+
| .NET Framework 3.5 | [5033900](https://support.microsoft.com/kb/5033900) |
73+
| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5034622](https://support.microsoft.com/kb/5034622) |
74+
| .NET Framework 4.8 | [5034617](https://support.microsoft.com/kb/5034617) |
75+
| **Windows Server 2012** | **[5034688](https://support.microsoft.com/kb/5034688)** |
76+
| .NET Framework 3.5 | [55033897](https://support.microsoft.com/kb/5033897) |
77+
| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5034621](https://support.microsoft.com/kb/5034621) |
78+
| .NET Framework 4.8 | [5034616](https://support.microsoft.com/kb/5034616) |
79+
| **Windows Server 2008 R2** | **[5034687](https://support.microsoft.com/kb/5034687)** |
80+
| .NET Framework 3.5.1 | [5033899](https://support.microsoft.com/kb/5033899) |
81+
| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5034620](https://support.microsoft.com/kb/5034620) |
82+
| .NET Framework 4.8 |[5034615](https://support.microsoft.com/kb/5034615) |
83+
| **Windows Server 2008** | **[5034690](https://support.microsoft.com/kb/5034690)** |
84+
| .NET Framework 2.0, 3.0 | [5033898](https://support.microsoft.com/kb/5033898) |
85+
| .NET Framework 3.5 SP1 | [5034008](https://support.microsoft.com/kb/5034008) |
86+
| .NET Framework 4.6.2 | [5034620](https://support.microsoft.com/kb/5034620) |
87+
88+
The operating system row lists a KB which will be used for update offering purposes. When the operating system KB is offered, the applicability logic will determine the specific .NET Framework update(s) will be installed. Updates for individual .NET Framework versions will be installed based on the version of .NET Framework that is already present on the device. Because of this the operating system KB is not expected to be listed as installed updates on the device. The expected update to be installed are the .NET Framework specific version updates listed in the preceding table.

0 commit comments

Comments
 (0)