简体   繁体   中英

Microsoft.OData.ModelBuilder incompatible with Microsoft.AspNetCore.OData .NET5.0

I have a .NET5 OData project that I am trying to deploy to an Azure App Service. My project uses Microsoft.AspNetCore.OData version 8.0.8, which supports .NET5.

I am getting the following error in my Azure pipeline:

Package Microsoft.OData.ModelBuilder 1.0.8 is not compatible with.net50 (.NETFramework,Version=v5.0). Package Microsoft.OData.ModelBuilder 1.0.8 supports: -.net60 (.NETFramework,Version=v6.0) -.netstandard2.0 (.NETStandard,Version=v2.0)

When I review the Nuget packages, it states that Microsoft.OData.ModelBuilder does not support .NET5, but Microsoft.AspNetCore.OData does support .NET5, and depends on Microsoft.OData.ModelBuilder 在此处输入图像描述

You can see that Microsoft.OData.ModelBuilder does not support .NET5. 在此处输入图像描述

How am I supposed to use Microsoft.AspNetCore.OData with a .NET5 application when it's dependencies do not support .NET5?

And none of the previous versions of Microsoft.OData.ModelBuilder support .NET5. I don't see how I can get this to work even with an earlier version.

Thanks for your help.

Since I didn't receive any feedback, I was force to upgrade my web project to .NET6. Afterwards, I updated Microsoft.AspNetCore.OData to the latest version, where both Microsoft.AspNetCore.OData and Microsoft.OData.ModelBuilder support .NET6.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM