none
Why do I get 'ResolveManifestFiles task failed' error when building a WPF app that references WinRT API?

    Question

  • I am working on a WPF app that I want to create for Windows 8. I followed steps mentioned in Hansleman's blog to make some manual modifications using WinRT functions in a WPF app. Everything worked well, until I tried to publish the app. When I clicked on publishing the app I got error "The 'ResolveManifestFiles' task failed unexpectedly. System.ArgumentException: Value does not fall within the expected range."

    Afterwards, it will produce the same error when attempting a simple solution build.

    Even if you create a simple WPF project and add the references mentioned in blog to access WinRT functions and publish, this issue can be reproduced.

    I think it would be common scenario to call WinRT functions from WPF and someone should have done it. Is anyone aware what should be done to fix this issue?

    Wednesday, March 13, 2013 2:23 PM

Answers

  • It seems that there is an issue with ClickOnce Deploy when WPF app is using WinRT APIs. I tried deploying using "InstallShield Limited Edition Project" and it worked without any issue. Event if you create a blank WPF app and access WinRT API, you should be able to duplicate this issue.
    • Marked as answer by Manoj Attal Monday, March 25, 2013 4:34 AM
    Monday, March 25, 2013 4:34 AM

All replies

  • Hi Manoj Attal,

    I will move your thread to more approrate forum to get better support.

    Best regards,


    Sheldon _Xiao
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, March 14, 2013 5:28 AM
  • Hi Manoj,

    I will try to consult other senior engineers about this issue.

    It may take some time to get the response.

    Thanks for your patience.

    Best regards,


    Chester Hong
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, March 15, 2013 4:29 AM
    Moderator
  • This error message “The 'ResolveManifestFiles' task failed unexpectedly. System.ArgumentException: Value does not fall within the expected range” is generic and could be due to any possible reason. For further diagnostic please share the log files.

    http://msdn.microsoft.com/en-us/library/ms404265.aspx

    Friday, March 15, 2013 3:16 PM
  • How are you deploying your app? Are you using ClickOnce (the publish page in the project properties) or a setup & deployment package?

    "Value does not fall within the expected range" is a common error when using ClickOnce. It means you have a mixed reference, multiple references to different versions fo the same assembly, or a circular reference.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev

    Sunday, March 24, 2013 8:27 PM
    Moderator
  • It seems that there is an issue with ClickOnce Deploy when WPF app is using WinRT APIs. I tried deploying using "InstallShield Limited Edition Project" and it worked without any issue. Event if you create a blank WPF app and access WinRT API, you should be able to duplicate this issue.
    • Marked as answer by Manoj Attal Monday, March 25, 2013 4:34 AM
    Monday, March 25, 2013 4:34 AM
  • I will ask the ClickOnce team at Microsoft about this and answer back if/when I get an answer.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev

    Monday, March 25, 2013 5:49 PM
    Moderator
  • I am having the same problems and came across this article while researching a workaround.  It is surprising more people aren’t talking about this.

    Here are the steps to reproduce the problem; Using Visual Studio Express 2012 (x64) create a new VB Windows Forms Application.  Unload the project and edit the [ProjName].vbproj in the solution explorer.  Add <TargetPlatformVersion>8.0</TargetPlatformVersion> to the <PropertyGroup>.  Save and reload the project.  In Add Resource/Reference Manager add the Windows.minmd found under Windows/Core.  This WinRT/Desktop solution will run as expected.  Now try to Publish this solution.  It will FAIL with the following ERROR; “The ResolveManifestFiles task failed unexpectedly, Value does not fall within the expected range.” 

    Attempting to build or run the solution again now will fail with the same Error.  The only way to build the project now is to remove the “Enable ClickOnce security settings” option under the project properties Security settings.  Occasionally using this trick, the solution will build but not run.  When that happens jiggle around with Debug/Release Solution Configurations and the Any CPU/x64 Solution Platforms then rebuild and try the run again.  This fussing around will get you through development however any attempt to publish with restore the ClickOnce security setting and create the previous Error.

    The first question here is how do you publish a WinRT app for the desktop with VS2012 Express.  Then secondly, if that is not possible can we publish this Express solution with a 3rd party deployment tool like InstallShield Limited Edition or the WIX Toolset.  Neither however seems functional in a VS Express environment.  Then thirdly, are there ways to access hardware sensor devices from a desktop solution without resorting to the WinRT API.

    Any ideas or new research directions would be greatly appreciated.


    • Edited by Kbay Guy Thursday, April 04, 2013 6:51 PM
    • Proposed as answer by Kbay Guy Thursday, April 04, 2013 6:51 PM
    • Unproposed as answer by Kbay Guy Thursday, April 04, 2013 6:51 PM
    Wednesday, April 03, 2013 9:05 PM
  • I was able to solve this problem in my situation by avoiding the WinRT API to access the hardware sensors.  

    I re-coded my project using the Windows 7 Sensor and Location .NET Interop Sample Library found at http://archive.msdn.microsoft.com/SensorsAndLocation/Release/ProjectReleases.aspx..  This library does a good job at accessing the sensors on a Surface Pro and (and with additional drivers) a handheld GPS hanging off the USB port.  The solution publishes perfectly now.  Hope this helps others.

    • Proposed as answer by Kbay Guy Thursday, April 04, 2013 6:56 PM
    • Unproposed as answer by Kbay Guy Thursday, April 04, 2013 6:57 PM
    Thursday, April 04, 2013 6:54 PM
  • Has anybody found any solution to use the WinRT API in a WPF app published with ClickOnce? I am struggling with the same problem.
    Tuesday, April 01, 2014 1:58 PM
  • Same problem (ClickOnce publish and WinRT in a WPF desktop application), waiting for a solution :)
    Wednesday, April 02, 2014 3:06 PM
  • I have opened a bug entry at Microsoft Connect: ClickOnce: ResolveManifestFiles task failed when using Windows Runtime
     
    Please consider to vote for this bug entry if you have the same issue.
    • Edited by jbe2277 Thursday, May 15, 2014 7:58 PM
    Thursday, May 15, 2014 7:57 PM
  • They have fixed this bug with VS2013 Update 3.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev

    Wednesday, September 03, 2014 2:01 AM
    Moderator
  • Issue still exists even after update with vs 2013 update 4
    Tuesday, March 24, 2015 7:28 AM