7

In our typical setup, we try to keep a TDS project that has test content for the developers, while a separate TDS project contains the essential solution architecture such as renderings and templates.

However, because of the parent/child structure in the project, sometimes top level items are required to be in both projects (such as sitecore\content). We have it there because it's required as a parent, but we want to make sure only one project is actively being updated for that item.Is there a way to specify in a project to 'never sync' a certain item? Even when a user sync's the whole project?

NOTE: I understand 'Exclude' can be used for build configurations, but that excludes the whole subtree. In this case, we just want a specific parent to be ignored.

5

As I understand, your question is about the possibility not to include some parent items in a TDS project at all. I agree that it would have been nice if such items were not duplicated on the file system and you wouldn't see the same item being changed twice in the same commit to your code repository.

TDS uses Sitecore's native serialization format and structure. It requires that the whole item path starting from root-level items (such as /sitecore/content and /sitecore/layout), and down to the particular node-level items, are all serialized to disc as *.item files. There is no way around it.

The standard approach with TDS is to:

  1. Include such items in both projects;
  2. Set the item's "Item Deploy" field to "Deploy Once" in the Deployment Property Manager;
  3. Configure Multi-Project Properties so that your test content project has the main project listed in "Package bundling". This is a good practice, since you're effectively defining a project dependency this way and make sure the items from the main TDS project always get deployed along with your test content.

If you would like to avoid syncing every TDS project to get changes of the same item, you can use the new TDS 5.5 feature "Sync all projects using history".

  • Thank you Dmytro. We are using Deploy Once, but this is ignored by the Sync window and will still show as a delta. It is not so much that we want to not have it in source control, we just want a way to have an item 'ignored' for changes. It can be there, I just don't want users having to always update it because it happens to be there for structural reasons. – Jason St-Cyr Oct 7 '16 at 12:31
  • @JayS Well, there's not much you can do about that right now, unfortunately. I would also argue that if that item is there for structural reasons only, then it shouldn't change that often, so it shouldn't be much of a hassle to sync it once in a while, especially if you use the "Sync all projects" feature. – Dmytro Shevchenko Oct 7 '16 at 13:12
5

You could set the "Item Deployment" for the TDS item "Deploy Once". If you are sure the item is being updated from the other project, then this will make the item never deploy (overwrite) the item since it will already exist.

  • We are using Deploy Once and this works for the automated pushes out to a server, but is ignored by local sync's. Users can still deploy it and it still shows as a delta when syncing the project – Jason St-Cyr Oct 7 '16 at 12:29
3

I don't think there's an option to exclude a single item from being synced currently. You can write to support@hhogdev.com with a suggestion.

Currently you could set the the "Child Item Sync" of the parent item to "None", which should stop syncing everything below it in the tree (which might or might not suit your needs) :)

  • 1
    Thank you. Unfortunately Child synchronization is not the issue, it's the parent we would like to ignore. If there are no ways in the tool I will definitely contact Hedgehog or Charlie to get this somewhere in the backlog! – Jason St-Cyr Oct 7 '16 at 12:32
1

This is one more approach apart from correct answer.

The only way to exclude single item from tds publish would be to remove the item from .scproj file(as we can not exclude the item in Visual studio)

navigate to the .scproj(TDS project solution) file and open it with the notepad or any editor and remove the Item Node in .scproj and reload the tds project and it will be gone from the project folder.Now you can deploy the sitecore project.

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.