Skip to content

CppSharp NuGet: Could not load file or assembly 'CppSharp.Generator #1857

Open
@angelotadres

Description

@angelotadres
Brief Description

Using CppSharp via NuGet (version 1.1.5.3168), the following error appears when running the Console Application: Could not load file or assembly 'CppSharp.Generator, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

OS: OS X Sonoma 14.5

Code Used
using CppSharp;
using CppSharp.AST;
using CppSharp.Generators;

namespace SkTools.BindingsGenerator;

internal class Program : ILibrary
{
    public static void Main(string[] args)
    {
        ConsoleDriver.Run(new Program());
    }

    public void Setup(Driver driver)
    {

        var options = driver.Options;
        options.GeneratorKind = GeneratorKind.CSharp;
        var module = options.AddModule("Sk.Native");
        module.IncludeDirs.Add("../../src/Sk.Native/include");
        module.Headers.Add("greeter.h");
        module.LibraryDirs.Add("../../src/Sk.Native/build");
        module.Libraries.Add("Sk.Native.dylib");

    }

    public void SetupPasses(Driver driver) { }

    public void Preprocess(Driver driver, ASTContext ctx) { }

    public void Postprocess(Driver driver, ASTContext ctx) { }
}

Target: GCC

Stack trace or incompilable generated code

There is no Stack trace; Project compiles, this is the error verbatim when running:

/Users/atadres/Stuff/Workspace/sk/tools/SkTools.BindingsGenerator/bin/Debug/net8.0/SkTools.BindingsGenerator
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'CppSharp.Generator, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

File name: 'CppSharp.Generator, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null'

Process finished with exit code 134.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions