0

I am getting the Sitecore templates item in TDS master project using Get Sitecore Items option. It is working as expected. But when I close and reopen the visual studio, the templates items are not shown in TDS master project. can anyone help me to resolve this issue?

3
  • 1
    Did you save the VS Project file after getting the items? Sounds like the obvious option but its easy to miss as VS doesn't auto save that.
    – Richard Seal
    Apr 20, 2023 at 21:40
  • 1
    Open the project in file explorer and check if you see your item files there. If you do, those files are not included in your project file. You should include them to see them in visual studio. You can click on a folder in project in VS and then click on Show All files. It shall show you any files not included in the project.
    – Ghanendra
    Apr 21, 2023 at 14:46
  • we have included the files in the project but the next time when we restart the vs , it again shows files are excluded Apr 24, 2023 at 6:47

2 Answers 2

1

It sounds like the TDS project is not saving changes or is not being reloaded properly when Visual Studio is reopened. Here are a few things you can try to resolve this issue:

  • Ensure that the TDS project is saved before closing Visual Studio. You can do this by selecting "Save All" from the "File" menu, or by right-clicking the TDS project in the Solution Explorer and selecting "Save Selected Items".
  • Check the TDS project settings to make sure that it is configured to generate code on build. You can do this by right-clicking the TDS project in the Solution Explorer, selecting "Properties", and then selecting the "TDS Options" tab. Make sure that the "Code Generation" section is set to "Auto" or "On Build".
  • Check that the TDS project is included in the solution's build configuration. You can do this by right-clicking the solution in the Solution Explorer, selecting "Properties", and then select the "Configuration Properties" tab. Make sure that the TDS project is checked in the "Build" column for the current build configuration.
  • Try manually reloading the TDS project after reopening Visual Studio. You can do this by right-clicking the TDS project in the Solution Explorer and select "Reload Project".
  • If none of the above steps work, try deleting the TDS project from the solution and recreating it. Be sure to back up your project before doing this.
3
  • the above steps didn't work for me . I am getting the below error in output window of TDS. can you help me to resolve this error. Error:The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. (PathTooLongException): May 4, 2023 at 15:31
  • 1
    Shorten the name of the TDS project or the file path by removing unnecessary characters or using abbreviations. This can help you stay within the character limit and avoid the error message. Move the TDS project to a shorter path, closer to the root of the drive. For example, instead of storing it in "C:\Users\Username\Documents\Visual Studio 2019\Projects\MyTDSProject", you can move it to "C:\TDS\MyTDSProject". Once you have shortened the file path or name, try rebuilding your TDS project to see if the issue has been resolved. May 4, 2023 at 17:05
  • I have tried deleting the exisitng TDS project and created new one which is working as expected. Thanks May 9, 2023 at 5:20
0

I have seen this before. Most likely your file paths are too long. For items with long names, you should always use file system aliases. If your TDS project itself is in a physical folder multiple levels deep, try moving the folder close to the drive's root folder, for e.g. C:\Repos. Here is a TDS blog about the file length errors and how to use file system aliases.

https://www.teamdevelopmentforsitecore.com/Blog/file-length-error-tds

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.