-
Notifications
You must be signed in to change notification settings - Fork 1.1k
-
Notifications
You must be signed in to change notification settings - Fork 1.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
The MSBUILD_EXE_PATH environment variable is set for CLI Tools #9052
Comments
This is by design. We need to fix this in your own tool. When you invoke your FDD or SCD app, the CLI is not in play. The runtime is really the only thing involved and you may or may not have a version of MSBuild available. If your application depends on MSBuild, it is your apps responsibility to find it and configure it. Also think that not all apps will require MSBuild. I would argue that only a minority of them will. Hope this helps. |
Ok thanks will add the required fix. Is there a reasoning for setting this variable in this particular situation? |
Ok it seems the reason is dotnet/msbuild#1097. |
I noticed a small difference when running dotnet-tools via
dotnet <toolname>
(referenced viaDotNetCliToolReference
).When you run your tool as SCD or FDD the environment variable
MSBUILD_EXE_PATH
is not set while fordotnet <tool>
it is set to something ('MSBUILD_EXE_PATH' -> 'C:\Program Files\dotnet\sdk\2.1.4\MSBuild.dll'
on windows for example).If you use a dotnet-cli tool to call an external
msbuild
process this can lead to some strange errors (see fsprojects/FAKE#1776 for the issues and the analysis).So my question now is: Is this difference by design or by mistake? Should we fix it here or add some detection into the dotnet-cli tool?
dotnet --info
output:and
The text was updated successfully, but these errors were encountered: