Vault for Visual Studio Code

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

Moderator: SourceGear


Posts: 53
Joined: Wed Sep 29, 2004 8:09 am
Location: Denmark, Copenhagen
PostPosted: Tue Jun 13, 2017 5:51 am
Hi,

I could find nothing about it on the website - maybe I didn't look hard enough?

But, is there, or will there be, an extension for Visual Studio Code ? Or does the extension for Visual Studio 2017 work also for Visual Studio Code ?

Best regards,
Hans Olav Nymand

Posts: 3558
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
PostPosted: Tue Jun 13, 2017 3:17 pm
Unfortunately, at this time Visual Studio Code extensions are JavaScript / TypeScript extensions which I do not believe allow calls into the .NET Vault client API. So we do not currently have anything that allows integration with the .NET Vault client libraries and Visual Studio Code.

For which platform/OS are you looking to use Visual Studio Code ?
Jeff Clausius
SourceGear

Posts: 53
Joined: Wed Sep 29, 2004 8:09 am
Location: Denmark, Copenhagen
PostPosted: Tue Jun 13, 2017 11:47 pm
Platform: Windows 10

Best regards, Hans Olav Nymand

Posts: 3558
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
PostPosted: Wed Jun 14, 2017 9:10 am
This is the first request we've had for Vault integration with Visual Studio Code for any platform.

Out of curiosity, do you currently use Visual Studio Community (free), Pro, or Enterprise? If so, are you just experimenting with Visual Studio Code or are there plans to move away from these versions of Visual Studio?
Jeff Clausius
SourceGear

Posts: 33
Joined: Thu Aug 31, 2017 11:59 am
PostPosted: Thu Aug 31, 2017 12:25 pm
I also would find Vault integration with Visual Studio Code useful. We inherited some php code which we are maintaining in Visual Studio Code. For the php code, I'd been using GitHub for version control (since we couldn't figure out how to hook up Vault to VS Code)... and VS2012 (which we do have connected to Vault) doesn't seem at all php-friendly.

We primarily work with C# which we maintain in Vault with Visual Studio 2012. (I'm sure at some point we'll upgrade to VS2015 or VS2017, but I don't get to choose that.) Vault is our primary version control system, so it would be incredibly nice to have the php code also stored in Vault.

Though I like VSCode as an IDE for php, I don't mind switching IDEs if it would get my php 'connected' to Vault. Are there any IDE's supported by SourceGear for php?

It's a bit hard to search for 'php' support on this bulletin board (since the bulletin board itself is using php). It's a bit like doing a keyword search for 'the'.

Thank you!

Sincerely,
mmorris

Posts: 33
Joined: Thu Aug 31, 2017 11:59 am
PostPosted: Thu Sep 07, 2017 8:09 am
OK, well after additional research it turns out the Vault is integrated with an IDE which will work with php, Eclipse. So while it would be nice to get Vault working with Visual Studio Code, I'll try anything available at this point.

I haven't got it completely working yet, but I've contacted our IT department (with respect to the servers). It could be that our Vault server is currently set up exclusively for VS2008, (and because it's not expecting an Eclipse connection, not allowing it).

Downloading and setting up Eclipse required installing the 64-bit Java from Oracle (on my 64-bit machine). Otherwise, Eclipse (64-bit) wouldn't work at all. If you have a 32-bit machine, just download 32-bit versions.

At least currently (9/7/17), here are the Vault-Eclipse plug-in links:

Downloading Vault plug-in for eclipse:
http://sourcegear.com/vault/download-pl ... st_eclipse

Check your Vault version!
The Standard connectors are below the PRO ones, so if use are using Vault Standard/Pro, try not to download the Pro/Standard plug-in.

Which version of eclipse/'vault plug-in' is important too:
viewtopic.php?f=5&t=22811&p=78243&hilit=eclipse#p78243

Starting with Eclipse (when using Vault):
https://sourcegear.com/vault/documentat ... ngstarted/

Currently I'm stuck when trying to log in to Vault, but am contacting the folks that maintain our Vault server here.

Although on rereading the important info in
viewtopic.php?f=5&t=22811&p=78243&hilit=eclipse#p78243
it looks like I installed the newest version of Eclipse (Oxygen), and I should have installed Mars instead (since we have a 9.1 version of Vault Standard).

So uninstalling Eclipse Oxygen, and installing Eclipse Mars next.

Posts: 3558
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
PostPosted: Thu Sep 07, 2017 1:22 pm
Do you need to connect to the Vault Server using SSL?

If so, there's a bit of extra configuration needed to get the certificate in to the Java keystore. See viewtopic.php?t=10526 for addt'l info.


Also note, Vault 9/10 will also work with Eclipse Neon and Eclipse Oxygen.
Jeff Clausius
SourceGear

Posts: 33
Joined: Thu Aug 31, 2017 11:59 am
PostPosted: Fri Sep 08, 2017 9:03 am
Well, both Mars(2) and Oxygen versions of the Eclipse had the same error, so the 'Eclipse' route is kind of running out of options.

Option 1) Issue is on server side not accepting connection?
Option 2) Issue is related to the 'gcj' java issue? Though the notice associated 'gcj' java with Linux, not Windows. 'Our Eclipse plugin is incompatible with gcj versions of Java (the default that comes with most Linux distributions). We recommend running Eclipse with a Sun JRE (version 1.4.2 or newer).' I'm using Oracle java; so I'll check if that is 'gcj' or not.
Option 3) Manually create a '.log' file to hopefully start getting the error logs.

