AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
DAX
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 18.05.2017, 00:19   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
stoneridgesoftware: Setting Up Version Control in Dynamics 365 for Operations with Visual Studio
Источник: https://stoneridgesoftware.com/setti...visual-studio/
==============

The first step to creating a new Dynamics 365 for Operations (Ax7) project is to setup Visual Studio Online (VSO). Visual Studio Online now supports Git version control, but if your solution will be deployed to a customer site, Microsoft recommends that you choose Team Foundation Version Control; at least for any projects that interface with Life Cycle Services (LCS).

If you haven’t already, you need to visit https://www.visualstudio.com to sign up for Visual Studio Online.  You will choose an account name when you sign up. This account becomes part of the URL you will use to access all your projects.

Creating a Project in Visual Studio

Now we will create a project. I will call mine Ax7Experimentation because I plan on using this project to test functionality and try new ideas.



  • Click the Create project button.


Now we need to setup the folder structure expected by Dynamics Ax7. Click the Add code button. This will take you to the root folder of your code repository. There you will see a single folder named BuildProcessTemplates. Unfortunately, we cannot create the necessary folders from the web viewer, we must connect Visual Studio to our project and continue from there.

  • Start Visual Studio 2015 as an Administrator. I would recommend checking the box on the Compatibility tab of the shortcut properties.




  • If you haven’t done so already, sign into your Microsoft Account (the one you used to create the project).  If prompted, you will need to select Personal account.


  • From the Team menu, select Manage Connections… to open the Team Explorer window.


  • Click the Connect… link in the middle of the Team Explorer window. From the resulting dialog, select your Team Foundation Server.


  • Click Connect.
Now you are prompted to configure your workspace mappings.  This will create a local folder that holds a copy of all your files. It also acts as your staging folder, holding a copy of new files until you submit them.



  • Click the Configure your workspaces link.
  • Choose a local folder to store your code.
For Dynamics 365 for Operations (Ax7) work, this folder will only contain your projects and non-Ax7 code. All your Dynamics metadata artifacts will reside in another folder. I will store my code in a new root-level folder called AxTFS.



  • Enter your folder name and click the Map & Get button.
You now have a local folder mapped to your VSTO. Click the Source Control Explorer button to open the explorer. Here we will finish the workspace mappings and create the initial required folders. We will start with folders that represent the trunk and main branch; Trunk and Main. Because this folder will hold the files related to Visual Studio projects, we will create a Projects folder. Create the folder structure by right-clicking on each parent node and choosing New Folder.



Lastly, we must tell VSTS where to store the Dynamics Ax metadata files. These files are managed by Visual Studio and are in a folder controlled by the AOS service; C:\AOSService.

  • Right-click the Main folder and choose New Folder to create a folder for our metadata. Name the folder Metadata.
  • To change the mapping for this folder, expand the Workspaces drop-down in the toolbar and choose Workspaces…, then click Edit…


  • Remap the Metadata folder to the PackagesLocalDirectory folder by adding a new line to the grid.


  • Click OK.
  • When prompted, click Yes to get the latest files.  There won’t be any new files however because we just created this repository.
  • Click Close to close the Manage Workspaces dialog.
Now we will submit the folders and add the structure to VSTS.

  • Click the Pending Changes button to see the list of pending changes.  Enter a check-in comment and click the Check In button.


The next step is to convert the Main folder into a branch.

  • To do this, right-click the Main folder, choose Branching and Merging > Convert to Branch.


  • Enter a comment and press Convert.


Notice that the folder icon has changed to a branch icon.



When you create a new Dynamics  365 for Operation (Ax7) project, you should store the project in your VSTS controlled Projects folder. The Metadata folder mapping we created will allow Visual Studio to create the project elements in the correct location and still allow you to add them to version control.









Источник: https://stoneridgesoftware.com/setti...visual-studio/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Старый 04.08.2017, 20:48   #2  
mazzy is offline
mazzy
Участник
Аватар для mazzy
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии AXAWARD 2013
Лучший по профессии 2011
Лучший по профессии 2009
 
29,472 / 4494 (208) ++++++++++
Регистрация: 29.11.2001
Адрес: Москва
Записей в блоге: 10
т.е. идея в том, чтобы "подмапить" каталог C:\AOSService\PackagesLocalDirectory\<mySuperModel>
в каталог проекта... и перенаправить в него.
и маппинг работает только для Team Foundation Server... в LCS.

а есть ли подобная технология для Git?
__________________
полезное на axForum, github, vk, coub.
Старый 07.08.2017, 03:38   #3  
trud is offline
trud
Участник
Лучший по профессии 2017
 
1,038 / 1629 (57) ++++++++
Регистрация: 07.06.2003
Записей в блоге: 1
Цитата:
Сообщение от mazzy Посмотреть сообщение
т.е. идея в том, чтобы "подмапить" каталог C:\AOSService\PackagesLocalDirectory\<mySuperModel>
а есть ли подобная технология для Git?
Как-то давно на яммере проскакивал такой вопрос, но ответили что не планируется. там кстати не просто подмапить, там же еще надо исключить стандартные файлы SYS слоя. кроме того код в VSO потребуется для обновления между версиями(они ж периодически меняют внутренний формат). т.е. выход наверное в каком-то гибридном режиме. гугл выдает пару тулзов для этого(правда сам не проверял)

https://marketplace.visualstudio.com...ility.gittasks
Старый 07.08.2017, 11:35   #4  
belugin is offline
belugin
Участник
Аватар для belugin
Сотрудники Microsoft Dynamics
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии 2011
Лучший по профессии 2009
 
4,622 / 2922 (107) +++++++++
Регистрация: 16.01.2004
Записей в блоге: 5
Мы храним исходники в ГИТе. Для этого в
C:\AOSService\webroot\web.config

Прописывается такая строчка

X++:
<add key="Aos.MetadataDirectory" value="D:\git\ER\source\metadata" />
Собственно надо еще поменять rконтроль версий на GIT и все.

После этого он будет брать для модулей в git исходники их этой папки, а для всего остального - из пакетов.

Я не знаю, достаточно ли этого для того, чтобы оно работало на клиентской машине, но например правкой этого параметра в конфиге можно переключить место откуда VS будет брть исходники
За это сообщение автора поблагодарили: trud (5).
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
stoneridgesoftware: Microsoft Dynamics 365 – Right around the Corner Blog bot DAX Blogs 0 10.10.2016 21:13
NAV Team: Validating Single Sign-on with Office 365 and Microsoft Dynamics NAV 2013 R2 Blog bot Dynamics CRM: Blogs 0 19.12.2013 15:00
clausl: Free Visual Studio Designer for editing Reports in Dynamics NAV 2013 and other options Blog bot Dynamics CRM: Blogs 0 31.05.2012 12:05
german_nav_developer: Buildnummern-Übersicht Microsoft Dynamics NAV 2009 Blog bot Dynamics CRM: Blogs 0 04.06.2010 13:21
Microsoft Dynamics AX 2009 White Paper: Migration of Microsoft Dynamics AX Version Control System content from Microsoft Visual SourceSafe to Microsoft Team Foundation Server Vadik DAX: База знаний и проекты 0 07.05.2010 12:03
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 11:26.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.