1

During local solution rebuild or in Dev/QA deployments, one of my Foundation project's Views folder is not getting deployed to the webroot.

Note:

  • All the views folder from all the feature projects are getting deployed as expected.
  • None of the other foundation projects has views folder.

Version details: Sitecore 10.1.2 Visual Studio 2019

Am I missing anything here? Or, as per community blogs I see that the publishOptions has to be modified.

Can someone help me how do it allow my foundation views to be deployed. Thanks in Advance!

3
  • Are the views each marked as Content in visual studio? This can be seen on the properties tab. Commented Sep 26, 2022 at 23:40
  • are you using gulp to publish all your projects? Commented Sep 27, 2022 at 10:01
  • Yes, it is marked as Content. There was some reference path issue and while I corrected the path, the issue got resolved. Thanks Commented Sep 29, 2022 at 10:41

1 Answer 1

2

You can check a few things. Go to Visual Studio and right-click on view and select the properties tab.

  1. Make sure the Build Action option for View is Content like in the below image.
  2. Also Copy to Output Directory has 3 options, make sure to choose as per requirement.

enter image description here

1
  • 1
    Thanks @Gaurav for sharing details. Issue got resolved. Initially the project was placed in a location as -> /code/<foldername>/projectname.csproj. Later I moved it directly under /code/projectname.csproj The reference changes did not happen accodingly in my master project and the view files weren't getting deployed. Once the path was corrected, things worked as expected. Commented Sep 29, 2022 at 10:38

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.