简体   繁体   中英

Error when Deploying Commerce Engine

I am setting Sitecore Commerce on my machine. At the Deploy Commerce Engine stage Link . On the dotnet restore command, I am getting this error where it says AspNetCore.OData is not compatible.

Errors in C:\\Users\\xxxx\\Downloads\\SitecoreCommerce8.2.1_1.0.20\\Sitecore.Commerce.SDK.1.0.2301\\Sitecore.Commerce.Engine\\project.json Package Microsoft.AspNetCore.OData 6.0.0-alpha1-rtm-171013 is not compatible with net452 (.NETFramework,Version=v4.5.2). Package Microsoft.AspNetCore.OData 6.0.0-alpha1-rtm-171013 supports: net461 (.NETFramework,Version=v4.6.1) One or more packages are incompatible with .NETFramework,Version=v4.5.2.

I checked in the gobal.json in Sitecore.Commerce.SDK and the Core version matches the Dotnet SDK version "version": "1.0.0-preview2-003121"

I have .net 4.5,4.6.1 and 4.6.2 installed on my machine.

Adding the cmd file log for refrence

C:\\Program Files (x86)\\Commerce Server 11\\Tools>cd C:\\Users\\xxxxx\\Downloads\\SitecoreCommerce8.2.1_1.0.20\\Sitecore.Commerce.SDK.1.0.2301

C:\\Users\\xxxxx\\Downloads\\SitecoreCommerce8.2.1_1.0.20\\Sitecore.Commerce.SDK.1.0.2301>dotnet restore

log : Restoring packages for C:\\Users\\xxxxx\\Downloads\\SitecoreCommerce8.2.1_1.0.20\\Sitecore.Commerce.SDK.1.0.2301\\PluginSamples\\Plugin.Sample.Habitat\\project.json... log : Restoring packages for C:\\Users\\xxxxx\\Downloads\\SitecoreCommerce8.2.1_1.0.20\\Sitecore.Commerce.SDK.1.0.2301\\PluginSamples\\Plugin.Sample.Payments.Braintree\\project.json... log : Restoring packages for C:\\Users\\xxxxx\\Downloads\\SitecoreCommerce8.2.1_1.0.20\\Sitecore.Commerce.SDK.1.0.2301\\Sitecore.Commerce.Engine\\project.json... log : Restoring packages for C:\\Users\\xxxxx\\Downloads\\SitecoreCommerce8.2.1_1.0.20\\Sitecore.Commerce.SDK.1.0.2301\\Sitecore.Commerce.Plugin.AdventureWorks\\project.json... log : Restoring packages for tool 'Microsoft.AspNetCore.Server.IISIntegration.Tools' in C:\\Users\\xxxxx\\Downloads\\SitecoreCommerce8.2.1_1.0.20\\Sitecore.Commerce.SDK.1.0.2301\\Sitecore.Commerce.Engine\\project.json...

log : Writing lock file to disk. Path: C:\\Users\\xxxxx\\Downloads\\SitecoreCommerce8.2.1_1.0.20\\Sitecore.Commerce.SDK.1.0.2301\\PluginSamples\\Plugin.Sample.Habitat\\project.lock.json log : Writing lock file to disk. Path: C:Users\\xxxxx\\Downloads\\SitecoreCommerce8.2.1_1.0.20\\Sitecore.Commerce.SDK.1.0.2301\\PluginSamples\\Plugin.Sample.Payments.Braintree\\project.lock.json

log : C:\\Users\\xxxxx\\Downloads\\SitecoreCommerce8.2.1_1.0.20\\Sitecore.Commerce.SDK.1.0.2301\\PluginSamples\\Plugin.Sample.Habitat\\project.json log : Restore completed in 11844ms.

log : C:\\Users\\xxxxx\\Downloads\\SitecoreCommerce8.2.1_1.0.20\\Sitecore.Commerce.SDK.1.0.2301\\PluginSamples\\Plugin.Sample.Payments.Braintree\\project.json log : Restore completed in 11856ms.

log : Writing lock file to disk. Path: C:\\Users\\xxxxx\\Downloads\\SitecoreCommerce8.2.1_1.0.20\\Sitecore.Commerce.SDK.1.0.2301\\Sitecore.Commerce.Plugin.AdventureWorks\\project.lock.json log : C:\\Users\\xxxxx\\Downloads\\SitecoreCommerce8.2.1_1.0.20\\Sitecore.Commerce.SDK.1.0.2301\\Sitecore.Commerce.Plugin.AdventureWorks\\project.json log : Restore completed in 11388ms.

error: Package Microsoft.AspNetCore.OData 6.0.0-alpha1-rtm-171013 is not compatible with net452 (.NETFramework,Version=v4.5.2). Package Microsoft.AspNetCore.OData 6.0.0-alpha1-rtm-171013 supports: net461 (.NETFramework,Version=v4.6.1) error: One or more packages are incompatible with .NETFramework,Version=v4.5.2. log : Writing lock file to disk. Path: C:\\Users\\xxxxx\\Downloads\\SitecoreCommerce8.2.1_1.0.20\\Sitecore.Commerce.SDK.1.0.2301\\Sitecore.Commerce.Engine\\project.lock.json log : C:\\Users\\xxxxx\\Downloads\\SitecoreCommerce8.2.1_1.0.20\\Sitecore.Commerce.SDK.1.0.2301\\Sitecore.Commerce.Engine\\project.json log : Restore failed in 22890ms.

Errors in C:\\Users\\xxxxx\\Downloads\\SitecoreCommerce8.2.1_1.0.20\\Sitecore.Commerce.SDK.1.0.2301\\Sitecore.Commerce.Engine\\project.json Package Microsoft.AspNetCore.OData 6.0.0-alpha1-rtm-171013 is not compatible with net452 (.NETFramework,Version=v4.5.2). Package Microsoft.AspNetCore.OData6.0.0-alpha1-rtm-171013 supports: net461 (.NETFramework,Version=v4.6.1) One or more packages are incompatible with .NETFramework,Version=v4.5.2.

The project.json file on Sitecore.Commerce.SDK.1.0.2301\\Sitecore.Commerce.Engine has dependencies set like this:

"Microsoft.AspNetCore.OData": "6.0.0-alpha1-rtm-*"

Unfortunately, the latest version (171013) seems to require a higher version of .NET

edit the file and make specify a lower version

"Microsoft.AspNetCore.OData": "6.0.0-alpha1-rtm-121216"

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