Objects from linked C# code from another (external) project not bundled with Nuget package

Apologies if I have the terminology wrong -  I hope I can make myself clear enough.

I'm trying to build a NuGet package that makes use of local C# source files and those linked from an external location (of the project) - this is because we have multiple projects referencing the same code and unfortunately due to how it is organised I can't use use a Git submodule. While I'm working in the editor the code is working as expected but when I build the NuGet package it seems that none of the code from the linked source files are included.

I'm sure it's a build configuration issue and I've missed a setting but I can't think of what I need to do to get the desired result. As is I'll have to physically copy these source files from the external location into my local project structure which isn't ideal.

Any help is appreciated.

0
1 comment

Consider you have a public reference resource A, and would like to refer A in another package B.

A classic way is publishing A and then install it in the B project, you will see the package references in the B project. When packaging B, the references will be added automatically.

Furthermore, you can add A sources into the nuspec file of B (example here). So that you don't have to package extra pdb files, and it's more friendly for debugging.

0

Please sign in to leave a comment.