Reputation: 11
My current project class library running on .NET 4.7.2, and we are using Microsoft.Azure.DocumentDB
package. We have to update to version 3 of Azure.
Questions:
Microsoft.Azure.Cosmos
package with class library in .NET 4.7, or is Microsoft.Azure.Cosmos
package only supported on .NET Standard ?Upvotes: 1
Views: 503
Reputation: 15603
Microsoft.Azure.Cosmos is a NET Standard 2.0 library, NET Standard is an interface that defines a series of APIs that are implemented by different frameworks: https://learn.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-2-0
.NET Framework 4.7.2 is a framework implementation, compatible with NET Standard 2.0:
So the answer is, you can use Microsoft.Azure.Cosmos on a .NET 4.7.2 application without issues.
For migration from Microsoft.Azure.DocumentDB to Microsoft.Azure.Cosmos see: https://learn.microsoft.com/azure/cosmos-db/sql/migrate-dotnet-v3
The "Inaccessible due to protection level error" errors you are getting are probably due to your code still referencing APIs or types from Microsoft.Azure.DocumentDB. These are two different Major Version libraries, so your application code needs to change due to the breaking changes.
Upvotes: 2