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?