Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version upgrade 0.7.6-> 0.7.7 breaks dotnet build #409

Open
james-hu opened this issue Dec 17, 2024 · 0 comments
Open

Version upgrade 0.7.6-> 0.7.7 breaks dotnet build #409

james-hu opened this issue Dec 17, 2024 · 0 comments
Assignees

Comments

@james-hu
Copy link

james-hu commented Dec 17, 2024

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?

@james-hu james-hu changed the title Version upgrade 0.4.34 -> 0.8.16 breaks dotnet build Version upgrade 0.7.6-> 0.7.7 breaks dotnet build Dec 19, 2024
@jasongin jasongin self-assigned this Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants