Geeks With Blogs

The Life and Times of a Dev Yes, we're really that weird

Well, that was certainly annoying.  I'm trying to create a new application manifest (deployment manifest), and if I use the -MinVersion (-mv) option as specified in the Mage documentation, it fails with the error, "The minimum version specified is not valid."  I'm guessing that this goes hand in hand with the bug that I ran into earlier where you can't do anything but a check after install when using mage.  For that defect, I ended up running some code to replace the <expiration maximumAge="0" unit="days" /> tag with <beforeApplicationStartup/>, since mage won't do it correctly.

To get around this problem, you end up needing to run mage twice.  First, to create the deployment manifest, and second to add the -MinVersion property to the app.  Like so (in MSBuild):

<Exec WorkingDirectory="$(DeployTempDir)" Command="mage.exe -New Deployment -ToFile MyApp.application -Version $(BuildLabel) -Name &quot;App&quot; -providerUrl https://www.myurl.com/myapp/myapp.application -AppManifest $(BuildLabel)\MyApp.exe.manifest -Install true"></Exec>
<Exec WorkingDirectory="$(DeployTempDir)" Command="mage.exe -Update MyApp.application -MinVersion $(BuildLabel)"></Exec>

Kinda silly, but it works.

Technorati Tags: ,,
Posted on Wednesday, July 16, 2008 1:34 PM | Back to top


Comments on this post: Mage and MinVersion

# re: Mage and MinVersion
Requesting Gravatar...
Thanks, helped me out! Yours is one of only two posts google finds on this error.
Left by rs387 on Dec 28, 2009 10:56 AM

# re: Mage and MinVersion
Requesting Gravatar...
Helped me.Thanks alot
Left by Venkatesu on Mar 08, 2011 5:44 AM

# re: Mage and MinVersion
Requesting Gravatar...
FYI.. I found that it is the -Install and the -MinVersion that cannot be set simultaneously. Removing either one avoids the error.
Left by Wallace Kelly on Apr 15, 2015 10:00 AM

Your comment:
 (will show your gravatar)


Copyright © Robert May | Powered by: GeeksWithBlogs.net