Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
angelotadres opened this issue Aug 5, 2024 · 0 comments
Open

Comments

@angelotadres
Copy link

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant