Search code examples
visual-studioaxaptadynamics-ax-2012

AX2012 - Change Visual Studio project path


I am having trouble opening/compiling a visual studio project in AX2012. Directly it complains about a file that does not exist. However, the underlying problem seems to be that the path + filename combination is too long.

It currently places the source code in: c:\users\%userprofile%\appdata\local\temp\2\Dynamics AX\Visual Studio\C Sharp projects... (From the top of my head). I have noticed if I manually attempt to copy the VS project to this folder in Windows Explorer I get an error message about the filename that is too long as well. Copying it to a folder higher up in the structure solves this. However, the moment I compile it in Ax (Through the AOT) it tries to find the above mentioned folder again.

Can this be changed somewhere?

I have tried changing the TEMP and TMP environment variables. I cannot imagine that this would be setup in VS, as the files get created by AX, and are then opened in VS.

Any advice? Thanks in advance


Solution

  • I eventually solved this with a work-around. I compiled the VS project through the AOT on a different machine, then copied the DLL and config file to the VSAssemblies folder on the AOS (./bin/VSAssemblies). In my case there were no client code. Started the AOS and the changes became effective

    EDIT: Recently had contact with MS support team, and they agreed that this workaround is also what they would give as advice