创建Azure项目

添加新的组织并设置

https://dev.azure.com/
Azure DevOps 与VS 2019
开始Azure DevOps,点击Continue,编辑组织名称、输入看到的验证码,其余可以默认
Azure DevOps 与VS 2019
Azure DevOps 与VS 2019
详细设置新的组织信息,也可以删除当前组织。
Azure DevOps 与VS 2019

添加新的项目并设置

选择指定的组织,创建项目。编辑项目名称,描述项目详情,点击Create project创建项目。
Azure DevOps 与VS 2019

初始化项目分支

进入项目,选择仓库导航栏,可以添加README文件、gitignore版本控制,可选择VisualStudio,点击Initialize初始化此项目。
Azure DevOps 与VS 2019
Azure DevOps 与VS 2019

可以选择Project settings,编辑项目的详细信息,包括项目描述、可见性等,也可以直接删除此项目。

添加本地项目到Azure

创建简单的项目,按照已有项目的文件结构,添加项目的解决方案文件,比如Demo.sln
Azure DevOps 与VS 2019
添加项目的目录,比如Demo文件夹、Demo/Properties
Azure DevOps 与VS 2019
Azure DevOps 与VS 2019
Azure上基本的项目结构如下:
Azure DevOps 与VS 2019
在此基础上,可以完善本项目,并进行Git管理。

克隆Azure库

用Microsoft账户登录Azure DevOps,创建组和项目信息。
在vs中选择克隆存储库;浏览存储库选择Azure DevOps;
Azure DevOps 与VS 2019

文件/新建/项目,创建新项目控制台应用并配置;
Azure DevOps 与VS 2019

创建单元测试;
Azure DevOps 与VS 2019

运行测试,可查看测试资源管理器或分析所有测试的代码覆盖率;
Azure DevOps 与VS 2019
Azure DevOps 与VS 2019

使用团队资源管理器对项目进行管理;
Azure DevOps 与VS 2019

同步到Azure DevOps;操作类似于Git、SVN;
更改,全部提交并同步;
同步,同步传入和传出提交;
提取,提取远程提交,初始化提取;
拉取,更新当前存储库为最新;
推送,当前更改同步到服务器;

问题解决方案

Cannot determine the organization name for this ‘dev.azure.com‘ remote url

在使用团队资源管理器同步项目时出现 报错提示:

Cannot determine the organization name for this 'dev.azure.com' remote URL. Ensure the credential.useHttpPath configuration value is set, or set the organization name as the user in the remote URL '{org}@dev.azure.com'.

这是Visual Studio版本不一致导致的,需要检查当地VS的Git凭据。
选项/源代码管理/Git全局管理
Azure DevOps 与VS 2019

相关文章:

  • 2022-12-23
  • 2021-05-11
  • 2022-12-23
  • 2022-02-06
  • 2021-11-22
  • 2021-10-17
  • 2021-07-14
猜你喜欢
  • 2021-07-04
  • 2022-01-17
  • 2021-11-17
  • 2021-12-24
  • 2021-03-27
  • 2021-10-27
相关资源
相似解决方案