Publish related query

I wants to include folder and file which are outside of main file folder in publish. How can I achieve this.

My folder structure is

-SLCommon -->Main.xaml

When I publish project it wont include file which are outside SLCommon folder.

Is your project.json file under the SLCommon folder?
Is it an option to move SLMaster and FolderC inside SLCommon? If yes, that should solve your problem.

As far as I understand, the project.json file helps determine what gets published.

Welcome to the forum

not knowing all your details / requirements following options can be checked:

inside the project folder making available the SLCommon folder with a symbolic Link
it will link the folder/files but not copy. So it is integrated but not duplicated (usefull for including reusable XAMLS in more projects, but editing them only in one location)

sometimes the user access right are blocked for executing this command- so just give a try with /d or /j

Post editing the nuget package with the nuget explorer