-
Notifications
You must be signed in to change notification settings - Fork 325
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
Allow DotNetHostPath to contain env vars #3858
Conversation
This is useful for controlling the paths to the dotnet host path when you're running `dotnet test src/tests/TestProjectA.csproj` to avoid duplicating the runsettings
@@ -43,6 +44,12 @@ public static void FixRelativePathsInRunSettings(XmlDocument xmlDocument, string | |||
{ | |||
FixNodeFilePath(resultsDirectoryNode, root); | |||
} | |||
|
|||
var dotnetHostPathNode = xmlDocument.SelectSingleNode(DotnetHostPathXPath); |
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.
Tests are failing because SelectSingleNode is likely case sensitive?
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.
No test is failing on CI. Is there any change you would have forgot to push?
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.
Check previous CI runs, the problem was with the casing. If I used <RunConfiguration><DotnetHostPath>
instead of DotNetHostPath
it would break.
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.
Thanks! We are planning on improving the way we read/write values in runsettings so I guess this could be handled here.
Thanks for the PR. Please add a test that uses the new feature, so we don't lose it later. |
Yes, sorry, I completely forgot about the PR :D |
No worries and thanks for the remaining work. |
I've modified an existing test to handle this scenario. |
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.
LGTM! @nohwnd For a second review.
Probably an edge case, but would you expect environment variables that are defined in the runsettings (or from commandline via |
Didn't even know that's possible. I just followed the logic that applied to The way I wanted to integrate it is via <!-- this is imported via some shared props -->
<DotNetHostPath>build/bin/App</DotNetHostPath>
Currently, with the relative path, if you use the solution as an argument to |
Let's leave that suggestion for later then. Thanks for the PR, merged. |
This is useful for controlling the paths to the dotnet host path when you're running
dotnet test src/tests/TestProjectA.csproj
to avoid duplicating the runsettings.