My PC's OS is Windows 10 64-bit.

Using Vault Standard 9.1.x (which is my only option currently), I'm getting the following error for both Mars(2) and Eclipse:
'An unknown error occurred during the login process. Please check the Eclipse error log for exceptions (<workspace>/.metadata/.log').'

However, the .log directory (or file) is not getting written, so I have no clue what the error is.

I did notice that the initial installation made .metadata and subfolders 'Read-only'. But, removing the 'read-only' from .metadata (and subfolders) did not help.

Strangely (or perhaps not), I can't (yet) create a '.log' subdirectory (or any directory starting in '.') in Windows 10. I'm hoping that if I can create the '.log' subdirectory maybe I'll start getting useful error messages there. There's obviously some way to do that (since the '.metadata' folder did get created); probably a powershell or cmd prompt with Admin privileges.

Posts: 3558
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
PostPosted: Mon Sep 11, 2017 9:23 am
Here's a test I just ran:

1) Verified Java on my Open SUSE (42.3) machine, which came pre-installed with OpenJDK (not Oracle's JDK):

jclausius:~> java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (IcedTea 3.4.0) (suse-11.1-x86_64)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)

2) Downloaded and uncompressed the Eclipse IDE for Java Developers" 64-bit Oxygen package from https://www.eclipse.org/downloads/eclipse-packages/

3) Started Eclipse Client, and Installed Vault Standard Client -> Help -> Install New Software -> "http://download.sourcegear.com/Vault/latest/update", "Install Anyway", and restart Eclipse.

4) From the Project Explorer, I chose Team -> Share Project, and added the HelloWorld1 package to vaultdemo.sourcegear.com in the 'Initial Repository' at $/Eclipse/HelloWorld1/

Note, this is for non-SSL connectivity. If you're using SSL to connect to the Vault Server, please see http://support.sourcegear.com/viewtopic.php?t=10526 for configuring Java's keystore to accept SSL certificates.

5) On a Windows 7 machine, running Java 8 ( http://www.oracle.com/technetwork/java/ ... #javasejdk ):

C:\Users\jclausius>java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

6) I downloaded and uncompressed the "Eclipse IDE for Java Developers" 64-bit Oxygen package from https://www.eclipse.org/downloads/eclipse-packages/

7) Started Eclipse Client, and Installed Vault Standard Client -> Help -> Install New Software -> "http://download.sourcegear.com/Vault/latest/update", "Install Anyway", and restart Eclipse.

8 ) From the workbench's Package Explorer, Team -> Import Dialog... Team -> Project from Vault -> Next.

9) Use one of the 'guestX' accounts, and vaultdemo.sourcegear.com from Initial Repository -> $/Eclipse/HelloWorld1/

Again, this is for non-SSL connectivity. If you're using SSL to connect to the Vault Server, please see http://support.sourcegear.com/viewtopic.php?t=10526 for configuring Java's keystore to accept SSL certificates.

I was able to GET, CHECKOUT, MODIFY and commit files from there.

-----------------

Can you use your Eclipse client, and do a Import on the $/Eclipse/HelloWorld1/ project on your end using your installed Vault Standard plug-in? Scratch that. I see you're using Vault 9.1, so you won't be able to connect to the Vault demo server.

Do my instructions regarding connecting thru SSL or Sharing and Importing help out?

Did you start out with a fresh project with no GIT bindings?
Jeff Clausius
SourceGear

Posts: 3558
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
PostPosted: Mon Sep 11, 2017 9:49 am
mmorris,

I just noticed we're getting some cross-over here on unrelated issues. Could you please take the Eclipse posts from "Eclipse Plugin Installation" and the other posts in here into a new thread?

The issue you're reporting may be a bit different from the original posts of each of those threads.

Thanks
Jeff Clausius
SourceGear

Posts: 15
Joined: Wed Feb 14, 2007 2:50 pm
PostPosted: Wed Aug 15, 2018 12:59 pm
We are now using Visual Studio Code to edit some of our PowerShell scripts. We would be in favor of a vault plug-in for Visual Studio Code. VS Code is gaining popularity so it may be something for you to consider in a future release.
Grand Avenue Software

Posts: 363
Joined: Thu Jan 20, 2005 1:47 pm
Location: SourceGear
PostPosted: Wed Aug 15, 2018 2:52 pm
Thank you for the feedback! We will get your vote added to the feature request for the Visual Studio Code plugin.

Tonya

Posts: 14
Joined: Fri Feb 17, 2006 4:57 pm
PostPosted: Thu Aug 23, 2018 11:44 am
+1 for a Vault extension for vs.code.

I suppose if someone were enterprising enough, one could use https://github.com/stef-levesque/vscode-perforce as a basis and build an extension against the Vault CLI.

To be young again with (seemingly) infinite time. In the meantime, I will continue to right-click --> Edit from within the Vault GUI.

Posts: 363
Joined: Thu Jan 20, 2005 1:47 pm
Location: SourceGear
PostPosted: Thu Aug 23, 2018 11:58 am
Thank you for your input and vote!!! It's been added.

Tonya

Return to Support (Vault)

Who is online

Users browsing this forum: No registered users and 4 guests

cron