powerplatform-vscode
powerplatform-vscode copied to clipboard
`pac solution add-reference` does not work with Dependent Assembly plugin project
Calling pac solution pack
(version: 1.19.4+gfbe2fd6) with mapping file does not map pluginpackages. To reproduce:
-
pack plugin init
a new plugin and build it - open plugin registration tool
pac tool prt
and choose "Register New Package" to upload the nupkg created at step 1 - Ensure the Plugin Package has been added to your solution, export and unpack the solution using
pac solution export
andpac solution unpack
- pack the solution using
pac solution pack -m mapping.xml -etcetc
where the mapping.xml file contains the an entry similar tot he following:
<FileToFile
map="prefix_XXXXXXXX.nupkg"
to="..\..\PATH_TO_PLUGIN_PROJECT\bin\Release\XXXXXXXX.1.0.0.nupkg"
/>
or
<FileToFile
map="pluginpackages\prefix_XXXXXXXX\package\prefix_XXXXXXXX.nupkg"
to="..\..\PATH_TO_PLUGIN_PROJECT\bin\Release\XXXXXXXX.1.0.0.nupkg"
/>
On further investigation, this obviously not the way to add a dependent assembly package to a solution. The correct way is to have a cdsproject and use pac solution add-reference.
When using pac solution add-reference to a plugin project, it appears this only works for plugin assembly. How do you add-reference and tell it to use the nupkg?
Did you find a solution? I did not find a documentation on how to build and reference the packages correctly. I think i will use assemblies instead of nupkg.