Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

C++ Script is not opening in Visual Studio Code, it directly opens in Visual Studio 2022 directly.

1 REPLY 1
Reply
Message 1 of 2
subir.kumar1.dutta
126 Views, 1 Reply

C++ Script is not opening in Visual Studio Code, it directly opens in Visual Studio 2022 directly.

Hi @BrianEkins 

 

C++ Script is not opening in Visual Studio Code, it directly opens in Visual Studio 2022 directly.

 

How to change the setting so that I get a chance to choose to open it in Visual Studio Code instead of Visual Studio 2022.

 

I tried uninstalling and reinstalling Fusion 360 with a hope that the saved settings will be deleted. But not help.

 

 

1 REPLY 1
Message 2 of 2

I played with this a bit and I was able to get it partially working. It seems like it's more of an issue with VS Code than with Fusion. When you edit a C++ script, Fusion is looking for a .vsxproj file in the script folder and then opens it using the shell command of the OS, which if you have Visual Studio installed, VS is associated in the OS with the .vsxproj file extension and is invoked by the OS for that file type.

 

If there isn't a .vsxproj file, then Fusion appears to be looking for a .cpp file with the same name as the script and opening it. If you have VS Code associated with the .cpp file extension, then VS Code will be opened by the OS. However, the problem I ran into is that you really want to open the folder, not just the cpp file. I found one comment that indicated if the .cpp file is in a folder that contains a .vscode folder, then it should open the folder instead, but in my testing, this isn't the behavior. Maybe you can get it to work.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report