locked
Managed Solution from the Same Publisher is trying to Install RRS feed

  • Question

  • I will be short and to the point.

    1. Exported MANAGED solution A V1.0 from DEVELOPMENT ORG and imported to TEST ORG (Managed Solution A V1.0 does NOT contain the Letter Entity) 
    2. Import was a success

    3. Exported UNMANAGED solution A_Patch1 from DEVELOPMENT ORG and imported to TEST ORG (Unmanaged Solution A_Patch1 contained the Letter Entity)
    4. Import was a success

    5. Added Letter entity to MANAGED Solution A in DEV 
    6. Exported MANAGED solution A V1.1 from DEVELOPMENT ORG and imported to TEST ORG (Managed Solution A V1.1 now contains the Letter Entity)
    7. Import Fails with

      "OptionSet component on the target system, and now a managed solution from the same publisher is trying to install that same OptionSet component as managed.  This will cause an invalid layering of solutions on the target system and is not allowed. "

     

    Both solutions are from the same publisher.

    I tried to remove the unmanaged A_Patch1 solution and then import the managed A V1.1 but it still fails.

    Is this a bug in the solution layering, if not is there a recommended corrective action,?

    Saturday, December 24, 2011 4:11 AM

Answers

  • Greg,
    I still feel this a bug, however I contacted Microsoft support and they agree that this issue is not documented or warned against.
    Other than the standard yellow warning banner indicating you cannot roll back changes there is nothing that says "Hey if you do this you will be stuck"
    I will be submitting a request to Microsoft shortly to either improve the warnings and documentation or change the way this works.
    https://connect.microsoft.com/dynamicssuggestions
     
    I know this does not help much, but trust me I feel your pain.
     
    Below is the response I received from Microsoft.
     
    I have heard back from a resource regarding this issue yesterday afternoon.  The error that we are seeing is by design.  The components in the unmanaged solution layer cannot be adjusted by a managed solution.  We also looked at adjusting the components attributes, but there isn’t a way to change the attributes of unmanaged solution components so that it is in a managed solution layer, so it can be edited or changed by a managed solution. While reaching out to that resource, we discussed a few workarounds, that would work.
    • You could adjust the third solution to only contain the components that the unmanaged solution installed, and then import that as unmanaged, but if you ever wanted to adjust those components, you would have to continue using unmanaged solutions just for those items.  Then the rest of the items that the third solution installs can be installed as managed in a fourth solution.
    • I also found that if I manually deleted the components that the unmanaged solution installed, I was then able to import that solution as managed and then install an update for it with a managed solution.  I understand that this may not be feasible if there is data in fields that would have to be removed. You could export the data prior to deletion and then re-import it when the components are installed as managed

    • Edited by Jason.Halbig Wednesday, February 1, 2012 3:17 PM
    • Marked as answer by Jason.Halbig Wednesday, February 1, 2012 3:18 PM
    Wednesday, February 1, 2012 3:16 PM

