-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Test projects automatically inherit app.config #8534
Conversation
Changed it so that all projects inherit a "default" app.config if one isn't explictly referenced.
Note, I'll follow up deleting app.config's that match the default. The aim of this PR is to prevent new test projects from running into the EventListener bug - we'll disable appdomain isolation by default. |
<Target Name="AddDefaultTestAppConfig"> | ||
<PropertyGroup> | ||
<_AlreadyHasAppConfig Condition="'%(None.Filename)%(None.Extension)' == 'app.config'">true</_AlreadyHasAppConfig> | ||
</PropertyGroup> |
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.
What do you think of this little MSbuild craziness? Nice isn't 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.
What is that? I dont' understand the none reference.
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.
"little MSBuild craziness"? This is 100% normal. :-)
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.
None is the item, ie `. This is basically a foreach on all of the None items, with an if check to see if its name is app.config.
@dotnet-bot retest prtest/win/dbg/unit32 please |
@dotnet-bot retest prtest/win/dbg/unit64 please |
tag @jasonmalinowski |
<!-- Add a default test app.config, if the project doesn't already have one--> | ||
<Target Name="AddDefaultTestAppConfig"> | ||
<PropertyGroup> | ||
<_AlreadyHasAppConfig Condition="'%(None.Filename)%(None.Extension)' == 'app.config'">true</_AlreadyHasAppConfig> |
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 existing MSBuild targets also assume the item type is None?
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.
None is what it looks at first, than content. I excluded content at the moment, but I'll add in a followup.
👍 |
Test projects automatically inherit app.config
We've turned off AppDomain isolation in dotnet#8672 and dotnet#8534.
Changed it so that all projects inherit a "default"
app.config if one isn't explictly referenced.