Skip to content

Support for DotNet 10.0 #470

Open
Open

Description

We're using node-api-dotnet on a project that is currently on DotNet 9.0. We need to update to 10.0 to pick up some required changes. It looks like this project doesn't build a DotNet 10.0 version of the library currently.

Activity

  1. BrianMar commented on Feb 2, 2026

    @BrianMar
    Author

    I'm seeing the "IsDotNet10SdkAvailable" flag being set in a number of projects. However, the "global.json" file locks us to version 9.0.100, so the DotNet 10.0.102 SDK isn't being picked up.

    Updating the "global.json" to use "10.0.102" builds the net10.0 folders and the tests pass. So it looks like we just need to update the global.json and then publish a new version. Looking at the contributor instructions to see if DotNet update procedures are described.

  2. ladeak commented on Apr 17, 2026

    @ladeak

    Maybe the previous PR gives some idea: bb2575c

    Brian Marshall (@BrianMar) did you manage to get it working with .NET 10?

  3. ladeak commented on Apr 17, 2026

    @ladeak

    It seems to partially work for .net 10, but it has trouble loading native libraries: when using HttpClient with HTTP/3, the msquic library fails to load.

  4. dotnetjunky commented on May 19, 2026

    @dotnetjunky
    Contributor

    ladeak Brian Marshall (@BrianMar) I created a draft PR to support .net 10 here #476 but the build failed because it couldn't restore the nuget package 'Microsoft.NET.ILLink.Tasks' version 10. Do we need to push this package to the ADO nuget feed?

  5. ladeak commented on May 19, 2026

    @ladeak

    Yes, it seems to that is the only allowed nuget feed:

    <!-- We must use ADO feed to be compliant. -->

    EDIT: seems to be internal to MS feed, so maybe Vladimir Morozov (@vmoroz) can help with that?

  6. dotnetjunky commented on May 19, 2026

    @dotnetjunky
    Contributor

    The feed is publicly accessible, but the .nupkg file itself is protected. Vladimir Morozov (@vmoroz) Do we need to do something to make the version 10 of this assembly publicly available?

    Meanwhile, I changed my draft PR to download the package from the public NuGet feed to work around this build error. (just temporarily to see if the build passes. I'll revert this change before merging)

  7. dotnetjunky commented on May 19, 2026

    @dotnetjunky
    Contributor

    ladeak Some unit tests failed. Are you familiar with those errors?

  8. ladeak commented on May 19, 2026

    @ladeak

    No, I am not familiar with these errors. I see that these are build failures in HostedClrTests.cs L61

    Assert.Fail(): Build failed. Check the log for details: D:\a\node-api-dotnet\node-api-dotnet\out\obj\Release\TestCases\napi-dotnet\net9.0\hosted-build.log
       at Microsoft.JavaScript.NodeApi.Test.HostedClrTests.Test(String id) in D:\a\node-api-dotnet\node-api-dotnet\test\HostedClrTests.cs:line 61
       at InvokeStub_HostedClrTests.Test(Object, Span`1)
       at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    

    I wonder if I can see the complete logs, do you see the actual build errors? Maybe something like: Build process exited with code: from https://github.com/microsoft/node-api-dotnet/blob/main/test/TestBuilder.cs#L170 file?

  9. dotnetjunky commented on May 19, 2026

    @dotnetjunky
    Contributor

    I don't see the complete log/build error either.

  10. dotnetjunky commented on May 19, 2026

    @dotnetjunky
    Contributor

    Let me try something.

  11. dotnetjunky commented on May 19, 2026

    @dotnetjunky
    Contributor

    ladeak OK, the build passed, but I need to undo my changes to the NuGet feeds.

  12. ladeak commented on May 19, 2026

    @ladeak

    May I ask what the issue was or how you figured it out?

  13. dotnetjunky commented on May 19, 2026

    @dotnetjunky
    Contributor

    There were 2 issues with the tests:

    1. Similar to the main build, the test projects are also configured to download some packages from the ADO feed, which failed with the 401 error.
    2. Due to some misconfigurations, the test projects were built with the wrong .net target framework. They were built with .net 10, instead of the framework that they are meant to be tested in.

    As for how I figured it out, I didn't. I asked Github Copilot to fix it ;)

  14. ladeak commented on Aug 15, 2026

    @ladeak

    Is this issue still unresolved? Luan Nguyen (@dotnetjunky) , need any help?

  15. dotnetjunky commented on Aug 15, 2026

    @dotnetjunky
    Contributor

    ladeak Thank you. The issue has been resolved. Recent package versions have added support for .NET 10.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions