I apologize for my basic question. I use Visual Studio 2022 Community Edition and create a console project. Later, I have installed RhinoCommon 8.17.25066.7001 version using NuGet package. However, it gives warning message as "Instead of utilizing project frame source “net8.0”, ".NetFramework,Version=v4.8.1 has been used during installation.
Later, I have written the code as below:
using System.IO;
using Rhino;
using Rhino.FileIO;
using Rhino.Geometry;
using Rhino.DocObjects;
class Program
{
public static void Main(string[] args)
{
string str = "C:\\Users\\SAMSUNG\\Desktop\\C#-Rhino\\Case3yeni3.3dm";
bool wasAlready;
Rhino.RhinoDoc.Open(str, out wasAlready);
}
}
At the last command line, it breaks and gives an error message as:
System.IO.FileNotFoundException: 'Could not load file or assembly ‘RhinoCommon, Version=8.17.25066.7001, Culture=neutral, PublicKeyToken=552281e97c755530’.
How could I fix this issue and import RhinoCommon library correctly, that will enable me to run Rhino.RhinoDoc.Objects.Add() method for a specific 3dm file, already created.
@menno Thank you for your answer, I will download Rhino3dm. One more question is, “Could I have an option to add an object into an existing 3dm file like Rhino.RhinoDoc.Objects.Add() method did” if I use Rhino3dm package. I could not encounter an Add method in the help file or missing? If you could advise me a method about adding objects(circles, curves, Breps, etc.) into an existing 3dm file, I would appreciate for that.
For the .Net version of Rhino3dm, do we use the same API documentation that of Python that is available here? Or is there any separate documentation for the Rhino3dm .Net API?
I am curious if there is more functionality available in .Net Rhino3dm than Python Rhino3dm.
You can start here to see what is available in rhino3dm.net and you will be directed to the rhinocommon doc for that method.
Python and JavaScript versions of rhino3dm are wrappers around OpenNURBS and the .NET version is a subset of RhinoCommon based on OpenNURBS. Due to the different ways these are compiled and packaged, you should not except them to have the same functionality, but we do strive for that.