Skip to content

Commit 9a4d7a0

Browse files
Merge pull request #45809 from dotnet/main
Merge main into live
2 parents 9932e6a + 2a216fb commit 9a4d7a0

File tree

9 files changed

+80
-21
lines changed

9 files changed

+80
-21
lines changed

docs/azure/includes/dotnet-all.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@
414414
| Common | NuGet [2.2.1](https://www.nuget.org/packages/Microsoft.Azure.Common/2.2.1) | | |
415415
| Common - Dependencies | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Common.Dependencies/1.0.0) | | |
416416
| Computer Vision | NuGet [7.0.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Vision.ComputerVision/7.0.1) | | GitHub [7.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Vision.ComputerVision_6.0.0-preview.1/sdk/cognitiveservices/Vision.ComputerVision) |
417-
| Cosmos DB | NuGet [3.47.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.47.0)<br>NuGet [3.49.0-preview.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.49.0-preview.0) | [docs](/dotnet/api/overview/azure/cosmosdb) | GitHub [3.47.0](https://github.com/Azure/azure-cosmos-dotnet-v3/tree/3.12.0/Microsoft.Azure.Cosmos) |
417+
| Cosmos DB | NuGet [3.47.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.47.0)<br>NuGet [3.49.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.49.0-preview.1) | [docs](/dotnet/api/overview/azure/cosmosdb) | GitHub [3.47.0](https://github.com/Azure/azure-cosmos-dotnet-v3/tree/3.12.0/Microsoft.Azure.Cosmos) |
418418
| Custom Image Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingCustomImageSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingCustomImageSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingCustomImageSearch) |
419419
| Custom Image Search | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.CustomImageSearch/2.0.0) | | |
420420
| Custom Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingCustomSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingCustomSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingCustomSearch) |

docs/core/compatibility/8.0.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Breaking changes in .NET 8
33
titleSuffix: ""
44
description: Navigate to the breaking changes in .NET 8.
5-
ms.date: 12/05/2023
5+
ms.date: 04/10/2025
66
no-loc: [Blazor, Razor, Kestrel]
77
---
88
# Breaking changes in .NET 8
@@ -102,13 +102,14 @@ If you're migrating an app to .NET 8, the breaking changes listed here might aff
102102

103103
## Interop
104104

105-
| Title | Type of change |
106-
| ------------------------------------------------------------------------------------------------- | ------------------- |
107-
| [CreateObjectFlags.Unwrap only unwraps on target instance](interop/8.0/comwrappers-unwrap.md) | Behavioral change |
108-
| [Custom marshallers require additional members](interop/8.0/marshal-modes.md) | Source incompatible |
109-
| [IDispatchImplAttribute API is removed](interop/8.0/idispatchimplattribute-removed.md) | Binary incompatible |
110-
| [JSFunctionBinding implicit public default constructor removed](interop/8.0/jsfunctionbinding-constructor.md) | Binary incompatible |
111-
| [SafeHandle types must have public constructor](interop/8.0/safehandle-constructor.md) | Source incompatible |
105+
| Title | Type of change |
106+
|---------------------------------------------------------------------------------------------------------------|---------------------|
107+
| [CreateObjectFlags.Unwrap only unwraps on target instance](interop/8.0/comwrappers-unwrap.md) | Behavioral change |
108+
| [Custom marshallers require additional members](interop/8.0/marshal-modes.md) | Source incompatible |
109+
| [IDispatchImplAttribute API is removed](interop/8.0/idispatchimplattribute-removed.md) | Binary incompatible |
110+
| [JSFunctionBinding implicit public default constructor removed](interop/8.0/jsfunctionbinding-constructor.md) | Binary incompatible |
111+
| [SafeHandle types must have public constructor](interop/8.0/safehandle-constructor.md) | Source incompatible |
112+
| [Linux native library resolution no longer uses `netcoredeps`](interop/8.0/linux-netcoredeps.md) | Behavioral change |
112113

