0

Currently using msbuild in dev ops to build and publish our sc helix solution. Each project in the helix solution has a web.config file and ive noticed that after the build and publish the web.config file is not correct. It seems to be randomly selecting a web.config to publish from one of the feature / foundation projects and not the main project web.config. Has anyone else encountered this? Below is the build task in my pipeline

task: MSBuild@1
  displayName: 'MSBuild: Full Build Sitecore solution'
  inputs:
    solution: '$(solution)'
    msbuildVersion: '17.0'
    msbuildArchitecture: 'x64'
    configuration: '$(buildConfiguration)'
    platform: '$(buildPlatform)'
    clean: true
    msbuildArguments: '/p:DeployOnBuild=true /p:DeployDefaultTarget=WebPublish /p:WebPublishMethod=FileSystem /p:DeleteExistingFiles=false /p:publishUrl=$(Build.SourcesDirectory)\Deploy\website'
  condition: and(succeeded(), eq(${{ parameters.runPRBuild }}, false))

1 Answer 1

0

For every feature / foundation projects select build action as None in Solution Explorer:

enter image description here

That will make sure that they won't be published during your build process.

2
  • Thanks for the info. I have been through the whole solution and set the configs as you specified. I also noticed that the actual project web config was set to none which i set to content. Just testing it now Commented Sep 2, 2022 at 11:19
  • For your actual project too, you should keep it as None so that you dont overwrite default Web.config in Sitecore instance until you have some changes in it that you want to push to higher environments.
    – Ghan
    Commented Sep 2, 2022 at 12:59

Your Answer

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

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