locked
Doing a package with the pack api [RESOLVED]

    Question

  • I am trying to follow this howto, but I am having troubles. Everything looks oks until I try to close it (by appending a manifest with  packageWriter->Close(manifestStream) ). It returns

    "HRESULT_FROM_WIN32(ERROR_INVALID_STATE) : The group or resource is not in the correct state to perform the requested operation."

    The resulting package is an empty one. I don't know what I am doing wrong. One thing I changed (beside the payload I am adding) was the missing variable Sha256AlgorithmUri that I replaced with L"http://www.w3.org/2001/04/xmlenc#sha256". Is that ok? I don't know what other value I could use.

    [Update]: found one error, I was adding files with a mime type equal to L"text\\plain" instead to L"text/plain". Now I can add the files, but closing is still giving me troubles. After the app exits, I can't open the file to see its content (as a zip one).

    [Update 2]: I found the error, I was adding two files with the same name on the same package folder. The hash Uri is correct.

    Thanks




    Thursday, December 22, 2011 6:28 PM

Answers

  • Thanks for the update and the solution George. For the benefit of the forum, there are some Packaging samples on the Desktop sample side. We also cannot mark this thread answered without a response.

     

    If there wasn't any exception or error to make that issue easier to spot, I would suggest filing feedback on this scenario to make it easier to identify.

     

    Thanks!

    -David

     

    Thursday, December 22, 2011 11:01 PM
    Moderator