Share your Eclipse projects(Eclipse与Visual Studio Online的协同工作)
2014-01-27 20:37
706 查看
Connect Eclipse to Visual Studio Online to share your code with your team.
create one.
If you haven't already, install the Team Explorer plug-in for Eclipse: http://dl.microsoft.com/eclipse/tfs.
Show me how.
Show the team explorer views.
![](http://www.visualstudio.com/dynimg/IC693258.png)
You'll just use the team explorer here.
![](http://www.visualstudio.com/dynimg/IC693260.png)
In the team explorer view, connect to Visual Studio Online.
![](http://www.visualstudio.com/dynimg/IC693261.png)
Configure the servers.
![](http://www.visualstudio.com/dynimg/IC693264.png)
Add the server.
![](http://www.visualstudio.com/dynimg/IC693265.png)
Provide the URL to your Visual Studio Online account (http://[account].visualstudio.com).
![](http://www.visualstudio.com/dynimg/IC691018.png)
Connect to the team project.
![](http://www.visualstudio.com/dynimg/IC693268.png)
![](http://www.visualstudio.com/dynimg/IC693259.png)
Share your project in Team Foundation Version Control.
![](http://www.visualstudio.com/dynimg/IC693262.png)
In the pending changes view, check the project in.
![](http://www.visualstudio.com/dynimg/IC693266.png)
Go to the team home page.
![](http://www.visualstudio.com/dynimg/IC693263.png)
On the code tab, you'll see your code.
![](http://www.visualstudio.com/dynimg/IC696839.png)
A:You can build your Eclipse projects in Visual Studio Online as long as your team project uses TFVC. If you use Git, you'll have to use you own build server. A
number of other factors, like the size of your codebase and the size and distribution of your team, may also impact which is best for your team.
Q:How can I share my code in a Git repository instead of TFVC?
A:
Set up a team project that uses Git for version control, then clone the Git repository and Git in Eclipse to share your code.
Go to your team project's home page and open your profile.
![](http://www.visualstudio.com/dynimg/IC689417.png)
Allow alternate credentials for this account.
![](http://www.visualstudio.com/dynimg/IC689425.png)
Set the password for the user name that you use to sign in to Visual Studio Online.
![](http://www.visualstudio.com/dynimg/IC689424.png)
![](http://www.visualstudio.com/dynimg/IC693258.png)
You'll use the repositories and staging views here.
![](http://www.visualstudio.com/dynimg/IC690531.png)
If you don't have the Git views, you can get them by
downloading EGit.
Use the Git repositories view to clone the Git repository for your team project.
![](http://www.visualstudio.com/dynimg/IC695099.jpg)
Specify the URL for your team project (http://[account].visualstudio.com/DefaultCollection/_git/[team project]).
![](http://www.visualstudio.com/dynimg/IC695109.png)
If you just created your team project, the Git repository will be empty. That's OK.
![](http://www.visualstudio.com/dynimg/IC695111.png)
Specify where you'll keep the cloned repository on your machine.
![](http://www.visualstudio.com/dynimg/IC695113.png)
The repository for your team project shows up in the Git repositories view.
![](http://www.visualstudio.com/dynimg/IC695105.png)
![](http://www.visualstudio.com/dynimg/IC693259.png)
Make sure you share it to Git.
![](http://www.visualstudio.com/dynimg/IC695106.png)
You'll see how the remote repository is mapped to your working directory.
![](http://www.visualstudio.com/dynimg/IC695107.png)
In the Git staging view, add your files to the Git index.
![](http://www.visualstudio.com/dynimg/IC695108.png)
Push the source to the remote repository.
![](http://www.visualstudio.com/dynimg/IC696841.png)
Your code is in your team project's Git repository now. You can open your team project's code page and see the code there.
![](http://www.visualstudio.com/dynimg/IC696840.png)
Q:What if the Git views don't show up.
A:You can
download EGit to use Git with Eclipse.
Q:Where can I find the URL for my Visual Studio-managed Git repository?
A:It's in the team project home page, in the code explorer.
Open the code explorer on your you team project's home page (https://[account].visualstudio.com/DefaultCollection/[team project]).
![](http://www.visualstudio.com/dynimg/IC696842.png)
With the repository you want to clone selected, get the URL.
![](http://www.visualstudio.com/dynimg/IC696752.png)
转自:
http://www.visualstudio.com/get-started/share-your-eclipse-projects-vs
Connect to Visual Studio Online
If your team doesn't already have a team project,create one.
If you haven't already, install the Team Explorer plug-in for Eclipse: http://dl.microsoft.com/eclipse/tfs.
Show me how.
Show the team explorer views.
![](http://www.visualstudio.com/dynimg/IC693258.png)
You'll just use the team explorer here.
![](http://www.visualstudio.com/dynimg/IC693260.png)
In the team explorer view, connect to Visual Studio Online.
![](http://www.visualstudio.com/dynimg/IC693261.png)
Configure the servers.
![](http://www.visualstudio.com/dynimg/IC693264.png)
Add the server.
![](http://www.visualstudio.com/dynimg/IC693265.png)
Provide the URL to your Visual Studio Online account (http://[account].visualstudio.com).
![](http://www.visualstudio.com/dynimg/IC691018.png)
Connect to the team project.
![](http://www.visualstudio.com/dynimg/IC693268.png)
Share your code
In the package explorer, share your project.![](http://www.visualstudio.com/dynimg/IC693259.png)
Share your project in Team Foundation Version Control.
![](http://www.visualstudio.com/dynimg/IC693262.png)
In the pending changes view, check the project in.
![](http://www.visualstudio.com/dynimg/IC693266.png)
Go to the team home page.
![](http://www.visualstudio.com/dynimg/IC693263.png)
On the code tab, you'll see your code.
![](http://www.visualstudio.com/dynimg/IC696839.png)
Q&A
Q:Should I use Git or TFVC for my team project?A:You can build your Eclipse projects in Visual Studio Online as long as your team project uses TFVC. If you use Git, you'll have to use you own build server. A
number of other factors, like the size of your codebase and the size and distribution of your team, may also impact which is best for your team.
Q:How can I share my code in a Git repository instead of TFVC?
A:
Set up a team project that uses Git for version control, then clone the Git repository and Git in Eclipse to share your code.
Enable alternate credentials
To use Git with your Visual Studio Online account, enable alternate credentials so that you can sign in from Eclipse.Go to your team project's home page and open your profile.
![](http://www.visualstudio.com/dynimg/IC689417.png)
Allow alternate credentials for this account.
![](http://www.visualstudio.com/dynimg/IC689425.png)
Set the password for the user name that you use to sign in to Visual Studio Online.
![](http://www.visualstudio.com/dynimg/IC689424.png)
Clone the repository
Show the Git views.![](http://www.visualstudio.com/dynimg/IC693258.png)
You'll use the repositories and staging views here.
![](http://www.visualstudio.com/dynimg/IC690531.png)
If you don't have the Git views, you can get them by
downloading EGit.
Use the Git repositories view to clone the Git repository for your team project.
![](http://www.visualstudio.com/dynimg/IC695099.jpg)
Specify the URL for your team project (http://[account].visualstudio.com/DefaultCollection/_git/[team project]).
![](http://www.visualstudio.com/dynimg/IC695109.png)
If you just created your team project, the Git repository will be empty. That's OK.
![](http://www.visualstudio.com/dynimg/IC695111.png)
Specify where you'll keep the cloned repository on your machine.
![](http://www.visualstudio.com/dynimg/IC695113.png)
The repository for your team project shows up in the Git repositories view.
![](http://www.visualstudio.com/dynimg/IC695105.png)
Push your code to the remote repository
In the package explorer, share your project.![](http://www.visualstudio.com/dynimg/IC693259.png)
Make sure you share it to Git.
![](http://www.visualstudio.com/dynimg/IC695106.png)
You'll see how the remote repository is mapped to your working directory.
![](http://www.visualstudio.com/dynimg/IC695107.png)
In the Git staging view, add your files to the Git index.
![](http://www.visualstudio.com/dynimg/IC695108.png)
Push the source to the remote repository.
![](http://www.visualstudio.com/dynimg/IC696841.png)
Your code is in your team project's Git repository now. You can open your team project's code page and see the code there.
![](http://www.visualstudio.com/dynimg/IC696840.png)
Q:What if the Git views don't show up.
A:You can
download EGit to use Git with Eclipse.
Q:Where can I find the URL for my Visual Studio-managed Git repository?
A:It's in the team project home page, in the code explorer.
Open the code explorer on your you team project's home page (https://[account].visualstudio.com/DefaultCollection/[team project]).
![](http://www.visualstudio.com/dynimg/IC696842.png)
With the repository you want to clone selected, get the URL.
![](http://www.visualstudio.com/dynimg/IC696752.png)
转自:
http://www.visualstudio.com/get-started/share-your-eclipse-projects-vs
相关文章推荐
- Share your Xcode projects(XCode连接Visual Studio Online|TFS Service)
- Build your Eclipse projects(Visual Studio online编译Eclipse中的项目)
- VisualStudio一打开工程就崩溃-重打开output显示We were unable to automatically populate your Visual Studio Online accounts.
- 使用 Visual Studio Online 进行协同开发
- 四、Load test your app(Visual Studio Online负载测试)
- 如何在Visual Studio的工程中共享代码 l How do you share code between projects/solutions in Visual Studio
- 如何在Visual Studio的工程中共享代码 l How do you share code between projects/solutions in Visual Studio
- jni程序开发简单示例和说明(eclipse + Microsoft Visual Studio 2010)
- 将 Visual Studio C 和 C++ 项目迁移到 Eclipse CDT
- SharePoint Framework 在Visual Studio Code中调试你的托管解决方案
- (视频)Erich Gamma 与 Visual Studio Online 的一点野史
- 将 Visual Studio C 和 C++ 项目迁移到 Eclipse CDT
- 《Microsoft Visual Studio Tips: 251 Ways to improve your productivity》
- 利用Visual Studio Natvis 框架简化C++的变量调试工作
- Visual Studio Online
- (Reporting Made Easy)The New ReportViewer Control in Visual Studio 2005 Provides Rich Capabilities to Fulfill All Your Reporting Needs
- 删除Visual Studio Online 中团队项目
- Creating SharePoint 2010 Event Receivers in Visual Studio 2010
- 将 Visual Studio C 和 C++ 项目迁移到 Eclipse CDT
- SharePoint Development - Custom List using Visual Studio 2010 based SharePoint 2010