Visual Studio 22 Package errors

Created at 19 Aug 2022, 23:08
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
DI

DiamondTrades

Joined 14.09.2021

Visual Studio 22 Package errors
19 Aug 2022, 23:08


Hi all,

When I load any project into Visual Studio 22 by right-clicking and then selecting "Edit in Visual Studio", the project opens with the following :

"Error    NU1101    Unable to find package cTrader.Automate. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages"

Of course, if I then debug this, I get "Error    CS0234    The type or namespace name 'API' does not exist in the namespace 'cAlgo' (are you missing an assembly reference?)"

This happens on every project, including examples provided by Spotware. What am I doing wrong?

Any help much appreciated!

Thanks,

 


@DiamondTrades
Replies

DiamondTrades
19 Aug 2022, 23:15 ( Updated at: 19 Aug 2022, 23:26 )

Also, to clarify, I have Version 4.3.9.7083 and 4.2.20 of cTrader installed and both have this issue.


@DiamondTrades

DiamondTrades
19 Aug 2022, 23:49

I have resolved this. Posting fix for anyone that may come across the same issue again. This was related to my NuGet package settings. To fix, within VS 2022, go to "Tools > NuGet Package Manager > Package Manager Settings" Then within here "Package Sources" for me, I only had Offline Packages, which meant it couldn't update the Dependencies. So add nuget.org as a source "https://api.nuget.org/v3/index.json" is the correct link. Once added, it should now work.


@DiamondTrades