-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
Suggestion: Allow solution (project) global properties to be controlled via AnalyzerManager #52
Comments
This is a great idea for the general case. I wonder if in this specific case we should be setting |
I thought about that, but this is a very special edge case (loading a Framework project in Core) - I feel that setting any property to reference the Visual Studio directory for a Core run is likely going to trip someone else up at a later stage. Hence, the more general request. |
Gotcha, makes sense. I'll add the ability to specify additional environment variables and MSBuild properties in the next release (not sure when that'll be though). |
@IanKemp Note that I still think it may be worthwhile to have this at the |
I have a situation in which I'm loading a Web Application project using .NET Core. The following lines in that project type are problematic:
Since
VSToolsPath
is undefined andMSBuildExtensionsPath32
is set toC:\Program Files\dotnet\sdk\<version>
, MSBuild ends up trying to loadC:\Program Files\dotnet\sdk\<version>\Microsoft\VisualStudio\v$(VisualStudioVersion)\WebApplications\Microsoft.WebApplication.targets
, which obviously doesn't exist (that file resides in the Visual Studio install directory). This causesAnalyzerManager.GetWorkspace()
to blow up.I've (very nastily) worked around this by calling
Environment.SetEnvironmentVariable("VSToolsPath", <path_to_necessary_directory>)
, but the issue would be totally avoided if I could somehow pass these values toAnalyzerManager
when constructing it or callingGetWorkspace()
. Unfortunately, Buildalyzer currently doesn't expose the global/environment variables it sets to allow for mutation, so that's not an option - but I propose it should be! :)The text was updated successfully, but these errors were encountered: