-
Notifications
You must be signed in to change notification settings - Fork 693
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
Use MSBuildProjectExtensionsPath for RestoreOutputPath #2121
Use MSBuildProjectExtensionsPath for RestoreOutputPath #2121
Conversation
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.
looks good, great work!
The test results made no sense, so I kicked them off again. |
@@ -18,6 +18,13 @@ public interface IVsProjectRestoreInfo | |||
/// </summary> | |||
string BaseIntermediatePath { get; } | |||
|
|||
// TODO: Update project-system to add this property, and figure out how to sync the updates |
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.
As we discussed in the meeting earlier, there are 2 options here:
-
Use current field
BaseIntermediatePath
to specifyMSBuildProjectExtensionsPath
value so that won't change anything in interface but change the meaning of this property. -
Although we dont have any dictionary at
IVsProjectRestoreInfo
but we do have a dictionary atIVsProjectRestoreInfo -> IVsTargetFrameworks -> IVsTargetFrameworkInfo -> IVsProjectProperties
which is to provide project properties per TFM. So Project system can addMSBuildProjectExtensionsPath
at this level and duplicate it for each TFM.
Both these options aren't ideal, but if I've to choose one then I'll vote for approach#1 since option# 2 exposes more vulnerability.
…han add a new property to the interface
@jainaashish @nkolev92 I've updated the I think you can take it from here |
Kicked off the tests again. |
Replaces #2056 with less refactoring and simplified commit history.
This is part of a solution to dotnet/msbuild#1603. The
MSBuildProjectExtensionsPath
is where MSBuild will automatically import project .props and .targets files from. This PR changes theRestoreOutputPath
to default toMSBuildProjectExtensionsPath
instead ofBaseIntermediateOutputPath
. By default, both of these properties will default to theobj
folder, but this change will make the behavior more correct if one of the properties is overridden.This PR also sets the
EnableBaseIntermediateOutputPathMismatchWarning
property when appropriate, which enables an MSBuild warning ifMSBuildProjectExtensionsPath
doesn't matchBaseIntermediateOutputPath
(added in dotnet/msbuild#3059).Included in this PR is also a commit that replaces
new string[0]
withArray.Empty<string>()
, which was something I noticed when browsing the code investigating this change.@nkolev92