Closed MustaqueEhiya closed 5 years ago
I tried to package the Extracted folder using solutionpackager tool and it also threw similar error.
Packing C:\Users\MEHIYA\source\Workspaces\PLR\ADO_Src\MMA.Solution\MustaqueSolution\MustaqueSolution to C:\Users\MEHIYA\source\Workspaces\PLR\ADO_Src\MMA.Solution\MustaqueSolution\ADOOutput\MustaqueSolution2.zip
Solution package type did not match requested type. Command line argument: Unmanaged Package type: Managed CrmSvcUtil Runtime = 00:00:00.1025690
Below is the script I tried: .\SolutionPackager.exe /action:Pack /packagetype:Managed /folder:"C:\Users\MEHIYA\source\Workspaces\PLR\ADO_Src\MMA.Solution\MustaqueSolution\MustaqueSolution" /zipfile:"C:\Users\MEHIYA\source\Workspaces\PLR\ADO_Src\MMA.Solution\MustaqueSolution\ADOOutput\MustaqueSolution_Managed.zip" /errorlevel:verbose
Are you trying to convert a unmanaged to managed solution? Because the Solution Package can't do this.
@RonnyVDS - The solution in Dev environment is a unmanaged solution. I exported and extracted the XML files and checked into Source Control.
Hi All,
I was going through the MS docs and it says
" The only way to convert solution files to a different type, for example from unmanaged to managed, is by importing the unmanaged solution .zip file into a Microsoft Dynamics 365 server and then exporting the solution as a managed solution."
In that case, I would like to understand the purpose of the SolutionPackager commandline parameter "/packagetype: {Unmanaged|Managed|Both}" when I use the "/action:Pack".
MS Doc states: "When packing and Both is specified, managed and unmanaged solution .zip files will be produced from one folder. "
Thanks.
I think those options only work when exporting from a environment. Where the source is a Dynamics environment , not when the source are the already created XML files. (or directory in this case)
@MustaqueEhiya I think you need to export both managed and unmanaged from CRM instance and use both to Unpack
Then you have the flexibility to use whichever one you want when you pack and deploy.
@MustaqueEhiya
Can you try putting "Both" inside the <Managed>
node of the unpacked solution.xml file
It will look like this
I had a similar problem when using the solution packager in the command line, and this fixed the errors
@MustaqueEhiya
Can you try putting "Both" inside the
<Managed>
node of the unpacked solution.xml fileIt will look like this
I had a similar problem when using the solution packager in the command line, and this fixed the errors
very helpful
@MustaqueEhiya
Can you try putting "Both" inside the
<Managed>
node of the unpacked solution.xml fileIt will look like this
I had a similar problem when using the solution packager in the command line, and this fixed the errors
This worked! Thank you!
Hi,
I am trying to use the CRM pack solution to package the XML files. Unmanaged option is working fine, but other options - (Managed and Both) throw the below errors.
Please let me know how to fix the below: log_7_50.zip
Packing D:\a\2\s\ADO_Src\MMA.Solution\MustaqueSolution\MustaqueSolution to D:\a\2\s\ADO_Src\MMA.Solution\MustaqueSolution.zip and D:\a\2\s\ADO_Src\MMA.Solution\MustaqueSolution_managed.zip
Solution package type did not match requested type. Command line argument: Unmanaged Package type: Both SolutionPackager: Exception thrown: System.ArgumentException: Solution package type did not match requested type. Command line argument: Unmanaged Package type: Both at Microsoft.Crm.Tools.SolutionPackager.Helper.LoadSolutionInformation(Stream solutionXml, Context context) at Microsoft.Crm.Tools.SolutionPackager.DiskReader.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' CrmSvcUtil Runtime = 00:00:01.2889593 SolutionPackager exit code: 1
[error]Packing Solution failed. Check logs for more information
[section]Finishing: MSCRM Pack Solution - Managed