Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to export solution as managed #208

Merged
merged 1 commit into from
Mar 16, 2018
Merged

Option to export solution as managed #208

merged 1 commit into from
Mar 16, 2018

Conversation

davidjbclark
Copy link
Contributor

This allows me to use the unpack command to export and unpack a solution as managed, and then run import to pack and import the solution as managed.

This allows me to use the `unpack` command to export and unpack a solution as managed, and then run `import` to pack and import the solution as managed.
@davidjbclark
Copy link
Contributor Author

davidjbclark commented Feb 28, 2018

To rattle on a bit... without this change, when I use the following spkl.json and try to unpack

"solutions": [
    {
      "profile": "default, debug",
      "packagetype": "managed",
      "solution_uniquename": "solutionname",
      "solutionpath": "solutions/solutionname_{0}_{1}_{2}_{3}_managed.zip",
      "packagepath": "crmpackage",
      "increment_on_import": false
    }
  ]

I receive the following error:

SolutionPackager: Exception thrown: System.ArgumentException: Solution package type did not match requested type.
Command line argument: Unmanaged
Package type: Managed
   at Microsoft.Crm.Tools.SolutionPackager.Helper.LoadSolutionInformation(Stream solutionXml, Context context)
   at Microsoft.Crm.Tools.SolutionPackager.ZipReader.Load()
   at Microsoft.Crm.Tools.SolutionPackager.SolutionPackager.Run(IPackageReader reader, IPackageWriter writer)
   at Microsoft.Crm.Tools.SolutionPackager.SolutionPackager.Run()
   at Microsoft.Crm.Tools.SolutionPackager.Program.Main(String[] args), returning error code '1'

However with the change, I'm able to export from DEV as managed, see the unpacked files in \crmpackage and import to UAT also as managed.

@scottdurow
Copy link
Owner

Nice one- will get this in the next release.

@scottdurow scottdurow merged commit 4b1aa1c into scottdurow:spkl_dev Mar 16, 2018
@scottdurow
Copy link
Owner

janis-veinbergs pushed a commit to janis-veinbergs/SparkleXrm that referenced this pull request Feb 18, 2022
This allows me to use the `unpack` command to export and unpack a solution as managed, and then run `import` to pack and import the solution as managed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants