Bug 460 - Invalid SDK version
Summary: Invalid SDK version
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 2.8 Alpha 2
Hardware: PC Mac OS
: --- major
Target Milestone: 2.8
Assignee: Jeffrey Stedfast
URL:
: 459 ()
Depends on:
Blocks:
 
Reported: 2011-08-25 19:19 UTC by Nat Friedman
Modified: 2011-09-02 13:44 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Simulator preference validation (4.96 KB, patch)
2011-09-01 14:40 UTC, Mikayla Hutchinson [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Nat Friedman 2011-08-25 19:19:43 UTC
Whenever I run any of Bryan's samples I get this horrible behavior:

http://screencast.com/t/ZqgZnvi0k8O

Why are these settings scattered all over MonoDevelop? It's like an easter egg hunt.
Comment 1 Mikayla Hutchinson [MSFT] 2011-08-25 19:48:28 UTC
You ire is misdirected, it's a bug in MD and not a problem with any of your settings.

There are good reasons for these settings being where they are:

* SDK Version is the version of Apple's SDK you build with. It's in the project's IPhone Build settings. Unless you have a good reason to change it, you should leave it as default, and MD will use the newest available. If you have it set to an older version that isn't on the system, MD will use a newer version and give you a build warning.

* Deployment Target is part of the application manifest, and specifies the minimum version of the OS your app is allowed to run on. This can be any version equal to or older than your SDK version, but entirely depends on your use of the API, so it's up to you to set it. If you leave it blank it will use the SDK version, which is the right thing to do.

* Target simulator version is the version of the simulator you want to run on when you hit "Run" or "Debug". This is a user setting, not a project setting, and something you might want to change frequently as you develop. That's why it's in the Project menu. Again, the default is what most users will want, and the list is filtered to the available OS images that are valid for your project.

What went wrong here is that you have a project with an old userprefs file, storing the project-specific user preferences of the last person to open the solution. That user had explicitly set the simulator target to version 4.2, and MD didn't validate that value when loading it from the preferences.
Comment 2 Miguel de Icaza [MSFT] 2011-08-29 18:05:05 UTC
Jeff,

We should make it so MonoDevelop warns the user on startup if a project has specified an invalid SDK.   Currently we let mtouch do the reporting, but we should do this check before we invoke MTouch for the simulator run, and offer a dialog to reset the value to Default.
Comment 3 Miguel de Icaza [MSFT] 2011-08-29 18:15:28 UTC
*** Bug 459 has been marked as a duplicate of this bug. ***
Comment 4 Mikayla Hutchinson [MSFT] 2011-08-29 18:54:35 UTC
No need to warn the user, it should just wipe the user preference if it's not valid. Ater all, it's just a convenience that MD remembers the value in the menu.

I'm a bit confused that this is broken, because IPhoneExecutionHandler.CreateMtouchSimStartInfo does validate the value.
Comment 5 Jeffrey Stedfast 2011-09-01 13:27:52 UTC
Michael: *ping* you were going to attach a patch-in-progress?
Comment 7 Jeffrey Stedfast 2011-09-01 17:58:43 UTC
okay, I've fixed this in git master - very simple fix for a think-o. The logic for falling back to a proper Simulator SDK version was already there, it just wasn't using the fallback SDK version variable ;-)
Comment 8 Jeffrey Stedfast 2011-09-02 13:44:26 UTC
ok, worked with michael to work out the kinks in his patch and committed that as well.