C
C#•6mo ago
galer

Could not load file or assembly on VS Code

Hello 👋 I'm facing the following error: System: Macbook M1 Pro Runtime: .NET 7.0 IDE: VS Code Error message:
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'RhinoCommon, Version=8.2.23346.13001, Culture=neutral, PublicKeyToken=552281e97c755530'. The system cannot find the file specified.

File name: 'RhinoCommon, Version=8.2.23346.13001, Culture=neutral, PublicKeyToken=552281e97c755530'
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'RhinoCommon, Version=8.2.23346.13001, Culture=neutral, PublicKeyToken=552281e97c755530'. The system cannot find the file specified.

File name: 'RhinoCommon, Version=8.2.23346.13001, Culture=neutral, PublicKeyToken=552281e97c755530'
dotnet list package output:
[net7.0]:
Top-level Package Requested Resolved
> Grasshopper 8.2.23346.13001 8.2.23346.13001
> RhinoCommon 8.2.23346.13001 8.2.23346.13001
[net7.0]:
Top-level Package Requested Resolved
> Grasshopper 8.2.23346.13001 8.2.23346.13001
> RhinoCommon 8.2.23346.13001 8.2.23346.13001
My .csproj file:
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>NU1701</NoWarn>
</PropertyGroup>


<ItemGroup>
<PackageReference Include="Grasshopper" Version="8.2.23346.13001" />
<PackageReference Include="RhinoCommon" Version="8.2.23346.13001" />
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>NU1701</NoWarn>
</PropertyGroup>


<ItemGroup>
<PackageReference Include="Grasshopper" Version="8.2.23346.13001" />
<PackageReference Include="RhinoCommon" Version="8.2.23346.13001" />
</ItemGroup>

</Project>
What am I doing wrong? How can I debug this error?
6 Replies
galer
galer•6mo ago
Update: tried with Jetbrains Rider and same errors. Will try on Windows and see if these errors persist
Angius
Angius•6mo ago
No description
Angius
Angius•6mo ago
Rhino.Common seems to support only .NET Framework 4.8 So: * net7.0 is way too new to support this package * You won't be able to use it outside of Windows
galer
galer•6mo ago
Thanks for the reply! I am aware of that, but based on Rhino devs it should work despite what seems to appear in Nuget: - https://discourse.mcneel.com/t/rhino-inside-net-core-7-0/166059/5?u=gabriel15 - https://developer.rhino3d.com/guides/rhinocommon/moving-to-dotnet-7
You won't be able to use it outside of Windows
That would be true if the package is compiled for .NET Framework 4.8, right?
Angius
Angius•6mo ago
Yes, .NET Framework is Windows-only That said, even .NET Core and .NET applications and packages can be limited to Windows-only Especially if they use Windows-specific functionality
galer
galer•6mo ago
Got it, thanks! I did the installs on the Windows machine, same setup, and still getting that error; so I'm definitely doing something wrong 😆
Want results from more Discord servers?
Add your server
More Posts
Unsure on how to structure using OOPHey, I have written the following abstract class to abstract away different communication drivers li✅ Dotnet on UbuntuHey! I would like to download C# onto my Ubuntu installation however, the terminal can't find any paUpdating Packages on old application problemsHello, I'm currently trying to upgrade some old apps I'm currently working on and I'm facing a weirRepo pattern - is it okay to call one repo from multiple services?Hi, pretty much the title summarizes it all. In one code base I am refactoring I am seeing a lot oferror MSB4006: A circular dependency exists in the target dependency graph in which the destinationHi how are things. The error is in Spanish, but the error is the same. Below I leave the structure oNpgsql 8.0 + EFCore 8.0 + JSON Colums with type List<T> not workingHello! I'm not sure if this is a bug or intended behavior, but I'm trying to have a `Patient` entitTrying to compile a script at runtimeim trying to compile a script at runtime using CSharpCompilation.Emit this is the script i want to I am trying to host .NET8 application in IISExpress but facing error.There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined", this How can i create .exe file?Hello, I have the source code of an application and would like to create the .exe file to run and tePreventing TextBlock from getting deletedI'm using a RichTextBox and setting some inline as TextBlock but the user is able to delete that tex