【问题标题】:How to deploy a winforms application into Azure DevOps如何将 winforms 应用程序部署到 Azure DevOps
【发布时间】: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


    【解决方案1】:

    我做了一些研究并尝试了一些东西,结果部分成功了。 但是,我不明白是通过 GIT 还是 TFVC (Team Foundation 版本控制)?

    Git 是分布式系统,而 TFVC 是集中式系统。更多关于它们的区别可以参考this document

    但是,如果我想使用 GIT 怎么办?

    关于从 TFVC 迁移到 Git,您可以考虑使用 git-tfs tool。更多详情请查看this guide

    尝试使用 GIT 将上述示例项目部署到 Azure。这 我遵循的步骤如下:

    如果您有一个新创建的项目,您可以轻松地将其添加到 Visual Studio 中的 git 源代码管理中,然后将其推送到 Azure Devops Service 项目。请查看Share your code with Visual Studio 2017 and Azure Repos Git

    对于所有项目,我都无法在团队资源管理器中找到存储库设置。 为什么会这样?

    你需要先将解决方案添加到VS中的源代码管理中,然后你可以在Team Explorer=&gt;Settings=&gt;Repository Settings找到存储库设置。

    希望以上所有内容有所帮助,最好将帖子中的不同问题分成不同的主题。

    【讨论】:

      猜你喜欢
      • 2020-01-29
      • 1970-01-01
      • 2019-09-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多