Skip to content
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

Check schema when performing a sln build. #2593

Merged
merged 2 commits into from
Jan 4, 2018

Conversation

AndyGerlicher
Copy link
Contributor

Note this doesn't fix the .dwproj case. I need to figure out something slightly different for that, but I wanted to send this out because I need to move on for now.

  • Check that the schema matches either empty or the MSBuild default schema
    when building a solution file.

  • Special case .rptproj files. This file format looks like a standard
    MSBuild file but specifies ToolsVersion=2.0 and a default XML schema.
    Since the XML parser treats that schema as equivalent to empty and empty
    is now allowed, there's no good way to determine if it's an MSBuild file
    until we try to parse. This results in an error in MSBuild 15 rather
    than a warning in MSBuild 14 for solutions with a .rptproj file. To
    solve this, the sln build will now allow projects where the schema is
    the default MSBuild schema or empty and ToolsVersion is not 2.0.

Partial fix for #2064

@jeffkl
Copy link
Contributor

jeffkl commented Oct 17, 2017

@AndyGerlicher should this fix still go in now that this type of project is supported?

#2064 (comment)

Copy link
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's still worth putting this in for the folks that haven't yet updated to the new .rptproj that's natively MSBuild.

* Check that the schema matches either empty or the MSBuild default schema
when building a solution file.

* Special case .rptproj files. This file format looks like a standard
MSBuild file but specifies ToolsVersion=2.0 and a default XML schema.
Since the XML parser treats that schema as equivalent to empty and empty
is now allowed, there's no good way to determine if it's an MSBuild file
until we try to parse. This results in an error in MSBuild 15 rather
than a warning in MSBuild 14 for solutions with a .rptproj file. To
solve this, the sln build will now allow projects where the schema is
the default MSBuild schema or empty and ToolsVersion is not 2.0.

Partial fix for dotnet#2064
Copy link
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the extreme special casing is better than nothing 👍

@AndyGerlicher AndyGerlicher merged commit d026eba into dotnet:master Jan 4, 2018
@AndyGerlicher AndyGerlicher deleted the nonmsbuildnamespace branch June 26, 2018 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants