If you are using the TFS 2012 Java API it is important you read the release notes. It is not enough to just reference the com.microsoft.tfs.sdk-11.0.0.jar file in your classpath as you might expect. You also have to pass a Java system property that associates com.microsoft.tfs.jni.native.base-directory with the location of the native library files that provide platform specific implementation for method calls. The command line for this is done in the form
If you don’t set this property you get an exception similar to
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.nativeGetEnvironmentVariable(Ljava/lang/String;)Ljava/lang/String;
Now setting this property on the command line is all well and good, but how do you do this if you are working in Eclipse?
The answer is you set the argument via the Run > Run Configuration. Select your configuration and enter the VM argument as shown below.
Once this is set you can run and debug you application inside Eclipse
I recently recorded a video on using Visual Studio Team Explorer Everywhere, this has today been published in the UK Techdays section of Channel 9.
Hope you find it useful.
One of the nice new feature of TFS11 is that you get a third option for what to do with your build output
- Don’t copy output anywhere – good for CI builds that nobody will ever consume, just used to run tests
- Drop to a UNC share e.g. \\server1\drops – the default and used 9 times out 10
- The new one - drop to source control e.g. $/myproject/drops.
The advantage of this new third option is your build agents can place the files they create in a location that can be accessed by any TFS client i.e. in the source control repository. A user no longer needs to be on a VPN or corporate LAN to be able to see a UNC share.
But remember, just because the builds are in source control does not mean that the build don’t still follow the normal build retention policies, so they will not accumulate forever, unless you want them to.
Now some teams will have good reasons as to why the don’t want builds going into source control. Deployments to a NuGet server and the like will be a far better system for them. This is still all possible, it is just down to build process template customisation. You have not lost any options, just gained another one out the box
But what about building Java via Ant or Maven within TFS using the Build Extensions? Well at this time the process template used to create this type of build from within Eclipse has not caught up with this new feature. However if you really want it you can do the following
- Create a TFS build in Eclipse that drops to a UNC share
- Open the build definition in VS11
- Edit the drops location to point to a location in source control and save the build
- When you trigger a new build and you should get you drops in source control. Note in the confirmation dialog you can see the source control based path but you can’t edit it (if you try you get an invalid path error)
It was announced overnight that TEE is now free. What does this mean?
It means if you do not have to buy TEE as some extra software if you already have a TFS CAL. This removed a barrier to adoption for developers who work in heterogeneous systems, there is no extra cost to integrate Eclipse as well a Visual Studio with TFS .
If you want to find out more about TEE why not come Black Marble’s free webinar I am delivering on the 19th?
I recently did a guest post for the VSTS UK Team Blog on Team Explorer Everywhere. On the 19th of March I will be doing a free webinar on the same subject. To register for this event please see the Black Marble web site.
The big news today is is that Microsoft released the VS11 Beta, part of which is Team Explorer Everywhere (TEE). (Oh they also release something called Windows 8 too – whatever that is)
Whilst upgrading my TEE instance in Eclipse (Indigo) I hit the same gotcha as I had when I originally installed TEE. On Windows, if UAC is enabled you have to run Eclipse as administrator to do the plug-in else you get the error message.
As soon as you start Eclipse as administrator the upgrade works perfectly, you can then restart Eclipse as normal and all is OK
Thanks to everyone who attended my session at NEBytes last night, sorry I had to rush away. As my session was demo based I don’t have much in the way of slides to upload, but if you want to find out more have a look at my guest blog post on the UK Visual Studio blog on ‘TFS for Everyone’.
Also keep an eye on the Black Marble site for upcoming free webinar sessions on the same subject
I will be speaking at the NE Bytes user group next Wednesday (the 15th of Feb) on ‘TFS for Everyone’.
This a session based on the guest blog post on the UK Visual Studio blog I did on how TFS is not just for .NET developers. It can be used from a whole range of development platforms and operating systems. I will be including demos using Eclipse and Ubuntu.
Hope to see you there.
A guest post I wrote on TFS for the non-.NET developer has just been published on the Microsoft Visual Studio UK Team Blog. Why not pop over and have a look.
When using TEE in Eclipse 3.7 on Ubuntu 11.10 there is a problem trying to view a TFS build report. If you click on the report in the Build Explorer you would expect a new tab to open and the report be shown. This is what you see in Eclipse on Windows and on older versions of Eclipse on Linux. However on Ubuntu 11.10 with Eclipse 3.7 you get a File Download dialog.
I understand from Microsoft this is a known issue, thanks again to the team for helping get to the bottom of this.
The problem is due to how Eclipse manages its internal web browser. Until version 3.7 it used the Mozilla stack (which is still the stack used internally by TEE for all its calls), but with Eclipse 3.7 on Linux it now uses WebKit as the stack to open request URL such as the build report. For some reason this is causing the dialog to be show.
There are two workaround:
Set Eclipse to use an external browser
In Eclipse –> Windows –> Preference, select use external browser
When you now click on the build details an external browser is launched showing the results you would expect.
Switch Eclipse back to using Mozilla as its default
You can switch Eclipse back to using mozilla as its default. In your eclipse.ini set
Once this is done Eclipse should behave as expected, opening a tab to show the build report within Eclipse.