【发布时间】:2020-01-23 15:32:08
【问题描述】:
我正在寻找将 c++ winforms 应用程序部署到 Azure DevOps 的分步指南。
我有一个旧应用程序,它已经进入 TFS 服务器,但现在团队计划将其放入 Azure DevOps 并自动化构建和发布过程。
我做了一些研究并尝试了一些东西,结果部分成功了。但是,我不明白是用 GIT 还是 TFVC(Team Foundation Version Control)?
由于应用程序已经进入 TFS,我相信使用 TFVC 创建存储库和管道会更容易。但是,如果我想使用 GIT 怎么办?使用 GIT 时应该考虑哪些因素?
注意:我没有 TFS 服务器访问权限,但我有 Azure DevOps 访问权限。
我尝试过的:
创建了一个演示项目。以下是有关演示项目的详细信息:
<code>Project and Solution Name -> SampleApp
Solution file location -> "C:\SampleProj\SampleApp\SampleApp.sln"
Other project files location -> "C:\SampleProj\SampleApp\SampleApp"</code>
尝试使用 GIT 将上述示例项目部署到 Azure。我遵循的步骤如下:
<code>
1. Installed GIT.
2. Logged into dev.azure.com with my credentials.
3. Created a new project and copied the 1st link as provided in "Repos" section.
4. Created a ".gitignore" file from Visual Studio Team Explorer -> Settings -> Repository Settings.
5. Went to the project folder (C:\SampleProj\SampleApp\SampleApp\) and right-clicked and selected "GIT Bash Here". The GIT command prompt opened up and typed the following commands:
a. git init
b. git remote add origin [URL copied at step 3]
c. git add .
d. git commit
e. git push -u origin master
</code>
在这些步骤之后,Azure 中的存储库保存了除解决方案文件 (.sln) 之外的所有文件,当我为构建创建管道时,构建开始失败,因为它没有获取 .sln 文件。
我无法理解以下几点:
<code>
1. For all projects, I cannot find Repository Settings in Team Explorer. Why so?
2. If I have a legacy application already in TFS, can't I make it done using TFVC instead of using GIT?
3. What are the correct steps being followed in the industry?
</code>
【问题讨论】:
标签: winforms azure-devops continuous-integration continuous-deployment