question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deploy project with C++/CLI assembly with dependencies

See original GitHub issue

I am trying to dotnet publish (or pack) a solution that contains a C++/CLI project. As I understand it this is not currently supported. It seems the context of the current directory is lost when going thru dotnet pack.

Doing > dotnet pack --no-build -o ./pack Jacobi.Vst.sln

Results in

[...]\Jacobi.Vst.Interop\Jacobi.Vst.Interop.vcxproj(29,3): 
error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. 
Confirm that the expression in the Import declaration "\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk. 

There are two goals I want to achieve:

  1. Create a nuget package for my library that devs can use when they create a VST Plugin
  2. Create a way for the dev to pack his Plugin together with assemblies from my library.
  1. There are three assemblies, one of which (Interop) is C++/CLI mixed. I have a dependency on other nuget packages (like Microsoft.Extensions.Configuration).
  2. Is a bit more complex. The Interop assembly needs to be renamed to the root name of the devs plugin and his managed assembly is given a different extension. The Interop assembly looks for this different extensions and loads the the actual managed plugin. The dev’s plugin assembly of course has dependencies on other nuget packages as well. I probably also need a correct runtimeconfig.json and deps.json (?).

I was trying to bring all the assemblies together in one folder (my library, a plugin with special extension and the Microsoft.Extension.Configuration.dll’s) During loading of my (renamed) Interop assembly into the unmanaged host application, the nuget dependencies did not (auto) load. I did have a runtimeconfig.json but not a deps.json. I figured using dotnet pack/publish would be the correct way to generate this deps.json for the plugin. That is if having a deps.json is the correct solution. It looks to be related to dotnet/runtime#18527 but I just wanted to make sure if having a deps.json would or would-not fix this.

Edit: After some more testing and digging through all the dependencies recursively (initially I forgot) the plugin loads. But its tedious to find all recursive dependencies by hand. Hoping that dotnet publish could automate this and gather all the dependent dlls for me.

I can’t remember the exact details of all the other things I have tried, but I have not been able to get it to work. I also know that I lack some knowledge of how dotnet core is deployed and how nuget packages are positioned in this whole story.

My Project https://github.com/obiwanjacobi/vst.net/tree/netcore3/Source.Core/Code

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:21 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
obiwanjacobicommented, Mar 25, 2020

Is this where issues are sent to die…?

0reactions
wli3commented, Jun 27, 2020

Sorry, we have a high volume of work these few month. Please expect a long delay.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to include dependencies in Setup and Deployment ...
I have a solution that consists of 3 projects. I've created a deployment project it is only including the dependencies from one of...
Read more >
Issue with C++/CLI targeting .NET Framework 3.5!!!
Solution containing two projects attached. The project has very little changed from the template C++/CLI project other than change the target framework to ......
Read more >
Creating a C++/CLI Wrapper - Simple Talk
After the installation is done, open Visual Studio and create a new project. For its type, go to Visual C++ on the right...
Read more >
Asp.Net Core project targeting .Net 5 depending on C++/CLI ...
NET 6 C#, CLR, and C++ projects. The deps.json file is simply missing required dependency information. If I build the same solution in...
Read more >
Extension Project - DevOps
The following article provides instructions on how to bootstrap and deploy your DevOps extension project. This article showcases required ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found