.NET 6.0 Simulator never works.

Created at 18 Jun 2024, 06:20
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!
CT

ctid1779370

Joined 08.01.2023

.NET 6.0 Simulator never works.
18 Jun 2024, 06:20


Hi there,

Every since the move to cTrader .NET 6.0 i have never been able to get one of my bots to run the simulator in .NET 6.0 framework.

They work perfectly on the legacy 4.0 no issues.

I really want to use the new cloud feature however that requires .NET 6.0.

Any tips on why this is a problem?
They compile with no issues.


@ctid1779370
Replies

PanagiotisCharalampous
18 Jun 2024, 09:10

Hi there,

Please provide more information about your problem. What is the exact issue?

Best regards,

Panagiotis


@PanagiotisCharalampous

ctid1779370
19 Jun 2024, 00:52 ( Updated at: 19 Jun 2024, 04:57 )

RE: .NET 6.0 Simulator never works.

 

Hi Panagiotis,

Here is a quick 2minute 30second video showing exactly whats happening, will be much easier to diagnose.

https://www.loom.com/share/b175abe1d88940e789a1570acc44536b?sid=9595a7d9-17fe-4ddb-bc08-27f370c9fff2

 

Best regards,

 

 


@ctid1779370

ctid1779370
19 Jun 2024, 01:45 ( Updated at: 19 Jun 2024, 04:58 )

RE: .NET 6.0 Simulator never works.

Hi Panagiotis,

After that video i uninstalled cTrader and did a brand new install.
I created a new project and opened it in visual studio, it said i needed to download the necessary .net for it to work so i did.


It still doesn't work and i get all these errors.
It seems like cTrader.Automate isn't even installed and i have no idea how to problem solve this.

I'm not sure why installing cTrader and starting a new project doesn't include all the necessary parts it should to begin working on the project?


@ctid1779370

ctid1779370
19 Jun 2024, 02:55 ( Updated at: 19 Jun 2024, 04:58 )

RE: RE: .NET 6.0 Simulator never works.

ctid1779370 said: 

Hi Panagiotis,

After that video i uninstalled cTrader and did a brand new install.
I created a new project and opened it in visual studio, it said i needed to download the necessary .net for it to work so i did.


It still doesn't work and i get all these errors.
It seems like cTrader.Automate isn't even installed and i have no idea how to problem solve this.

I'm not sure why installing cTrader and starting a new project doesn't include all the necessary parts it should to begin working on the project?

I now have cTrader.Automate installed which was the problem. It was not able to find the package the package url would break. So i had to manually download 1.0.9 and reference it locally from the package manager. The application is also using .NET6

However i still have the exact same problem from the first video. When i hit play in cTrader it does not print anything and using the simulator freezes.


@ctid1779370

ctid1779370
19 Jun 2024, 04:19 ( Updated at: 19 Jun 2024, 04:58 )

RE: RE: RE: .NET 6.0 Simulator never works.

ctid1779370 said: 

ctid1779370 said: 

Hi Panagiotis,

After that video i uninstalled cTrader and did a brand new install.
I created a new project and opened it in visual studio, it said i needed to download the necessary .net for it to work so i did.


It still doesn't work and i get all these errors.
It seems like cTrader.Automate isn't even installed and i have no idea how to problem solve this.

I'm not sure why installing cTrader and starting a new project doesn't include all the necessary parts it should to begin working on the project?

I now have cTrader.Automate installed locally which was the problem. It was not able to find the package the package url would break. 
So i had to manually download 1.0.9 and reference it locally from the package manager. The application is also using .NET6


Here is a video on how i did it for anyone else who is having the same problem.
https://www.loom.com/share/8b7fa8f5eaad4ee88e058f2d0f035dad?sid=a30c9475-5da8-448f-a864-5952b052e844


STEPS:
- Make sure you have Visual Studio installed
- Make sure you have the correct version of .NET installed, visual studio will prompt you to do so with a button click.
- Download cTrader automate to your computer. https://www.nuget.org/packages/cTrader.Automate

- Save it into a folder on your computer like C:\LocalNuGetPackages.
- Open Visual Studio:

  • Go to Tools > NuGet Package Manager > Package Manager Settings.

    Add the Local Package Source:
    • In the Package Sources section, click the + button to add a new source.
    • Set the Name to something like LocalPackages.
    • Set the Source to the path of your local package directory, e.g., C:\LocalNuGetPackages.
    • Click Update to save the new package source.

Step 4: Install the Package from the Local Source

Open the NuGet Package Manager Console:

  • Go to Tools > NuGet Package Manager > Package Manager Console.

Install the Package:

  • In the Package Manager Console, run the following command:

sh

Copy code

Install-Package cTrader.Automate -Source LocalPackages

Then make sure you restart everything. 

Create a new project in cTrader, open it in visual studio, make sure its connected to the local version of ctrader.Automate and it should start working.


@ctid1779370

... Deleted by UFO ...