question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet store cross-gen all versions of a dependency

See original GitHub issue

From my understanding, the current dotnet store restores and cross-gens each package separately and this could lead to multiple versions of the same dependency in the store, even though we envision only one version being loaded at runtime.

This is better illustrated by the Microsoft.AspNetCore.Hosting package in the sample repro I have created at https://github.com/JunTaoLuo/StoreMultiVersion. The dependency is brought in via Microsoft.ApplicationInsights.AspNetCore:2.0.0 -> Microsoft.AspNetCore.Hosting:1.0.0 and Microsoft.AspNetCore.Server.Kestrel:2.0.0-preview1-final -> "Microsoft.AspNetCore.Hosting:2.0.0-preview1-final. This leads to both the 1.0.0 and 2.0.0-preview1-final versions of Hosting to be produced in the cache in the .out/ directory of the repro.

We envision users to consume all of our packages through the metapackage which means the version of Hosting will always resolve to 2.0.0-preview1-final, see the obj/project.assets.json and the *.deps.json files. The proposal here is that since only the 2.0.0-preview1-final version is used by the app, we should only produce stores with that resolved version by mimicking the logic in restore. Does this make sense?

cc @gkhanna79 @eerhardt @ramarag

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:34 (34 by maintainers)

github_iconTop GitHub Comments

2reactions
natemcmastercommented, May 24, 2019

I think the proposal works for aspnet. I review the store we ship in Microsoft.AspNetCore.AzureAppServices.SiteExtension, and I only see one version of each package.

1reaction
nguerreracommented, Jun 20, 2019

Yes, I have a pr up that should get merged tomorrow. It should fix the race conditions and allow tfm of 3.0 with store. But it’s not the redesign I envisioned above nor does it change anything about storing multiple versions. I still hope to get that in, but it’s quite big and I don’t have an ETA. I believe nothing is blocked on it after the current pr goes in.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Conversation about crossgen2 - .NET Blog
When publishing your application, Crossgen runs the JIT over all assemblies and stores the JITted code in an extra section that can be ......
Read more >
Dotnet runtime store: Crossgen can't find the System. ...
I am trying to build the runtime store for my application, optimized for target runtime. However it fails to resolve the System.
Read more >
Deep-dive into .NET Core primitives, part 2: the shared ...
NET Core apps run in one of two modes: framework-dependent or self-contained. ... All/$version/ folder, you will see a Microsoft.AspNetCore.
Read more >
.NET 6 Release Candidate 1 Ships - ...
Microsoft shipped the first of two Release Candidate versions of .NET 6, set to debut in November as a consolidation of all the...
Read more >
.Net 6 - New Features, Release Date, Preview 1-7, ...
In the .NET 6 release, you will have an improvised version of Microsoft.Extensions APIs. The .NET team has worked on hosting & dependency...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found