0

I am following Sitecore documentation for installing Sitecore Commerce 8.2.1. I am done with almost all the steps required except the part Deploy the Commerce Engine. As mentioned there, if I unzipped the solution, changed .NET CORE SDK version to 2.1.2, which is installed on my machine and run dotnet restore at the root of SDK folder, I got the error message as below

MSBUILD : error MSB1011: Specify which project or solution file to use because this folder contains more than one project or solution file.

There are multiple solution files, so I took Customer.Sample.Solution.sln as the main file and ran command "dotnet restore Customer.Sample.Solution.sln" on that, I got the error as below

E:\Scom\Sitecore.Commerce.Engine\Sitecore.Commerce.Engine.xproj(7,3): error MSB4019: The imported project "C:\Program Files (x86)\dotnet\sdk\2.1.2\Microsoft\VisualStudio\v15.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. E:\Scom\Sitecore.Commerce.Plugin.AdventureWorks\Sitecore.Commerce.Plugin.AdventureWorks.xproj(7,3): error MSB4019: The imported project "C:\Program Files (x86)\dotnet\sdk\2.1.2\Microsoft\VisualStudio\v15.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. E:\Scom\PluginSamples\Plugin.Sample.Payments.Braintree\Plugin.Sample.Payments.Braintree.xproj(7,3): error MSB4019: The imported project "C:\Program Files (x86)\dotnet\sdk\2.1.2\Microsoft\VisualStudio\v15.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. E:\Scom\Sitecore.Commerce.Engine\Sitecore.Commerce.Engine.xproj : warning NU1503: Skipping restore for project 'E:\Scom\Sitecore.Commerce.Engine\Sitecore.Commerce.Engine.xproj'. The project file may be invalid or missing targets required for restore. [E:\Scom\Customer.Sample.Solution.sln] E:\Scom\Sitecore.Commerce.Plugin.AdventureWorks\Sitecore.Commerce.Plugin.AdventureWorks.xproj : warning NU1503: Skipping restore for project 'E:\Scom\Sitecore.Commerce.Plugin.AdventureWorks\Sitecore.Commerce.Plugin.AdventureWorks.xproj'. The project file may be invalid or missing targets required for restore. [E:\Scom\Customer.Sample.Solution.sln] E:\Scom\PluginSamples\Plugin.Sample.Payments.Braintree\Plugin.Sample.Payments.Braintree.xproj : warning NU1503: Skipping restore for project 'E:\Scom\PluginSamples\Plugin.Sample.Payments.Braintree\Plugin.Sample.Payments.Braintree.xproj'. The project file may be invalid or missing targets required for restore. [E:\Scom\Customer.Sample.Solution.sln] C:\Program Files (x86)\dotnet\sdk\2.1.2\NuGet.targets(103,5): warning : Unable to find a project to restore! [E:\Scom\Customer.Sample.Solution.sln]

Not sure if it plays any part but I have VS 2017 properly working and VS 2015 community with expired evaluation license. (The provided solution is for VS 2015)

So as I was unable to open it in VS 2015, I opened it with VS 2017 and upgraded the project and closed Visual Studio again. After that if I restore the project it works properly.

But when I tried to publish by then I again got the below error:

C:\Users\chaitanya.gadkari.nuget\packages\baseclass.contrib.nuget.output\2.1.0\build\net40\Baseclass.Contrib.Nuget.Output.targets(73,5): error MSB4175: The task factory "CodeTaskFactory" could not be loaded from the assembly "C:\Program Files (x86)\dotnet\sdk\2.1.2\Microsoft.Build.Tasks.v15.0.dll". Could not load file or assembly 'C:\Program Files (x86)\dotnet\sdk\2.1.2\Microsoft.Build.Tasks.v15.0.dll'. The system cannot find the file specified. [E:\Scom\PluginSamples\Plugin.Sample.Habitat\Plugin.Sample.Habitat.csproj] Plugin.Sample.Payments.Braintree -> E:\Scom\PluginSamples\Plugin.Sample.Payments.Braintree\bin\Debug\net461\Plugin.Sample.Payments.Braintree.dll C:\Users\chaitanya.gadkari.nuget\packages\baseclass.contrib.nuget.output\2.1.0\build\net40\Baseclass.Contrib.Nuget.Output.targets(73,5): error MSB4175: The task factory "CodeTaskFactory" could not be loaded from the assembly "C:\Program Files (x86)\dotnet\sdk\2.1.2\Microsoft.Build.Tasks.v15.0.dll". Could not load file or assembly 'C:\Program Files (x86)\dotnet\sdk\2.1.2\Microsoft.Build.Tasks.v15.0.dll'. The system cannot find the file specified. [E:\Scom\Sitecore.Commerce.Plugin.AdventureWorks\Sitecore.Commerce.Plugin.AdventureWorks.csproj]

If I open the project in Visual Studio there are two more errors as below:

There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Users\chaitanya.gadkari.nuget\packages\sitecore.commerce.assemblies.common\11.4.148\lib\net452\CommerceServer.Core.Internal.ContentListHelper.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. Sitecore.Commerce.Plugin.AdventureWorks C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets

Anyone have faced this issue while deploying Sitecore Commerce? Is there any specific version of .NET Framework I need to install? Or anything which I am missing?

1

You need to follow Sitecore documentation that you mentioned in your question at the beginning precisely. Therefore you have to use VS2015 when you want to develop / deploy Sitecore Commerce 8.2.1 solution. You also need to download and install precisely .NET Core 1.0.3 SDK Preview 2 build 3156 and .NET Core 1.0.1 Visual Studio 2015 Tooling Preview 2.

See more software prerequisites and tooling requirements in Sitecore Commerce Documentation:

  • Is there no way to use VS 2017 for deployment? I have .NET Core SDK 64 bit installed, – Chaitanya Gadkari Jul 10 '18 at 5:51
  • @ChaitanyaGadkari You need to have VS2015 as far as I am informed. We have also started developement last year with VS2017 but reverted to VS2015. If you have MSDN license it shouldn't be problem for you to switch there. Do not use Community Edition of VS, it won't work out. – Peter Procházka Jul 10 '18 at 6:41
  • 1
    Update on it, I had to install 32 bit version of .net core, and publishing went well without any issue.... So it was not VS issue but I think it specifically need 32 bit version of that .net core SDK and wont work with 64 bit one – Chaitanya Gadkari Jul 10 '18 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.