web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to map the PackagesLocalDirectory in Dev and Main Branch

(0) ShareShare
ReportReport
Posted on by 2,225

Hi,

My Project Structure is like so:

Trunk:

+Dev (Branched from Main)

++Metadata

++Projects

+Main (Branch)

++Metadata

++Projects

How to map these folders in the Workspace? Do we have to use only 1 workspace for both the branches or is it possible to use separate workspace for each branch? Also Main branch will be configured on a separate machine but it will also be visible on developer machines right since they are in same TFS project? And we will be creating packages from the machine with Main branch after checking in the changes on Dev and merging with Main?

Trunk: #### Is this folder mapped locally? Because I saw tutorials mapping only metadata and projects folder. 

+Dev (Branched from Main)  ####### Do we have to map this folder locally or not? I was getting error in merging when the Main branch was not mapped.

++Metadata   ##### This will be mapped to PackagesLocalDirectory but what about the one in Main branch? Workspace will throw error if I try to map to the same folder even from separate machine. Whats the solution for this?

++Projects  ####### This will be mapped to local projects directory 

+Main (Branch) ####### This has to be mapped right? Because I was unable to merge dev to Main if I don't map this folder/branch.

++Metadata  ########## What about this? This is so confusing.....

++Projects ##### This will be mapped to separate local projects directory right? A path separate to the Projects in Dev branch. Correct?

Appreciate any tips. Difficult to find good content on this.

Best Regards,

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at

    You don't need a workspace mapping of the Main branch for development. But if you'll do the merge of Dev branch to Main on development machines, then you'll need the mapping for this task. Whether you'll create a single workspace or a separate workspace for each branch is up to you - both approaches are possible.

    Packages should be created by automated builds, therefore you should abandon the idea of having an environment mapped to Main and creating packages manually there.

    I'll assume that you're asking about mapping on dev boxes:

    • Don't map Trunk
    • Dev branch mapping seems to be clear.
    • Map Main branch to a separate folder (e.g. K:\Repo\Main), not to PackagesLocalDirectory nor to the standard folder with Projects. You can't use both branches at the same time in F&O; here you'll use Main just for merging of files.

    If you want to develop on both Dev and Main and switch between them in development environments, it's possible, but it's requires extra work. Please start with the setup described above and make things more complicated after you get familiar with the simpler ones.

  • MYGz Profile Picture
    2,225 on at

    Thank you Martin for providing the clarity,

    "Packages should be created by automated builds, therefore you should abandon the idea of having an environment mapped to Main and creating packages manually there."

    Got your point here. But is it possible to merge dev to main and then manually create a package from a separate machine dedicated for build? For this I guess the folders in Main branch have to be correctly mapped (like they are in the Dev Branch) right? And since PackagesLocalDirectory can only be mapped once in the workspace, it would require changing the Dev branch to achieve this then or a separate workspace? The reason I'm asking this is I'm using 3 locally hosted VHDs right now. I'm not sure if automated build can be done with VHDs because it might not be as easy as cloud hosted VMS which automatically setups everything during initial deployment.

  • Verified answer
    Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at

    Creating a package manually is possible, but it means extra work and it's more risky. Most importantly, it doesn't guarantee that what you're included in the package is really the same thing that you have in the Main branch. Maybe you forgot to get to the latest version, maybe something was done manually in this environment, maybe you didn't select the right set of packages...

    Could you please elaborate what you mean by "this" in "for this I guess..." and "to achieve this"? The previous sentence was about whether you can make a build manually, but the subsequent questions (referring to "this") seems to be about another topic.

    Of course that automated builds can be used if you use VHDs for development. The build process uses code from source control and it doesn't know or care about where it was developed. You can use either the build service hosted by Microsoft, or set up your own build server, either in Azure or locally.

  • MYGz Profile Picture
    2,225 on at

    Thanks for the reply Martin,

    By "this" I was referring to mapping of Main branch with local folders on Build VHD to make it build ready. Because I was thinking if we are merging the Dev to Main, should Main be exactly mapped like Dev on the Build machine? If so, then Metadata will create issue as it cannot be mapped twice in same workspace to 2 folders (one in Dev, one in Main). So, while the merging of Dev to Main is clear to me, I still have doubts on how to map/setup the Main on the build machine.

    Can you help with blog/documentation on how to setup the Build VM with a local VHD?

    Edit:

    I found a good blog by nmaenpaa 

       

    But I want to know where/how to map the Main branch with this build environment?

  • Verified answer
    Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at

    If you have an environment mapped to Main, then you don't need any mapping to Dev there and no switching between them. You just need to map Main\Metadata to PackagesLocalDirectory. There won't be any issues with mapping PackagesLocalDirectory twice, because you don't need Dev there at all. There will be just one mapping, to the Main branch.

    Regarding documentation, check out Dynamics 365 F&O Dev ALM guide.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 669 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 449 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 384 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans