Hello experts!
Does anyone try to configure SolutionPackager mapping file to ignore plugins packages nuget files during extracting and packing operations? I was trying to do this but unfortunately with no luck. This is because I do not want to store this file in the code repository (extracting) and on the other hand I would like it to be created and added to the solution dynamically during DevOps build pipeline (packing).
For me - it looks like SolutionPackager just ignores the following line of mapping file.
<FileToFile map="pluginpackages\pg_Pg.ProjectName.Dataverse.Plugins\package\pg_Pg.ProjectName.Dataverse.Plugins.nupkg" to="..\..\src\Backend\Pg.ProjectName\Dataverse\Pg.ProjectName.Dataverse.Plugins\bin\Release\Pg.ProjectName.Dataverse.Plugins.1.0.0.nupkg" />
Any ideas what could be wrong here?
Or maybe SolutionPackager does not work well with plugins packages yet?
Waiting for your input :).
Not sure what is going on but I suppose SolutionPackager may have some issues with relative folders in case of mapping of "general" files.
In case of plugin assemblies - it works without the problem. I can find the following information in log file:
2022-09-21 10:58:49.052 - Info Skipping '..\Solutions\ProjectName\PluginAssemblies/PgProjectNameDataversePlugins-4ACE8D14-E337-ED11-9DB1-000D3AABDFEE/PgProjectNameDataversePlugins.dll' as it matches a mapping directive
In case of plugin package (which uses the same folder "format" as the plugin assembly in mapping file) - tool is not able to find correct mapping because it expects something like: ..\Solutions\ProjectName\pluginpackages\pg_Pg.ProjectName.Dataverse.Plugins\package\pg_Pg.ProjectName.Dataverse.Plugins.nupkg in the mapping file. However when I try to use mapping file entry in the above mentioned format - it is incorrectly mapped into non-existing disk folders' structure :(.
I suppose it may be an issue connected to my project's folder structure which looks something like:
-root:
-- scripts (location of script running solution packager)
-- solutions (location of extracted solutions)
-- tools (location of solution packager itself)
Nevertheless, right now we've applied workaround which is removing (after extracting) and adding package file (before packing) to Dataverse solution with powershell script. It works for now.
At this point, SolutionPackager does not have any specialized code to deal with plugin packages beyond the basic way that it deals with files in general for mappings.
As long as your mapping file is correct and found, it should handel the remap. If you run solution packager with logging enabled, it should indicate if it failed to find a mapping.
That said,
Excluding compiled assets from a solution project, when that asset is a project reference to the solution project, is something that is being explored actively. However, On Pack, the assets need to be compiled and packaged into the resulting solution zip to support import into the deployment.
WarrenBelz
85
Most Valuable Professional
Michael E. Gernaey
65
Super User 2025 Season 1
mmbr1606
55
Super User 2025 Season 1