0

I would like to setup CI/CD for sitecore habitat project for learning purpose. I'm able to restore the nuget package but build is not succeeding.Below is my build definition. enter image description here

I have not done any changes in the sitecore habitat build. just downloaded the source from Github and trying. Build is happening properly in local visual studio without any issues but failed in the vsts.

Error as follows.

Done Building Project "D:\a\1\s\src\Feature\Language\Tests\Sitecore.Feature.Language.Tests.csproj" (default targets) -- FAILED. Project "D:\a\1\s\Habitat.sln" (1) is building "D:\a\1\s\src\Feature\Maps\tests\Sitecore.Feature.Maps.Tests.csproj" (35) on node 1 (default targets). PrepareForBuild: Creating directory "bin\Debug\". Creating directory "obj\Debug\". Done Building Project "D:\a\1\s\src\Feature\Maps\tests\Sitecore.Feature.Maps.Tests.csproj" (default targets) -- FAILED. Project "D:\a\1\s\Habitat.sln" (1) is building "D:\a\1\s\src\Feature\Media\Tests\Sitecore.Feature.Media.Tests.csproj" (36) on node 1 (default targets). PrepareForBuild: Creating directory "bin\Debug\". Creating directory "obj\Debug\". Copying file from "obj\Debug\Sitecore.Foundation.Installer.Tests.dll.config" to "bin\Debug\Sitecore.Foundation.Installer.Tests.dll.config". CopyFilesToOutputDirectory: Copying file from "obj\Debug\Sitecore.Foundation.Installer.Tests.dll" to "bin\Debug\Sitecore.Foundation.Installer.Tests.dll".
Sitecore.Foundation.Installer.Tests -> D:\a\1\s\src\Foundation\Installer\tests\bin\Debug\Sitecore.Foundation.Installer.Tests.dll Copying file from "obj\Debug\Sitecore.Foundation.Installer.Tests.pdb" to "bin\Debug\Sitecore.Foundation.Installer.Tests.pdb". Done Building Project "D:\a\1\s\src\Foundation\Installer\tests\Sitecore.Foundation.Installer.Tests.csproj" (default targets). Project "D:\a\1\s\Habitat.sln" (1) is building "D:\a\1\s\src\Foundation\LocalDatasource\tests\Sitecore.Foundation.LocalDatasource.Tests.csproj" (46) on node 1 (default targets). ServiceCollectionExtensions.cs(7,18): error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) [D:\a\1\s\src\Foundation\DependencyInjection\code\Sitecore.Foundation.DependencyInjection.csproj] ServiceCollectionExtensions.cs(8,17): error CS0234: The type or namespace name 'Extensions' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [D:\a\1\s\src\Foundation\DependencyInjection\code\Sitecore.Foundation.DependencyInjection.csproj] ServiceCollectionExtensions.cs(13,20): error CS0234: The type or namespace name 'Diagnostics' does not exist in the namespace 'Sitecore' (are you missing an assembly reference?) [D:\a\1\s\src\Foundation\DependencyInjection\code\Sitecore.Foundation.DependencyInjection.csproj] Infrastructure\MvcControllerServicesConfigurator.cs(3,21): error CS0234: The type or namespace name 'Extensions' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [D:\a\1\s\src\Foundation\DependencyInjection\code\Sitecore.Foundation.DependencyInjection.csproj] Infrastructure\MvcControllerServicesConfigurator.cs(4,20): error CS0234: The type or namespace name 'DependencyInjection' does not exist in the namespace 'Sitecore' (are you missing an assembly reference?) [D:\a\1\s\src\Foundation\DependencyInjection\code\Sitecore.Foundation.DependencyInjection.csproj] Infrastructure\MvcControllerServicesConfigurator.cs(6,54): error CS0246: The type or namespace name 'IServicesConfigurator' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\src\Foundation\DependencyInjection\code\Sitecore.Foundation.DependencyInjection.csproj] Infrastructure\MvcControllerServicesConfigurator.cs(8,31): error CS0246: The type or namespace name 'IServiceCollection' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\src\Foundation\DependencyInjection\code\Sitecore.Foundation.DependencyInjection.csproj] ServiceCollectionExtensions.cs(19,64): error CS0246: The type or namespace name 'IServiceCollection' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\src\Foundation\DependencyInjection\code\Sitecore.Foundation.DependencyInjection.csproj]

  5 Warning(s)
23 Error(s) Time Elapsed 00:00:42.00 Process 'msbuild.exe' exited with code '1'.
2
  • Is this using the latest Habitat release? And you're sure there were no errors/warnings during the nuget restore? Jul 19, 2018 at 16:44
  • I was getting some issue when i was using the latest release. yeah there is no issue with nuget restore. It's working fine. One month ago i download github habitat code and it's working fine. I'm using it for learning. Thanks for your help.
    – arjunan
    Jul 20, 2018 at 15:10

1 Answer 1

0

I set up a quick VSTS build against Habitat master and was able to get it working, through the Build step at least. (Tests would require more work as FakeDB needs a Sitecore license.xml.)

build configuration

Some notes on the config:

  • I used the ASP.NET build template
  • Defaulted to nuget 4.4.1 for me
  • Needed to configure the nuget restore to use the Habitat nuget.config
  • You need to set the BuildConfiguration variable to debug because of this

Otherwise it "just worked."

1
  • @arjunan - No problem, please accept the answer if this gave you the solution you needed. Jul 26, 2018 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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