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.

Double write during publish

See original GitHub issue

Publishing a self-contained WPF template app writes some files twice because ResolvedFileToPublish has the same dll from different runtime packs (for example, Microsoft.Win32.Registry.dll comes from both netcoreapp and the windowsdesktop pack). This causes crossgen failures when used together with PublishReadyToRun=true.

Looks very similar to https://github.com/dotnet/sdk/issues/3035 which was addressed in https://github.com/dotnet/sdk/pull/3021, but I’m still seeing this with version 3.0.100-preview6-012031.

/cc @fadimounir @nguerrera @peterhuene

edit: it fails during PublishReadyToRun=true only when used together with the linker. Without linking, the duplicates are already crossgen’d, and so they don’t hit the failure. In any case, ResolvedFileToPublish has duplicates that shouldn’t be there, and we end up with DoubleWrites of some files.

image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:22 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
nguerreracommented, Jun 7, 2019

I have a fix locally for the satellite duplicates. It comes down to an msbuild batching behavior that I don’t actually understand yet. 😊 I will add some test coverage and also file a discussion issue on the msbuild repo so I can solidify my understanding and help future me and others with similar issues.

1reaction
dagoodcommented, Jun 7, 2019

It makes me nervous to have this excluded from ref for NETCore.App and excluded for runtime in Window.Desktop, but I guess that’s not much different than having an assembly in WindowsDesktop use all the API exposed… I guess we could do that @dagood what do you think?

I probably don’t know the full range of things to be nervous about with this–the concrete thing I can think of is the files disappearing from NETCoreApp’s runtime, breaking WindowsDesktop runtime. I’m pretty sure VerifyClosure wouldn’t catch that since it only looks at NETCoreApp’s References, but maybe it could be enhanced? Then we could make some change (not necessarily in VerifyClosure) to catch duplicate assemblies with the same versions to change to ref-only. Filed https://github.com/dotnet/core-setup/issues/6727.

But that just solves duplicates between NETCoreApp and WindowsDesktop, not sibling frameworks like WindowsDesktop and AspNetCore, so making publish nicely handle duplicates still seems necessary. Removing duplicates would just be to reduce FDD and dev-time disk usage.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dual Writes - The Unknown Cause of Data Inconsistencies
Dual writes have become the most common reasons for inconsistent data in a system of microservices. Learn what they are and why they...
Read more >
Message queuing and the database: Solving the dual write ...
When you need to write the same data to two storage locations, such as the database and Kafka, how can you ensure consistency?...
Read more >
Application lifecycle management - Finance & Operations
You've now successfully imported and applied a Microsoft-published dual-write table maps solution to your environment. Import table maps through ...
Read more >
Dual write and data inconsistency - Johnny Hashoul
Dual write occurs when the service aims to change the data at two ... The data should be saved in the database and...
Read more >
Double Submission, Double Publication - PMC
Double submission can be defined as "the submission of a paper to a journal after that is under concurrent review by another publication"....
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