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 :
Microsoft Dynamics AX (Archived)

Duplicate TFS namespace

(0) ShareShare
ReportReport
Posted on by

I've managed to hook up AX 2009 to TFS 2012.  When you connect AX to TFS for the first time, a TFS workspace is automatically created with the following naming convention: <computer name>_AXWORKSPACE<numerical suffix>. 

I have 3 AX environments (Dev, Test, Stage) that I'm trying to connect to TFS.  I've somehow gotten AX/TFS into a state where it's trying to assign the same numerical suffix to all 3 environments.  It then complains that the workspace already exists when TFS tries to create it again.  I've already tried creating new folders in TFS and mapping to a new local path. There must be some place in AX or TFS where the next numerical suffix is being stored. Thanks for your reply.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Davie

    Shared workspace is possible with Ax2012 but in Ax2009 that was not possible. We too have a Dev/Test/UAT setup but the way we manage is different. On the same TFS Project we create 3 branches Dev/Test/UAT and the current release is always a sub-branch of Dev like Dev 3.3, Dev3.4, Dev3.5 etc. To switch the client machines i don't switch the TFS workspace rather i switch the branch folder in the Version control Parameters. So to switch from Dev3.3 to Dev, I first clean my layers that are connect to the Version control (Cus in my case) . Open Version control parameters and change the path to C:\TFSAxRepositry\Dev3.3 to C:\TFSAxRepositry\Dev then Synchronize. This is working well so far me except that you may not want to do this frequently :) we do it once per release.

    /Kamal

  • Martin Dráb Profile Picture
    237,987 Most Valuable Professional on at

    The numerical suffix is generated directly from number of items returned by GetAllLocalWorkspaceInfo(); it's not stored anywhere (before it's used in actual workspace name). You get into this code only if no workspace is found for the given path, so AX obviously doesn't see your workspaces by some reason.

    Ensure yourself that the type, owner and local path of the workspace are all correct. If it doesn't help, try to simulate what AX does by calling TryGetWorkspace() and GetAllLocalWorkspaceInfo() - it may be easier to test it directly rather than through AX.

  • Community Member Profile Picture
    on at

    Hi Martin,

    I tried calling those methods from a c# console application.  I just see the same workspaces that are currently displyed in the Visual Studio 2012 UI.  Currently I only have 2 workspaces but AX is trying to use a suffix 13 with two of my environments.

  • Martin Dráb Profile Picture
    237,987 Most Valuable Professional on at

    Well, it's hard to say what exactly is wrong in your environment. Just one more idea: is AX using the same account? Team Explorer shows only workspaces you have access too, if it was not the same user, you wouldn't see workspaces created by AX. (I know it's likely not the case, but for completeness...).

    The very last idea is to debug what's actually happening in the workspace proxy, but you would need Reflector to do that.

  • Community Member Profile Picture
    on at

    Yes I am the only user trying to create the workspaces.  I am new to TFS so in the beginning I was confused with workspaces.  I initially did a lot of renaming and deleting of the workspaces that AX created.  I think that caused the system to get into this state.  When I change the local repository folder in AX to another directory that I had entered earlier, it reuses an earlier workspace (e.g suffix 10 which I had earlier deleted).  That means it's still storing a directory workspace mapping somewhere in the system.  I have already tried deleting the TFS cache folder under C:\Users\<username>\AppData\Local\Microsoft\Team Foundation\4.0

  • Verified answer
    Community Member Profile Picture
    on at

    I finally got this to work although I was not able to figure out the root cause.  

    1. Delete all my workspaces in Visual Studio.  

    2. Open AX and let it automatically create a new workspace.  

    3. Repeat steps 1 and 2

    As I repeated the above steps, I saw the suffix decrease from 13 to 10.  I did the same with my other 2 environments.  With my other environment I got the suffix down to 9.  I opened the third environment and got a unique suffix with that one.  I couldn't get the suffix below 9 but I don't really care as long as it's working.  

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans