manus-skills/.kortix/opencode/skills/coding/migrate-dotnet9-to-dotnet10/references/containers-interop-dotnet9to10.md
zhukang 1c7abd81d1 All 310 Manus skill-hub community skills as a Kortix marketplace registry
- 310 registry:skill items, 1528 files, 7 categories (hub tags)
- registry.json generated by @kortix/registry buildRegistry
- nested SKILL.md in sn-da-* renamed SUBSKILL.md (no phantom skills)
- provenance + licenses: SOURCES.md
2026-09-15 13:37:20 +08:00

3.0 KiB

Containers, Interop, and Deployment Breaking Changes (.NET 10)

These changes affect Docker containers, single-file apps, native interop (P/Invoke), and deployment scenarios.

Containers

Default .NET images use Ubuntu (Debian images discontinued)

Impact: Medium. Default .NET container image tags now reference Ubuntu 24.04 (Noble Numbat) instead of Debian. Debian-based images are no longer provided for .NET 10.

# .NET 10 images — all Ubuntu-based
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
FROM mcr.microsoft.com/dotnet/aspnet:10.0
FROM mcr.microsoft.com/dotnet/runtime:10.0

# Explicit Ubuntu tag (same as default)
FROM mcr.microsoft.com/dotnet/sdk:10.0-noble

What to check:

  • Dockerfile RUN apt-get commands — Ubuntu and Debian share apt but may differ in available packages and versions
  • Native library dependencies that were Debian-specific
  • Custom base image layers that assumed Debian
  • CI/CD scripts that referenced Debian-specific image tags

If you need Debian: Create custom images following Microsoft's guide for installing .NET in a Dockerfile.

Interop

Single-file apps no longer look for native libraries in executable directory

In single-file apps, the application directory is no longer automatically added to NATIVE_DLL_SEARCH_DIRECTORIES. The directory is only searched when DllImportSearchPath.AssemblyDirectory is included in the search paths (which is the default for P/Invokes without explicit search paths).

Breaking scenario: P/Invokes with [DefaultDllImportSearchPaths] that explicitly exclude AssemblyDirectory:

// This no longer finds "lib" in the app directory:
[DllImport("lib")]
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
static extern void Method();

// Fix: Add AssemblyDirectory to the search paths:
[DllImport("lib")]
[DefaultDllImportSearchPaths(DllImportSearchPath.System32 | DllImportSearchPath.AssemblyDirectory)]
static extern void Method();

For NativeAOT on non-Windows, the rpath is no longer set to the application directory. Add explicit linker arguments if needed.

DllImportSearchPath.AssemblyDirectory only searches the assembly directory

DllImportSearchPath.AssemblyDirectory now strictly searches only the assembly directory, not additional directories that were previously included.

Casting IDispatchEx COM object to IReflect fails

Casting a COM object that implements IDispatchEx to IReflect now fails. Use dynamic or explicit COM interop interfaces instead.

Other Changes

  • Globalization: Environment variable renamed to DOTNET_ICU_VERSION_OVERRIDE
  • Reflection: [DynamicallyAccessedMembers] annotations on IReflect.InvokeMember, Type.FindMembers are more restrictive (new trim warnings possible)
  • Reflection: Type.MakeGenericSignatureType arguments validated more strictly
  • VS Code: dotnet.acquire API no longer always downloads latest — pin specific versions