VVVV can not deal with nuget packages that make use of C++/CLI dlls

Since I didn’t get a reaction on the VL.Audio.LTC thread but the issue persists and doesn’t only affect my package but also other nugets making use of C++/CLI libs I decided to open a new thread.
For a basal explanation check this post:

I tried some other nugets meantime which show the same behaviour, namely:

Trying to use them results in variations of the following errors:

Unexpected exception during Update: Could not load file or assembly 'C:\Users\someuser\AppData\Local\vvvv\gamma\nugets\CefSharp.Common.NETCore.123.0.60\runtimes\win-x64\lib\netcoreapp3.1\CefSharp.Core.Runtime.dll'. The specified module could not be found.

FileNotFoundException: "Could not load file or assembly 'C:\Users\someuser\AppData\Local\vvvv\gamma\nugets\CefSharp.Common.NETCore.123.0.60\runtimes\win-x64\lib\netcoreapp3.1\CefSharp.Core.Runtime.dll'. The specified module could not be found."
            FileName: "C:\Users\someuser\AppData\Local\vvvv\gamma\nugets\CefSharp.Common.NETCore.123.0.60\runtimes\win-x64\lib\netcoreapp3.1\CefSharp.Core.Runtime.dll"
            StackTrace:
                _callmenamesM2024M04M17_.__auto.callmenamesM2024M04M17Application_SUliujpp4tUQSFA8QGs24UProgram_ { public virtual _callmenamesM2024M04M17_.@__auto.callmenamesM2024M04M17Application_SUliujpp4tUQSFA8QGs24U Update(_callmenamesM2024M04M17_.@__auto.callmenamesM2024M04M17Application_SUliujpp4tUQSFA8QGs24U __self) { ... } }  in "callmenames-2024-04-17.vl.1.cs" Ln 22
                 { public static object InvokeStub_callmenamesM2024M04M17Application_SUliujpp4tUQSFA8QGs24U.Update(object , object , System.IntPtr* ) { ... } } 
                System.Reflection.MethodBaseInvoker { internal object InvokeWithNoArgs(object obj, System.Reflection.BindingFlags invokeAttr) { ... } } 

        TargetInvocationException: "Exception has been thrown by the target of an invocation."
            StackTrace:
                System.Reflection.MethodBaseInvoker { internal object InvokeWithNoArgs(object obj, System.Reflection.BindingFlags invokeAttr) { ... } } 
                VL.Lang.Platforms.RuntimeInstance { public void Step(VL.Lang.Symbols.ITargetCompilation compilation) { ... } } 
                VL.Lang.Platforms.RuntimeHost { public void StepInstances(VL.Lang.Symbols.ITargetCompilation compilation, System.Boolean& hadToKill) { ... } } 

AggregateException: "One or more errors occurred. (Exception has been thrown by the target of an invocation.)"
    InnerExceptions: "1"
    StackTrace:
        VL.Lang.Platforms.RuntimeHost { public void StepInstances(VL.Lang.Symbols.ITargetCompilation compilation, System.Boolean& hadToKill) { ... } } 
        VL.Lang.Platforms.RuntimeHost { private void SharedStep() { ... } }


Tried two others that work in the sense that there are no errors while referencing and working with them:

Both of them are basically structured like this:

image

The lib folder contains a managed dll.

image

The build folder a native dll, Ijwhost.dll and a targets file.

image

Gorgon.Graphics.Wpf.targets contains this.

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <ItemGroup>
        <NativeLibs Include="$(MSBuildThisFileDirectory)**\*.dll"/>
        <None Include="@(NativeLibs)">
            <Link>%(RecursiveDir)%(FileName)%(Extension)</Link>
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>          
        </None>
    </ItemGroup>
</Project>

Unfortunately I couldn’t export an executable using these two to check if Ijwhost.dll gets copied to the output. There were (I guess unrelated) errors during export.

None the less I tried using a targets file (inspired by the ones listes above) in VL.Audio.LTC but still couldn’t get the Ijwhost.dll to get copied to the output when exporting.

I am stumped and would really appreciate if some devvvv (maybe @Elias) could spare some time.

Latest tries were with 6.2 stable.

1 Like

I’ve created a PR for you.