All replies

  • Hi for this one

    hi remove A V1.0 managed solution from test server,

    and in your system create new publisher export it and import again


    By Sanz If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    • Edited by san Sanz Saturday, December 24, 2011 5:10 AM
    • Proposed as answer by san Sanz Saturday, December 24, 2011 5:10 AM
    Saturday, December 24, 2011 5:10 AM
  • "Any data stored in custom entities that are part of the solution is lost. Any data stored in custom attributes on system entities is lost."
    If I remove the managed solution ,all of the data associated with the entities included in the managed solution will be lost.

    We definitely do not want to lose any of this data. 

     

     


    • Edited by Jason.Halbig Monday, December 26, 2011 5:10 PM Clarification
    Monday, December 26, 2011 5:04 PM
  • I have read this may be a BUG in the CRM 2011 Solution Model, can anyone confirm this?
    Tuesday, December 27, 2011 7:14 PM
  • When you removed the unmanaged solution A_Patch1, that didn’t remove the entities (the letter entity) and the option sets associated to those entities. They are still in the Default Solution, so if you go to the default solution and remove everything that was installed within the A_Patch1 solution you should be able to install the A V1.1 version.

     


    Regards,
    Damian Sinay
    Tuesday, December 27, 2011 7:21 PM
  • Thank Damian,

    But again if I delete, say the Letter entity from the Default Solution won't that delete all data tables/views from the corresponding organization database?
    We have numerous Letters in the system that we do not want to lose ,won't this delete them.

    If I exported A_Patch1 as an unmanaged solution under different publisher name and then imported, then deleted A_Patch1.
    Shouldn't I then be able to import AV1.1 and overwrite the unamanaged customizations.

    I know it seems hacky but that is my next step to try. 

    Thursday, December 29, 2011 2:51 AM
  • Yes, if you delete say the Letter entity from the Default solution you will be also deleting the table and records. However you can export the records to Excel and then reimport the records again after you deployed the AV1.1 version with this entity. You cannot include the same entity from a managed solution to an org that already has the same entity in unmanaged state.
    Regards,
    Damian Sinay
    Thursday, December 29, 2011 2:57 AM
  • Hi Jason - sorry I can't help your situation but I'm keen to know where you read that this may be a bug. I think I agree but I'm looking for some evidence to help explain the issue to my client.

    Wednesday, February 1, 2012 10:25 AM
  • Greg,
    I still feel this a bug, however I contacted Microsoft support and they agree that this issue is not documented or warned against.
    Other than the standard yellow warning banner indicating you cannot roll back changes there is nothing that says "Hey if you do this you will be stuck"
    I will be submitting a request to Microsoft shortly to either improve the warnings and documentation or change the way this works.
    https://connect.microsoft.com/dynamicssuggestions
     
    I know this does not help much, but trust me I feel your pain.
     
    Below is the response I received from Microsoft.
     
    I have heard back from a resource regarding this issue yesterday afternoon.  The error that we are seeing is by design.  The components in the unmanaged solution layer cannot be adjusted by a managed solution.  We also looked at adjusting the components attributes, but there isn’t a way to change the attributes of unmanaged solution components so that it is in a managed solution layer, so it can be edited or changed by a managed solution. While reaching out to that resource, we discussed a few workarounds, that would work.
    • You could adjust the third solution to only contain the components that the unmanaged solution installed, and then import that as unmanaged, but if you ever wanted to adjust those components, you would have to continue using unmanaged solutions just for those items.  Then the rest of the items that the third solution installs can be installed as managed in a fourth solution.
    • I also found that if I manually deleted the components that the unmanaged solution installed, I was then able to import that solution as managed and then install an update for it with a managed solution.  I understand that this may not be feasible if there is data in fields that would have to be removed. You could export the data prior to deletion and then re-import it when the components are installed as managed

    • Edited by Jason.Halbig Wednesday, February 1, 2012 3:17 PM
    • Marked as answer by Jason.Halbig Wednesday, February 1, 2012 3:18 PM
    Wednesday, February 1, 2012 3:16 PM
  • Thanks for sharing Jason. My exact scenario is subtley different to yours but I feel that the same issues apply.

    • Custom OptionSet exists in unmanaged solution in (client's) production system on (heavily customised) contact entity. Unmanaged since this was upgraded from v4 to 2011
    • New solution developed for client which is almost entirely self-contained, apart from a need to re-use the aforementioned OptionSet
    • Tried creating OptionSet with same name and values in our solution but collision occurs on import to client's system (rather than merging into - or even overwriting - their existing optionset)

    I'm a little surprised that this is "by design" as (with OptionSets at least) the information documented in SDK ("Understand how Managed Solutions are Merged") states (my emphasis below):

    Merge Option Set Options

    In Microsoft Dynamics CRM 2011 each new option set option will be initialized with an integer value assigned that includes an option value prefix. The option value prefix is a set of five digits prepended to the option value. An option value prefix is generated based on the solution publishers customization prefix but may be set to any value. The option value prefix helps differentiate new option set options created in the context of a specific solution publisher and reduces the opportunity for collisions of option values. Using the option value prefix is recommended but not required.

    A managed solution usually updates or adds options for option sets that are already in the organization,. for example, the account Category or Industry option sets. When a managed solution modifies the options available in an option set, all the options defined in the managed solution are available in the organization. When the managed solution is uninstalled, the option set options will be returned to their original state.

    Wednesday, February 1, 2012 3:32 PM