-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
In https://github.com/dotnet/sdk/pull/51108/files#r2519926453 I had an assumption that the EvaluateDirectives helper would be callable from the editor to allow us to keep reporting errors on bad project directives.
However, we believe that editor is unable to directly create a ProjectInstance. We also don't want the source package to have a dependency on msbuild. (IIRC, this is part of how the MSBuildHost architecture works, we use a RemoteProjectFile or some such, which makes an RPC call that actually interacts with a ProjectInstance out of proc.)
So, dotnet/sdk#51995 is removing EvaluateDirectives from the source package for the time being.
In order to report errors on #:project directives with bad paths, we will need to revisit here and figure out whether/how to perform the evaluation step.
Frankly I think that variables in project directives is likely to be a rare case so the editor could consider doing a simple path resolution and Exists check in the case there are no variables, and essentially do nothing to help in the case there are variables. This could also be confusing though, and is a compromise over the experience we really want, so we should think through how we would want to properly do this in the editor first.