-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Remove xmlns from props/targets and UTs #7169
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ public void ReadInvalidAttribute() | |
Assert.Throws<InvalidProjectFileException>(() => | ||
{ | ||
string content = @" | ||
<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003' > | ||
<Project> | ||
<Choose X='Y'/> | ||
</Project> | ||
"; | ||
|
@@ -50,7 +50,7 @@ public void ReadInvalidConditionAttribute() | |
Assert.Throws<InvalidProjectFileException>(() => | ||
{ | ||
string content = @" | ||
<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003' > | ||
<Project> | ||
<Choose Condition='true'/> | ||
</Project> | ||
"; | ||
|
@@ -68,7 +68,7 @@ public void ReadInvalidChild() | |
Assert.Throws<InvalidProjectFileException>(() => | ||
{ | ||
string content = @" | ||
<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003' > | ||
<Project> | ||
<Choose> | ||
<X/> | ||
</Choose> | ||
|
@@ -88,7 +88,7 @@ public void ReadInvalidWhen() | |
Assert.Throws<InvalidProjectFileException>(() => | ||
{ | ||
string content = @" | ||
<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003' > | ||
<Project> | ||
<Choose> | ||
<When> | ||
<PropertyGroup><x/></PropertyGroup> | ||
|
@@ -113,7 +113,7 @@ public void ReadInvalidOnlyOtherwise() | |
Assert.Throws<InvalidProjectFileException>(() => | ||
{ | ||
string content = @" | ||
<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003' > | ||
<Project> | ||
<Choose> | ||
<Otherwise/> | ||
</Choose> | ||
|
@@ -133,7 +133,7 @@ public void ReadInvalidTwoOtherwise() | |
Assert.Throws<InvalidProjectFileException>(() => | ||
{ | ||
string content = @" | ||
<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003' > | ||
<Project> | ||
<Choose> | ||
<Otherwise/> | ||
<Otherwise/> | ||
|
@@ -154,7 +154,7 @@ public void ReadInvalidOtherwiseBeforeWhen() | |
Assert.Throws<InvalidProjectFileException>(() => | ||
{ | ||
string content = @" | ||
<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003' > | ||
<Project> | ||
<Choose> | ||
<Otherwise/> | ||
<When Condition='c'/> | ||
|
@@ -178,7 +178,7 @@ public void ReadInvalidEmptyChoose() | |
Assert.Throws<InvalidProjectFileException>(() => | ||
{ | ||
string content = @" | ||
<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003' > | ||
<Project> | ||
<Choose/> | ||
</Project> | ||
"; | ||
|
@@ -197,7 +197,7 @@ public void ReadInvalidEmptyChoose() | |
public void ReadChooseOnlyWhen() | ||
{ | ||
string content = @" | ||
<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003' > | ||
<Project> | ||
<Choose> | ||
<When Condition='c'/> | ||
</Choose> | ||
|
@@ -218,7 +218,7 @@ public void ReadChooseOnlyWhen() | |
public void ReadChooseBothWhenOtherwise() | ||
{ | ||
string content = @" | ||
<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003' > | ||
<Project> | ||
<Choose> | ||
<When Condition='c1'/> | ||
<When Condition='c2'/> | ||
|
@@ -254,7 +254,7 @@ public void ExcessivelyNestedChoose() | |
builder2.Append("</When></Choose>"); | ||
} | ||
|
||
string content = "<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>"; | ||
string content = "<Project>"; | ||
content += builder1.ToString(); | ||
content += builder2.ToString(); | ||
content += @"</Project>"; | ||
|
@@ -270,13 +270,13 @@ public void ExcessivelyNestedChoose() | |
public void SettingWhenConditionDirties() | ||
{ | ||
string content = @" | ||
<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003' > | ||
<Project> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Make sure to verify there is still adequate coverage for cases where There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup, I left it in a bunch of UTs, mostly ones which dealt with evaluation. It probably could be cleaned from even more UTs (many use Comparing repo-wide searches of "xmlns=" (which admittedly covers other namespaces eg in loc xml files): There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This also had me worried but by inspection it looks ok (this concern is why I split out the "remove from unit tests" part of the change). |
||
<Choose> | ||
<When Condition='true'> | ||
<PropertyGroup> | ||
<p>v1</p> | ||
</PropertyGroup> | ||
</When> | ||
</PropertyGroup> | ||
</When> | ||
</Choose> | ||
</Project> | ||
"; | ||
|
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.
You can also remove the ToolsVersion, right?
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.
Yup, although I figured this PR was large enough as it was, so probably will follow up with another PR.