Issue adding Solution to Vault Pro

If you are having a problem using Vault, post a message here.
Post Reply
shanebard
Posts: 3
Joined: Thu Jan 27, 2011 5:10 pm

Issue adding Solution to Vault Pro

Post by shanebard » Fri May 06, 2022 10:41 am

Trying to add my solution to my Vault repository using the option under File -> Vault Professional Source Control -> Add Solution to Vault Pro in Visual Studio 2022 with the new SourceGear Vault Professional Visual Studio Extension for Visual Studio 2022 install. In the Add Solution to Vault Pro dialog box, it has a Solution folder name entered and displays that the new solution folder will get added to the root of the repository. It also displays all the subfolders that will get added. After clicking "OK", I pretty quickly receive the following error.

"Couldn't find repository path for C:\Users\sbard\.nuget\packages\select.htmltopdf.netcore\21.2.0\contentFiles\any\any because there is no applicable working folder."

It appears to be trying to add the Nuget package into the repository (which I would prefer it didn't do). It seems to be getting this path by grabbing the Package Reference out of the csproj file and asking Nuget where it has been stored locally.

Is this intended behavior to try to add all the Nuget package files to the repository? If so, how can I turn this off?

Update:
I have continue to look into what is happening and I think I found out the "what is causing the issue" part. A particular Nuget package I am using called Select.HtmlToPdf.NetCore has an unusual setting in the .nuspec file that I don't see used in any of my other Nuget packages for the project.

I'll omit the other unrelated parts of the file and just mention the interesting part:

Code: Select all

   
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
	<metadata>
		...
		<contentFiles>
			<files include="any/any/Select.Html.dep" buildAction="Content" copyToOutput="true" />
		</contentFiles>
	</metadata>
</package>
So, the Vault Extension seems to be trying to grab this file and add it to the repository. The reason this setting is in here is to allow the build action to realize it needs to grab this file an copy it to the built out folder for debuggging/publishing. It doesn't need to be added to the repository at all. Doing a Nuget restore will always restore the file for building the project. So, if there is a way to tell Vault to just ignore this section, it would likely fix my issue.
Shane

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

Re: Issue adding Solution to Vault Pro

Post by Tonya » Mon May 09, 2022 9:23 am

Hello,

Thank you for the immense details! I've spoken with our dev team to see if they have any suggestions:

1) Exclude the files from being checked in using either the Vault Admin Tool or Visual Studio.

2) Move the files from your working directory.

3) Try adding the project from the Vault GUI first, then bind from within Visual Studio afterwards.

If none of these suggestions help, please let me know.

Thanks,

Tonya

shanebard
Posts: 3
Joined: Thu Jan 27, 2011 5:10 pm

Re: Issue adding Solution to Vault Pro

Post by shanebard » Mon May 09, 2022 3:53 pm

Thank you, Tonya.

Here is an update.

Solution 1 didn't work. Still tried to map folder where the *.dep file was located and threw an error.

Solution 2 was really not applicable because the file in question was already outside of the working folder, which was kind of the problem in the first place since it was trying to mirror the local path inside of the repository.

I was able to use solution 3 and so far it seems like I was able to bind the solution/projects correctly without any side effects. I'll let you know if it starts to cause any issues.

Thanks,
Shane

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

Re: Issue adding Solution to Vault Pro

Post by Tonya » Tue May 10, 2022 7:21 am

Hello again,

Thank you for the update and glad to hear things seem to be working correctly for you.

Tonya

Post Reply