Vault / VS2022 Extension / Generated files
Moderator: SourceGear
Vault / VS2022 Extension / Generated files
We are using Vault with VS2022 and the SourceGear Vault Standard Extension. During our Build-Process we use a custom generator for parts of our code. These files are generated in different parts of our build-tree.
The problem we have is that a lot of these generated files are added to the "pending change set" when these files are created during an build.
Pattern seems to be that files generated under the projects "obj" dir are not added. Files which are generated in a central location under our $\work dir in a new dir called "cls", which is not added to vault, get added: Also notice that directories are added multiple times!
When we do a "clean" which removes all build results, and a subsequent "build" we get over 3200 new items in our "pending change set" which we all have to "undo" before we can continue using vault. Also wenn we add a definition for a new class which our custom generator then uses to generate code, we also get the newly generated files, which are located in the "cls" dir, added to our "pending change set".
What causes these files to be added? Is Vault detecting these new files or does the Vault Extension react to the files which are created during the build process in VS2022? Is there a way to disable this behaviour?
The problem we have is that a lot of these generated files are added to the "pending change set" when these files are created during an build.
Pattern seems to be that files generated under the projects "obj" dir are not added. Files which are generated in a central location under our $\work dir in a new dir called "cls", which is not added to vault, get added: Also notice that directories are added multiple times!
When we do a "clean" which removes all build results, and a subsequent "build" we get over 3200 new items in our "pending change set" which we all have to "undo" before we can continue using vault. Also wenn we add a definition for a new class which our custom generator then uses to generate code, we also get the newly generated files, which are located in the "cls" dir, added to our "pending change set".
What causes these files to be added? Is Vault detecting these new files or does the Vault Extension react to the files which are created during the build process in VS2022? Is there a way to disable this behaviour?
Re: Vault / VS2022 Extension / Generated files
Hello,
I spoke to our dev team about this situation. It appears that Visual Studio provides the Vault extension everything it needs to add, and Vault simply adds it. We do have an "Exclude from Source Control" option within the Vault Admin Tool where you can add specific file extensions and they should no longer be added.
If you have a lot of checkin's to undo, the easiest way would be to use the admin tool. In the admin web page, click on the repository that has the checkouts, then click on Undo Checkout. You will see a list of all the check outs and can select which ones to undo check out on.
Thanks,
Tonya
I spoke to our dev team about this situation. It appears that Visual Studio provides the Vault extension everything it needs to add, and Vault simply adds it. We do have an "Exclude from Source Control" option within the Vault Admin Tool where you can add specific file extensions and they should no longer be added.
If you have a lot of checkin's to undo, the easiest way would be to use the admin tool. In the admin web page, click on the repository that has the checkouts, then click on Undo Checkout. You will see a list of all the check outs and can select which ones to undo check out on.
Thanks,
Tonya
Re: Vault / VS2022 Extension / Generated files
Thank you for the response.
To be clearer: The files are added to the "Pending Changes". We do not have to undo checkin's. But we have a lot of pending changes.
The files that are generated, and added to the pending changes are generated .cs files. We cannot add the extension .cs to "Exclude from Source Control" because this would also exclude the .cs files we write.
What would help would be an option to exclude specific directories from source control. Shouldn't be that hard to add this as an option to Vault.
Kind regards,
Ger
To be clearer: The files are added to the "Pending Changes". We do not have to undo checkin's. But we have a lot of pending changes.
The files that are generated, and added to the pending changes are generated .cs files. We cannot add the extension .cs to "Exclude from Source Control" because this would also exclude the .cs files we write.
What would help would be an option to exclude specific directories from source control. Shouldn't be that hard to add this as an option to Vault.
Kind regards,
Ger
Re: Vault / VS2022 Extension / Generated files
Hello again,
Perhaps the "Exclude from Project" feature within Visual Studio would resolve the issue?
https://learn.microsoft.com/en-us/visua ... ew=vs-2022
Vault is adding the files that VS is telling it to so the key is to find a way where VS won't attempt to add them.
If you'd like to troubleshoot this further, please email support@sourcegear.com.
Thanks,
Tonya
Perhaps the "Exclude from Project" feature within Visual Studio would resolve the issue?
https://learn.microsoft.com/en-us/visua ... ew=vs-2022
Vault is adding the files that VS is telling it to so the key is to find a way where VS won't attempt to add them.
If you'd like to troubleshoot this further, please email support@sourcegear.com.
Thanks,
Tonya
Re: Vault / VS2022 Extension / Generated files
The files are not part of a specific Project, but we will first try if we can somehow convince VS not to add the files. Thank you for your help. If we do have further questions we will send a mail to support.
Re: Vault / VS2022 Extension / Generated files
Hello Tonya,snake game
Can you explain how to add file extensions to the "Exclude from Source Control" option?
Is there a limit to the number of extensions I can add?
Hope to see your response soon!
Can you explain how to add file extensions to the "Exclude from Source Control" option?
Is there a limit to the number of extensions I can add?
Hope to see your response soon!
Re: Vault / VS2022 Extension / Generated files
Hello,
The options is within the Vault Admin Tool under the Admin tab. Expand the repository under Source Control Repositories and a dialog will appear Default Repository Settings then scroll down to file type.
Here is the help information in regards to this feature:
https://download.sourcegear.com/misc/va ... thelp.html
Tonya
The options is within the Vault Admin Tool under the Admin tab. Expand the repository under Source Control Repositories and a dialog will appear Default Repository Settings then scroll down to file type.
Here is the help information in regards to this feature:
https://download.sourcegear.com/misc/va ... thelp.html
Tonya