113114
## Networking
114115

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: "Breaking change - Linux native library resolution no longer uses `netcoredeps`"
3+
description: "Learn about the breaking change in .NET 8 where Linux applications no longer search the `netcoredeps` subdirectory for native libraries."
4+
ms.date: 4/10/2025
5+
ai-usage: ai-assisted
6+
ms.custom: https://github.com/dotnet/docs/issues/45777
7+
---
8+
9+
# Linux native library resolution no longer uses `netcoredeps`
10+
11+
Starting in .NET 8, Linux applications no longer search the `netcoredeps` subdirectory for native libraries.
12+
13+
## Version introduced
14+
15+
.NET 8
16+
17+
## Previous behavior
18+
19+
In earlier versions of .NET, Linux applications searched for native libraries in a `netcoredeps` subdirectory located next to the application executable. This behavior applied to all native library loads, including user-defined platform invokes (p/invokes).
20+
21+
## New behavior
22+
23+
In .NET 8 and later, Linux applications no longer search the `netcoredeps` subdirectory for native libraries. Native library resolution now follows standard mechanisms without relying on this subdirectory.
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 `netcoredeps` behavior was originally introduced to handle complex dependencies on third-party libraries in earlier .NET versions. .NET 8+ no longer requires this behavior due to improved dependency handling. Additionally, the mechanism isn't aligned with recommended practices for ELF platforms.
32+
33+
For more information, see [GitHub issue #114393](https://github.com/dotnet/runtime/issues/114393).
34+
35+
## Recommended action
36+
37+
If your application relied on the `netcoredeps` subdirectory for p/invokes or custom native library resolution, use the following alternatives:
38+
39+
- Implement a custom resolution mechanism using one of the following:
40+
- <xref:System.Runtime.Loader.AssemblyLoadContext.ResolvingUnmanagedDll?displayProperty=fullName>
41+
- [System.Runtime.Loader.AssemblyLoadContext.LoadUnmanagedDll](/dotnet/api/system.runtime.loader.assemblyloadcontext.loadunmanageddll)
42+
- <xref:System.Runtime.InteropServices.NativeLibrary.SetDllImportResolver(System.Reflection.Assembly,System.Runtime.InteropServices.DllImportResolver)?displayProperty=fullName>
43+
- <xref:System.Runtime.InteropServices.NativeLibrary.Load*?displayProperty=fullName>
44+
- If an `RPATH` is required in your deployment, modify the ELF file explicitly using the `patchelf` utility.
45+
46+
## Affected APIs
47+
48+
- `DllImport`
49+
- <xref:System.Runtime.InteropServices.NativeLibrary.Load*?displayProperty=fullName>

docs/core/compatibility/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,8 @@ items:
362362
href: interop/8.0/jsfunctionbinding-constructor.md
363363
- name: SafeHandle types must have public constructor
364364
href: interop/8.0/safehandle-constructor.md
365+
- name: Linux native library resolution no longer uses `netcoredeps`
366+
href: interop/8.0/linux-netcoredeps.md
365367
- name: Networking
366368
items:
367369
- name: SendFile throws NotSupportedException for connectionless sockets
@@ -1818,6 +1820,8 @@ items:
18181820
href: interop/8.0/jsfunctionbinding-constructor.md
18191821
- name: SafeHandle types must have public constructor
18201822
href: interop/8.0/safehandle-constructor.md
1823+
- name: Linux native library resolution no longer uses `netcoredeps`
1824+
href: interop/8.0/linux-netcoredeps.md
18211825
- name: .NET 7
18221826
items:
18231827
- name: RuntimeInformation.OSArchitecture under emulation

docs/core/whats-new/dotnet-10/overview.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ The .NET 10 SDK introduces the following new features and enhancements, includin
5353

5454
- **Pruning of framework-provided package references**: Automatically removes unused framework-provided package references, reducing build times and disk usage.
5555
- **More consistent command order**: New noun-first aliases for `dotnet` CLI commands improve readability and consistency.
56+
- **CLI commands default to interactive mode in interactive terminals**: The `--interactive` flag is now enabled by default for CLI commands in interactive terminals.
57+
- **Native shell tab-completion scripts**: The `dotnet` CLI now supports generating native tab-completion scripts for popular shells using the `dotnet completions generate [SHELL]` command. Supported shells include `bash`, `fish`, `nushell`, `powershell`, and `zsh`.
58+
- **Console apps can natively create container images**: Console apps can now create container images via `dotnet publish /t:PublishContainer` without requiring the `<EnableSdkContainerSupport>` property in the project file.
59+
- **Explicitly control the image format of containers**: A new `<ContainerImageFormat>` property allows you to explicitly set the format of container images to either `Docker` or `OCI`.
60+
- **Support for Microsoft.Testing.Platform in `dotnet test`**: A new `dotnet test` experience made specifically for Microsoft.Testing.Platform can be opted-in via `dotnet.config`. For more information about the existing `dotnet test` integration for MTP and the new integration, see [Testing with `dotnet test`](../../testing/unit-testing-with-dotnet-test.md).
5661

5762
For more information, see [What's new in the SDK for .NET 10](sdk.md).
5863

samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/customexamples1.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ private static void ddSpecifier()
6464
for (int ctr = 2; ctr <= 8; ctr++)
6565
{
6666
string fmt = new String('d', ctr) + @"\.hh\:mm\:ss";
67-
Console.WriteLine($"{fmt} --> {ts1:" + fmt + "}");
68-
Console.WriteLine($"{fmt} --> {ts2:" + fmt + "}");
67+
Console.WriteLine($"{fmt} --> {ts1.ToString(fmt)}");
68+
Console.WriteLine($"{fmt} --> {ts2.ToString(fmt)}");
6969
Console.WriteLine();
7070
}
7171
// The example displays the following output:

samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/fspecifiers1.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22

33
public class Example
44
{
@@ -11,15 +11,15 @@ public static void Main()
1111
Console.WriteLine();
1212

1313
for (int ctr = 1; ctr <= 7; ctr++) {
14-
fmt = new String('f', ctr);
14+
fmt = new string('f', ctr);
1515
if (fmt.Length == 1) fmt = "%" + fmt;
16-
Console.WriteLine("{0,10}: {1:" + fmt + "}", fmt, ts);
16+
Console.WriteLine($"{fmt,10}: {ts.ToString(fmt)}");
1717
}
1818
Console.WriteLine();
1919

2020
for (int ctr = 1; ctr <= 7; ctr++) {
21-
fmt = new String('f', ctr);
22-
Console.WriteLine("{0,10}: {1:s\\." + fmt + "}", "s\\." + fmt, ts);
21+
fmt = $"s\\.{new string('f', ctr)}";
22+
Console.WriteLine($"{fmt,10}: {ts.ToString(fmt)}");
2323
}
2424
// The example displays the following output:
2525
// %f: 8

samples/snippets/csharp/VS_Snippets_CLR/conceptual.timespan.custom/cs/negativevalues1.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ public static void Main()
99
String fmt = (result < TimeSpan.Zero ? "\\-" : "") + "dd\\.hh\\:mm";
1010

1111
Console.WriteLine(result.ToString(fmt));
12-
Console.WriteLine($"Interval: {result:" + fmt + "}");
12+
Console.WriteLine($"Interval: {result.ToString(fmt)}");
1313
}
1414
}
1515
// The example displays output like the following:
16-
// -1291.10:54
17-
// Interval: -1291.10:54
16+
// -5582.12:21
17+
// Interval: -5582.12:21
1818
// </Snippet29>

samples/snippets/csharp/VS_Snippets_VBCSharp/csrefKeywordsModifiers/CS/csrefKeywordsModifiers.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ public abstract class Shape
785785
protected Shape(string color)
786786
{
787787
Color = color;
788-
Console.WriteLine("Created a shape with color {color}.");
788+
Console.WriteLine($"Created a shape with color {color}.");
789789
}
790790

791791
// Abstract method that must be implemented by derived classes
@@ -813,7 +813,7 @@ public class Program
813813
public static void Main(string[] args)
814814
{
815815
Square square = new Square("red", 5);
816-
Console.WriteLine("Area of the square: {square.CalculateArea()}");
816+
Console.WriteLine($"Area of the square: {square.CalculateArea()}");
817817
}
818818
}
819819
//</snippet27>

0 commit comments

Comments
 (0)