Thank you for seeking help! Our friendly community is here to assist you.
Hey Guys
I am running some tests and encountering a lot of exceptions in a receive function.
Iâve pulled apart the receive and just using operations and still getting the same errors.
Key one being thrown.
Exception thrown: âSystem.IO.FileNotFoundExceptionâ in System.Private.CoreLib.dll
Exception thrown: âSystem.Reflection.ReflectionTypeLoadExceptionâ in System.Private.CoreLib.dll
âSpeckleConsoleTest.exeâ (CoreCLR: clrhost): Loaded âC:\Users\Adam\AppData\Roaming\Speckle\Kits\Objects\Speckle.netDxf.dllâ. Module was built without symbols.
âSpeckleConsoleTest.exeâ (CoreCLR: clrhost): Loaded âC:\Users\Adam\AppData\Roaming\Speckle\Kits\Objects\Triangle.dllâ.
âSpeckleConsoleTest.exeâ (CoreCLR: clrhost): Loaded âC:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Drawing.Primitives.dllâ.
Exception thrown: âMicrosoft.CSharp.RuntimeBinder.RuntimeBinderExceptionâ in Microsoft.CSharp.dll
The issue is these get thrown ALOT and make it hard to debug my code vs the underlying API.
Can I request these errors are better managed so its easier for me to debug my code?
I have created a simple ConsoleApp and using Visual Studio, here is the code to replicate the output.
The exceptions all appear on running receive (line 44)
using Speckle.Core.Credentials;
using Speckle.Core.Api;
using Objects.Geometry;
Console.WriteLine("Hello, World!");
var accounts = AccountManager.GetAccounts();
foreach (var account in accounts)
{
Console.WriteLine(account.userInfo.name);
Console.WriteLine(account.userInfo.email);
Client client = new Client(account);
var projects = await client.ActiveUser.GetProjects();
foreach (var project in projects.items)
{
Console.WriteLine(project.id);
var models = client.Model.GetModels(project.id).Result;
foreach (var model in models.items)
{
var modelVersions = client.Model.GetWithVersions(model.id, project.id).Result;
// Create an instance of ModelResource
var mr = client.Model;
var modelResource = mr.Get(model.id, project.id).Result;
var or = client.ObjectGet(project.id, model.id).Result;
foreach (var version in modelVersions.versions.items)
{
//var chk = client.Version.Get(version.id, model.id, project.id).Result;
var data = Helpers.Receive(version.previewUrl.AbsoluteUri, account).Result;
}
}
}
}