Vault / VS2022 Extension / Generated files

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
gvdkamp
Posts: 12
Joined: Tue Apr 26, 2005 1:58 am

Vault / VS2022 Extension / Generated files

Post by gvdkamp » Wed Jul 31, 2024 8:54 am

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:
Vault-Added-Files.png
Vault-Added-Files.png (52.77 KiB) Viewed 1932 times
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?

Tonya
Posts: 906
Joined: Thu Jan 20, 2005 1:47 pm
Location: SourceGear

Re: Vault / VS2022 Extension / Generated files

Post by Tonya » Fri Aug 02, 2024 7:25 am

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

gvdkamp
Posts: 12
Joined: Tue Apr 26, 2005 1:58 am

Re: Vault / VS2022 Extension / Generated files

Post by gvdkamp » Sun Aug 04, 2024 11:48 pm

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

Tonya
Posts: 906
Joined: Thu Jan 20, 2005 1:47 pm
Location: SourceGear

Re: Vault / VS2022 Extension / Generated files

Post by Tonya » Tue Aug 06, 2024 7:02 am

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

gvdkamp
Posts: 12
Joined: Tue Apr 26, 2005 1:58 am

Re: Vault / VS2022 Extension / Generated files

Post by gvdkamp » Wed Aug 07, 2024 1:32 am

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.

gerpanda
Posts: 1
Joined: Tue Jul 30, 2024 2:01 am

Re: Vault / VS2022 Extension / Generated files

Post by gerpanda » Wed Aug 21, 2024 1:48 am

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!

Tonya
Posts: 906
Joined: Thu Jan 20, 2005 1:47 pm
Location: SourceGear

Re: Vault / VS2022 Extension / Generated files

Post by Tonya » Wed Aug 21, 2024 7:13 am

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

Post Reply