D365 FO Error Fix Notes 1: Already Mapped in Workspace

D365 F&O error fix notes · 1

Cover image for D365 F&O Error Fix Notes 1: switched Azure DevOps accounts and the source folder won't map

Our Visual Studio license ran out on a local development VM built from the LCS VHD, so we switched accounts and remapped the Microsoft Dynamics 365 Finance & Operations source folder to Azure DevOps, and it failed right away. Here's what happened in October 2024, step by step.

Key points

  • The cause: the old account's workspace still holds the same local folder
  • Clearing the local cache doesn't fix it. Deleting the old workspace on the server does
  • In the delete command, separate name and owner with a semicolon (;), not a colon (:)
  1. Setup and trigger
  2. Read the error
  3. Try clearing the cache
  4. Find name and owner
  5. Delete the old workspace
  6. Map again
  7. Checklist

01 Where it happened, and why we remapped

  • Setup: a local development VM built from the LCS VHD (the local OneBox route we'll cover in developer series episode 5), Visual Studio 2022, and TFVC in Azure DevOps for source control
  • Trigger: the license for the account we used in Visual Studio on that VM expired, so we signed in to Visual Studio with another account that had one
  • Why remap: only a workspace's owner can use it. To check in with the new account, we had to map the same Metadata folder to a workspace owned by that account
  • Where it broke: the old account's workspace was still on the server, holding the same folder. That's the error in this article

Source: Microsoft Learn · Create and work with workspaces

Terms
· Workspace: a TFVC pairing of server folders and local folders, with a fixed owner and computer
· TFVC: Team Foundation Version Control, the centralized source control in Azure DevOps and the default for D365 F&O
· Check in: save the code you changed on your PC to source control on the server

02 An old workspace still holds the folder

Route map: on the same VM, the old account's workspace still holds PackagesLocalDirectory, so the new account's mapping is blocked

JGS explanatory diagram

  • Situation: after connecting to Azure DevOps with the new account, we mapped the Metadata folder in Source Control Explorer
  • Error: The path C:\AOSService\PackagesLocalDirectory\… is already mapped in workspace …
  • How to read it: the part before the semicolon is the workspace name, the part after is the owner. Here the name matched the VM name, and the owner was the old account
  • Why D365 F&O hits this: you map the Metadata folder to the local model store root (PackagesLocalDirectory). If an old workspace holds that folder, a new mapping can't use it
Visual Studio Map dialog with the error: The path C:\AOSService\PackagesLocalDirectory\… is already mapped in workspace

① First error · already mapped in workspace

Real JGS screen capture · October 2024

Terms
· PackagesLocalDirectory: the local model store folder that holds D365 F&O model source (XML)

03 What we tried first: clearing the local cache

  • The tip you'll find most often: close Visual Studio and empty %LocalAppData%\Microsoft\Azure DevOps\<version>\Cache (8.0 on this VM)
  • Result: the message changed, but the mapping still failed
  • New message: The working folder … is already in use by the workspace … on computer …
  • What it means: it's not the local cache. A workspace registered on the server is still using the folder
Windows File Explorer at AppData\Local\Microsoft\Azure DevOps\8.0\Cache

② The Azure DevOps cache folder we emptied

Error after clearing the cache and mapping again: The working folder … is already in use by the workspace … on computer …

③ Second error · already in use by the workspace

Real JGS screen captures · 2 images · Korean screen text replaced with English

Caution · Clearing the cache isn't a fix from Microsoft's docs. It's just what we tried first, and it didn't work here.

04 The name and owner of the workspace to delete

  • From the error: the name;owner part is exactly what you'll delete
  • From a list: if the message isn't clear, list every owner's workspaces with tf workspaces and use the full OwnerId value (object ID\account address) as the owner
  • Permissions: you need to own the workspace or have Administer workspaces
  • Pending changes: deleting a workspace cancels its pending changes, so check them in or shelve them first
tf workspaces /computer:* /owner:* /collection:https://dev.azure.com/<org> /format:xml

Source: Microsoft Learn · workspace command

Tip · The Manage Workspaces dialog in Visual Studio shows the workspaces you own. For another user's workspace, Microsoft's docs point you to the command prompt.

Terms
· Pending changes: local changes you haven't checked in yet
· Shelve: park changes on the server without checking them in

05 Delete the old workspace with tf

  • Where to run it: Start menu › Developer Command Prompt for VS 2022 › Run as administrator (on this VM we use Visual Studio as an administrator)
  • Repeated failures: we separated name and owner with a colon (:) and got TF10131 every time (four of them in the capture). tf reads the whole thing as one workspace name, so it decides the name is over 64 characters or has a character you can't use (/ : < > \ | * ? ;)
  • Success: separate them with a semicolon (;) and wrap the full owner account in quotes
  • Last check: you'll see “A deleted workspace cannot be recovered” and the pending change count (0 here). Then type y
tf workspace /delete <workspace name>;"<owner account>" /collection:https://dev.azure.com/<org>
Start menu search showing Developer Command Prompt for VS 2022 with Run as administrator selected

④ Run Developer Command Prompt as administrator

Command prompt: tf workspace /delete attempts with a colon keep failing with TF10131, and the last one, with a semicolon, asks to confirm the delete

⑤ Colon (:) fails, semicolon (;) deletes

Real JGS screen captures · 2 images

06 Map again and refresh models

  • Map: in Team Explorer › Source Control Explorer, map the Metadata folder to PackagesLocalDirectory again
  • Get the code: Get Latest Version on Metadata
  • Refresh models: if new models came in, use Dynamics 365 › Model Management › Refresh models
  • Local files: deleting a workspace doesn't delete the files and folders on your PC
Menu path
· Map: Visual Studio › Team Explorer › Source Control Explorer › Metadata folder › Map
· Manage workspaces: Team Explorer › Home › Workspace ▾ › Manage workspaces

Source: Microsoft Learn · Version control and metadata · Create and work with workspaces

We don't have captures for this step, so it follows the order in Microsoft's docs.

Route map: read the error, try clearing the cache, find name and owner, check pending changes, delete the old workspace, map again

JGS explanatory diagram

07 Checklist for the same error

CheckWhat to do
What to deletename;owner from the error, or OwnerId from tf workspaces
Pending changesCheck in or shelve before deleting
PermissionsWorkspace owner or Administer workspaces
CommandDeveloper Command Prompt, semicolon (;) between name and owner
Wrap-upMap Metadata again → Get Latest Version → Refresh models

We checked the documentation on October 26, 2026. This article is based on JGS work notes from a development VM in October 2024 and Microsoft documentation. We didn't rerun the commands for this article.

Source documents · Microsoft Learn

Next episode · Developer series episode 4 · Connect Azure to an existing LCS project and deploy a development VM

We'll connect an Azure subscription to an existing LCS project and deploy a development VM with the episode 3 checklist.

Episode 4 route map: admin consent, Contributor role, and connector, then deploy, sign in, and clean up the development VM

Coming up next · Connect Azure once, deploy and clean up per environment

The JGS Consulting team has been part of the journey from Dynamics AX 2009 and AX 2012 to Dynamics 365 Finance & Operations. Our team includes finance, costing, and tax specialists, the foundation of any ERP. We also handle logistics, manufacturing, and distribution systems as one team, from process design to development and operations, with expertise in system and development architecture. We continue our development series on the Microsoft ERP system.

JGS Consulting

A development guide series from JGS Consulting. Using Microsoft documentation, the series explains environment setup, development tools, and validation for Microsoft Dynamics 365 Finance & Operations.

jgs.ai.kr

Contact JGS about development environments

#Dynamics365 #D365 #D365FO #MSERP #MicrosoftERP #JGS #AzureDevOps #TFVC #VisualStudio #Troubleshooting

한국어 글은 네이버 블로그에서 보실 수 있습니다: https://blog.naver.com/jgsconsulting

Comments

Popular posts from this blog

Korean VAT Filing in D365 With Less Spreadsheet Rework

How JGS Uses AI Agents in D365 Projects: Two New Series

Welcome to the JGS Consulting Blog: Dynamics 365 Insights from Korea