microsoft / microsoft/node-api-dotnet
Version upgrade 0.7.6-> 0.7.7 breaks `dotnet build`
Open
@jasongin is already working on this.
Since Jan 10, 2025.
- Dominant language
- C#
- Stars
- 783
- Forks
- 80
- PR merge metrics
- No merged PRs in 30d
Description
I have a project working well with version 0.7.6. Below is the .csprj file:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
...
<PackageReference Include="Microsoft.JavaScript.NodeApi" Version="0.7.6" />
<PackageReference Include="Microsoft.JavaScript.NodeApi.Generator" Version="0.7.6" />
...
After changing the version to 0.7.7, this error appears:
CSC : error NAPI1001: TypeLoadException : Could not load type 'Microsoft.Extensions.Primitives.StringSegment' from assembly 'Microsoft.JavaScript.NodeApi.Generator.SymbolExtensions_1, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. at System.Reflection.Emit.TypeBuilder.CreateTypeNoLock() at System.Reflection.Emit.TypeBuilder.CreateType() at Microsoft.JavaScript.NodeApi.Generator.SymbolExtensions.<BuildReferencedTypes>g__BuildType|16_0(INamedTypeSymbol typeSymbol, IEnumerable`1 referencingSymbols) at Microsoft.JavaScript.NodeApi.Generator.SymbolExtensions.BuildReferencedTypes(INamedTypeSymbol typeSymbol, IEnumerable`1 referencingSymbols) at Microsoft.JavaScript.NodeApi.Generator.SymbolExtensions.<BuildReferencedTypes>g__BuildType|16_0(INamedTypeSymbol typeSymbol, IEnumerable`1 referencingSymbols) at Microsoft.JavaScript.NodeApi.Generator.SymbolExtensions.BuildReferencedTypes(INamedTypeSymbol typeSymbol, IEnumerable`1 referencingSymbols) at Microsoft.JavaScript.NodeApi.Generator.SymbolExtensions.<BuildReferencedTypes>g__BuildType|16_0(INamedTypeSymbol typeSymbol, IEnumerable`1 referencingSymbols) at Microsoft.JavaScript.NodeApi.Generator.SymbolExtensions.BuildReferencedTypes(INamedTypeSymbol typeSymbol, IEnumerable`1 referencingSymbols) at Microsoft.JavaScript.NodeApi.Generator.SymbolExtensions.<BuildReferencedTypes>g__BuildType|16_0(INamedTypeSymbol typeSymbol, IEnumerable`1 referencingSymbols) at Microsoft.JavaScript.NodeApi.Generator.SymbolExtensions.BuildReferencedTypes(INamedTypeSymbol typeSymbol, IEnumerable`1 referencingSymbols) ...
Below are version numbers of some dependencies:
Microsoft.Extensions.Primitives 8.0.0
System.Net.Http 4.3.4
System.Net.Primitives 4.3.0
System.Runtime 4.3.0
Is there a bug introduced between 0.7.6 and 0.7.7?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.