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.

Requiring references to dependency after upgrading to preview8 SDK

See original GitHub issue

Source code: https://github.com/dotnet/efcore/

We use Microsoft.Azure.Cosmos version 3.12.0 in one of our package we ship. It was building fine with preview7 SDK. When we upgraded to preview8 SDK, we started getting compile time error.

CSC : error CS0012: The type ‘PartitionKeyInternal’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘Microsoft.Azure.Cosmos.Direct, Version=3.11.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’. [D:\code\efcore\src\EFCore.Cosmos\EFCore.Cosmos.csproj]

Looking at the package Microsoft.Azure.Cosmos.Direct it is implementation detail of Microsoft.Azure.Cosmos and not supposed to be consumed directly. Further, we are not using PartitionKeyInternal type in our project at all.

After adding dependency to Cosmos.Direct manually, everything works correctly. But it should not be needed. Any pointers?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:18 (3 by maintainers)

github_iconTop GitHub Comments

10reactions
HiroyukiSakohcommented, Nov 11, 2020

I had the same problem after updating to VS 16.8.0. Is this a problem with the compiler?

2reactions
AjaySewradjcommented, Nov 13, 2020

I also got the same problem after upgrading to VS 16.8.1. The problem was fixed when I updated the Microsoft.Azure.Cosmos package to version 3.15.1-preview

Read more comments on GitHub >

github_iconTop Results From Across the Web

Requiring references to dependency after upgrading ...
We use Microsoft.Azure.Cosmos version 3.12.0 in one of our package we ship. It was building fine with preview7 SDK. When we upgraded to...
Read more >
How to prevent upgrade of references when using NuGet
0.0. So my question is how I can stop NuGet and MsBuild to upgrade direct references of my assembly to versions of transitive...
Read more >
Announcing .NET 8 Preview 5
The Linux distribution-built (source-build) SDK can now build self-contained applications that utilizes source-build runtime packages.
Read more >
Include both Nuget Package References *and* project ...
One issue I have been encountering is that the command was either referencing the required nuget packages, or the project reference DLLs, ...
Read more >
ASP.NET Core updates in .NET 8 Preview 6
To setup Redis-based output caching, add a package reference to Microsoft.Extensions.Caching.StackExchangeRedis and then configure the required ...
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