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

Error creating optimised runtime package store #21551

Closed
kabzit13 opened this issue Sep 24, 2021 · 5 comments
Closed

Error creating optimised runtime package store #21551

kabzit13 opened this issue Sep 24, 2021 · 5 comments
Assignees
Labels
Area-CLI untriaged Request triage from a team member

Comments

@kabzit13
Copy link

kabzit13 commented Sep 24, 2021

Description

Getting error during execution of a command. All errors connected to "Error: Could not load file or assembly".

dotnet store -m bad.xml -f netcoreapp3.1 -r linux-x64

manifest contains the next setup

<Project Sdk="Microsoft.NET.Sdk">
    <ItemGroup>
        <!--Bad packs-->
        <PackageReference Include="NEST" Version="7.10.1" />
		<PackageReference Include="NEST.JsonNetSerializer" Version="7.10.1" />
		<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.7" />
		<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.7">
			<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
			<PrivateAssets>all</PrivateAssets>
		</PackageReference>
		<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.7" />
		<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
		<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="5.0.0" />
		<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
    </ItemGroup>
</Project>

Execution logs are here.
logsDN.txt

Configuration

  • dotnet 3.1.413
  • amazon linux 2
  • x64

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@ghost
Copy link

ghost commented Sep 25, 2021

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

Getting error during execution of a command. All errors connected to "Error: Could not load file or assembly".

dotnet store -m bad.xml -f netcoreapp3.1 -r linux-x64

manifest contains the next setup

<Project Sdk="Microsoft.NET.Sdk"> <ItemGroup> <!--Bad packs--> <PackageReference Include="NEST" Version="7.10.1" /> <PackageReference Include="NEST.JsonNetSerializer" Version="7.10.1" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.7" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.7"> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <PrivateAssets>all</PrivateAssets> </PackageReference> <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.7" /> <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="5.0.0" /> <PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" /> </ItemGroup> </Project>

Execution logs are here.
logsDN.txt

Configuration

  • dotnet 3.1.413
  • amazon linux 2
  • x64

Author: kabzit13
Assignees: -
Labels:

area-Infrastructure, untriaged

Milestone: -

@ericstj
Copy link
Member

ericstj commented Sep 29, 2021

This appears to be an issue executing the dotnet store command. Transferring to CLI.

The errors in attached log point to issues cross-gen'ing

  Error: Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)
  Error compiling /home/ssm-user/.nuget/packages/microsoft.data.sqlclient/2.0.1/runtimes/unix/lib/netcoreapp3.1/Microsoft.Data.SqlClient.dll: Could not find or load a specific file. (0x80131621)

I would expect cross-gen to unify to framework assemblies here.

@ericstj ericstj transferred this issue from dotnet/runtime Sep 29, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-NuGet untriaged Request triage from a team member labels Sep 29, 2021
@marcpopMSFT marcpopMSFT self-assigned this Oct 5, 2021
@marcpopMSFT marcpopMSFT added needs team triage Requires a full team discussion and removed needs team triage Requires a full team discussion labels Oct 5, 2021
@marcpopMSFT marcpopMSFT assigned dsplaisted and unassigned marcpopMSFT Oct 6, 2021
@dsplaisted
Copy link
Member

This looks like it's mostly the same as #10973. I was able to successfully run dotnet store with the following project file:

<Project Sdk="Microsoft.NET.Sdk">
  <ItemGroup>
    <!--Bad packs-->
    <PackageReference Include="NEST" Version="7.10.1" />
    <PackageReference Include="NEST.JsonNetSerializer" Version="7.10.1" />
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.7" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.7">
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
    <!--<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.7" />-->
    <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
    <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="5.0.0" />
    <PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
  </ItemGroup>
  <Target Name="AddPackagesToPrune" AfterTargets="PrepforRestoreForComposeStore">
    <ItemGroup>
      <PackagesToPrune Include="Microsoft.CSharp" />
      <PackagesToPrune Include="System.Collections" />
      <PackagesToPrune Include="System.Collections.Concurrent" />
      <PackagesToPrune Include="System.Collections.Nongeneric" />
      <PackagesToPrune Include="System.Collections.Specialized" />
      <PackagesToPrune Include="System.ComponentModel" />
      <PackagesToPrune Include="System.ComponentModel.Primitives" />
      <PackagesToPrune Include="System.ComponentModel.TypeConverter" />
      <PackagesToPrune Include="System.Diagnostics.Debug" />
      <PackagesToPrune Include="System.Dynamic.Runtime" />
      <PackagesToPrune Include="System.Globalization" />
      <PackagesToPrune Include="System.IO" />
      <PackagesToPrune Include="System.Linq" />
      <PackagesToPrune Include="System.Linq.Expressions" />
      <PackagesToPrune Include="System.Net.Primitives" />
      <PackagesToPrune Include="System.Net.NameResolution" />
      <PackagesToPrune Include="System.ObjectModel" />
      <PackagesToPrune Include="System.Reflection" />
      <PackagesToPrune Include="System.Reflection.Extensions" />
      <PackagesToPrune Include="System.Resources.ResourceManager" />
      <PackagesToPrune Include="System.Runtime" />
      <PackagesToPrune Include="System.Runtime.Extensions" />
      <PackagesToPrune Include="System.Runtime.Numerics" />
      <PackagesToPrune Include="System.Runtime.Serialization.Formatters" />
      <PackagesToPrune Include="System.Runtime.Serialization.Json" />
      <PackagesToPrune Include="System.Runtime.Serialization.Primitives" />
      <PackagesToPrune Include="System.Security.Cryptography.Cng" />
      <PackagesToPrune Include="System.Security.Cryptography.Primitives" />
      <PackagesToPrune Include="System.Text.Encoding" />
      <PackagesToPrune Include="System.Text.Encoding.Extensions" />
      <PackagesToPrune Include="System.Text.RegularExpressions" />
      <PackagesToPrune Include="System.Threading" />
      <PackagesToPrune Include="System.Threading.Tasks" />
      <PackagesToPrune Include="System.Xml.ReaderWriter" />
      <PackagesToPrune Include="System.Xml.XDocument" />
      <PackagesToPrune Include="runtime.win.system.net.primitives" />
    </ItemGroup>
    <PropertyGroup>
      <PackagesToPrune>$(PackagesToPrune);@(PackagesToPrune)</PackagesToPrune>
    </PropertyGroup>
  </Target>
</Project>

However, if I uncomment the package reference to Microsoft.EntityFrameworkCore.SqlServer, then I get a few errors like the following:

Error generating PDB for 'C:\Users\Daniel\AppData\Local\Temp\15c2elxp.o4b\Microsoft.EntityFrameworkCore.SqlServer_5.0.7\runtimopt\Microsoft.EntityFrameworkCore.Relational.dll': Could not load type 'Microsoft.EntityFrameworkCore.Metadata.IPropertyBase' from assembly 'Microsoft.EntityFrameworkCore, Version=5.0.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
Error: compilation failed for "C:\Users\Daniel\AppData\Local\Temp\15c2elxp.o4b\Microsoft.EntityFrameworkCore.SqlServer_5.0.7\runtimopt\Microsoft.EntityFrameworkCore.Relational.dll" (0x80131522)

I'm not sure what's going on there.

@marcpopMSFT
Copy link
Member

Old issue triage: please let us know if this is still an issue.

@marcpopMSFT marcpopMSFT closed this as not planned Won't fix, can't repro, duplicate, stale Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-CLI untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

5 participants