tfsに接続中に以下のエラーが表示されます。 com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.nativeGetEnvironmentVariableスレッド "main"の例外java.lang.UnsatisfiedLinkError:com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.nativeGetEnvironmentVariable
コード: パブリッククラスConnectionToVisualStudio {
public static TFSTeamProjectCollection connectToTFS()
{
System.setProperty("com.microsoft.tfs.jni.native.base-directory", "C:\\Users\\userName\\native");
TFSTeamProjectCollection tpc = null;
Credentials credentials;
credentials = new UsernamePasswordCredentials("username","password");
tpc = new TFSTeamProjectCollection(URIUtils.newURI("https://xyz.visualstudio.com/MyFirstProject"), credentials);
return tpc;
}
public static void main(final String[] args)
{
TFSTeamProjectCollection tpc;
tpc = ConnectionToVisualStudio.connectToTFS();
Project project = tpc.getWorkItemClient().getProjects().get("MyFirstProject");
// Find the work item type matching the specified name.
WorkItemType bugWorkItemType = project.getWorkItemTypes().get("Bug");
// Create a new work item of the specified type.
WorkItem newWorkItem = project.getWorkItemClient().newWorkItem(bugWorkItemType);
// Set the title on the work item.
newWorkItem.setTitle("Example Work Item");
// Add a comment as part of the change
newWorkItem.getFields().getField(CoreFieldReferenceNames.HISTORY).setValue(
"<p>Created automatically by a sample</p>");
// Save the new work item to the server.
newWorkItem.save();
System.out.println("Work item " + newWorkItem.getID() + " successfully created");
}
スレッド "メイン" ます。java.lang.UnsatisfiedLinkErrorで
例外}
@gurchetのシンは、あなたは上記のことで、問題を解決しました溶液?すべてのアップデート? –
ありがとうございました –