Friday, March 18, 2011

Error while Importing a solution in CRM 2011 - The solution file is invalid. The compressed file must contain the following files at its root: solution.xml, customizations.xml, and [Content_Types].xml

I was trying to add a button to the ribbon but I was not able to test it as I would keep getting the below error while trying to import the solution zip files:

























After spending a huge amount of time checking and rechecking my code, I was finally sure that the issue had to be somewhere else.
Finally, it turned out that when I used to zip the folder using the built in windows compression(zip), it would create a folder inside the zip file and place the solution files inside this folder.

So, as the error above states, CRM is looking for those files in the "Root" but was actually finding a folder in it's place and hence throwing the error. When I selected the solution files and zippped them directly, the import was successful. I know this might be a small thing but it definitely cost me an awful lot of time. :)

12 comments:

  1. Thanks soooo much for it. After wasting a lot of time on this and when i was just about to rip my hair apart I happend to look at your post and in a second it did the magic!

    ReplyDelete
  2. Glad to know it helped you Anonymous :)

    ReplyDelete
  3. thaks alot .. it helped me..

    ReplyDelete
  4. thanks sri. it worked

    ReplyDelete
  5. thank you it saved a lot of time for me

    ReplyDelete
  6. thank you so much. Am breaking my head for a month.

    ReplyDelete
  7. Thanks for sharing !!!
    It saved a lot of time for me.. :)

    ReplyDelete