Invalid Command Line. Unknown Switch : Axconfig. While opening the visual studio shortcut with /AxConfig Parameter


Hi Technical,

Today, we faced a weird issue while opening Visual Studio from AX 2012.

Error: 

Invalid Command Line. Unknown Switch : Axconfig.

Use:
devenv  [solutionfile | projectfile | anyfile.ext]  [switches]


Solution: 

It is because of two reasons either Visual Studio tools are not installed properly or Visual Studio is not compatible with AX 2012.

Follow the steps for installing visual studio 2013 tools:

1) Run AX setup.
2) Select Visual Studio 2013 tools from Developer tools option.



3) Run the prerequisite validation if all okay then go ahead, in our case we got one error.


4) For AX 2012 R3 Visual Studio 2013 update 2 is must so asked your System Admin to install the update.
5) Once update 2 installed, install the visual studio 2013 tools again.
6) Restart the server after complete installation.
7) For configuration the visual studio, open the Start menu, right-click Visual Studio and select Properties.
8) Update the Target field and add the /AxConfig switch with either the name of the client configuration or the name of the client configuration file as shown in the following examples:

"C:\Program Files\Microsoft Visual Studio 13.0\Common7\IDE\devenv.exe" /AxConfig AX2012R3

or

"C:\Program Files\Microsoft Visual Studio 13.0\Common7\IDE\devenv.exe" /AxConfig 
C:\AXConfig\AX2012R3.axc

Note: For more detail click on this link.

9) Run visual studio as admin and it should work.
10) Done, you are ready to rock.

We hope this solution helped you to configure Visual Studio for AX 2012. Please comment your valuable feedback for this article...

Author:
Chirag Gupta
Microsoft Dynamics D365/AX 2012
Senior Technical Consultant at IBM Bangalore

Date:
2-Apr-2020

Happy Learning !!

Comments

Popular posts from this blog

[Solved] : Error: String or binary data would be truncated. Cannot execute a data definition language command on Vendor (VendLedgerReconciliationTmp)

AX 2012 - Command prompt compilation / AxBuild.exe for Parallel Compile on AOS of X++ to P-code / Parallel Compilation

AX 2012 - How to send SSRS report in email as an attachment using X++

AX 2012 - How to stop AOS when services got stuck at stopping status

AX 2012 - How to make a form field mandatory

Error: There was no endpoint listening at net.tcp://your_server_name:8201/Dynamics AX/Services…

Fetch vendor address using X++ in AX 2012

AX 2012 - How to print current date and time on SSRS Report

[Error] - Error in unit of amount in currency KES. Must be rounded to 0.01 | The unit of 37.563.5343100000000000 KES being posted to account 32710001-- is outside the current penny rounding threshold | Posting has been canceled

[Solved] : AX 2012 - No connection could be made because the target machine actively refused it 192.168.10.249:8201