-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Fix project build for VS2015 #1538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This, along with PlatformToolset, will make the project file unusable for earlier versions of VS (i.e. 2013). I knew the day would come we'd need to take care of dealing with muliple versions of VS (which is why the meat of the configuration is already in seperate .props files and the project is just a 'container' now) but never put much thought into how to do this exactly. Do you have any suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The usual methodology is to keep this up to date with the latest version and the project members that still have an older one need to change this file by hand prior to opening the project and exclude their project files from their commits. It's unfortunate that VS does not handle this scenario better, specially considering that newer versions can typically open an older solution and the changes occur automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it not make more sense to just support the oldest version then, since upgrading can be done automatically and effortless?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, seems I was wrong all along: opening the upgraded project in VS2013 just uses the v120 platformtoolset automatically so that worked out flawlessly after all..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you can just double click the project file and it opens in Visual Studio 2013 just fine? That's news to me. Did it prompt you that the project could not be loaded? Did it prompt you to convert the project to a compatible VS version? Did the project file change to v120 everywhere after opening it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only if VS2015 is not installed, else you have to explicitely open in VS2013, but in any case it works ok on the 2 machines I tried it on. No prompt for downgrading, no changes to the project file. It's news to me as well, in fact I'm sure tons of people out there have no idea, but it's good news.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be the other way around - newer version of IDE should be able to open project files from older version without problems?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not the case, and other IDE's present the same issue (Android Studio comes to mind). Newer version of the IDE tries to convert the project to the latest version, if possible in a backwards-compatible way. Depending on the project type and version diff, converting the project might fail or it may end up being incompatible with older versions of the IDE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is that problem of the individual projects, MicroPython in this case? That's bug in the IDE, it should be reported to its vendor, and resolved on its side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Project templates/settings change, not always in a compatible way. It's not a bug, it's a breaking change. In this case, all settings being exposed in the vcxproj of this project appear to be compatible between versions and the transition is seamless. Not all project types are the same, and the breaking changes are specially common in mobile application project types or unstable/beta types such as pyproj.