-
Notifications
You must be signed in to change notification settings - Fork 152
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
first Build.cmd failed on windows #295
Comments
OK. I can confirm. This seems to be happen for me (and a few others based on some Slack comments). It looks like the code for detecting the presence of F# is reporting false negatives in some case. |
@pblasucci I'll fix this now (was about to make the changes to remove SourceLink) |
@susloparovdenis @pblasucci I can't repro this. Which prompt are you running from - a VS2017 developer prompt or... Could you try again now #296 has been merged? thanks |
@dsyme just tried again... same results. I'm using a bog standard instance of |
OK. I found a clue. It's looking in: Notice the |
Yes, VisualStudioVersion is not set, I have no idea why. I thought it was always set. |
Can you try |
@pblasucci Note that using a VS2017 developer command prompt will work. But we should make it work from cmd.exe as well |
Changing the tools version did not alter the behavior. And, just to confirm, the VS2017 developer command prompt does work. This is due to the dev prompt is putting the Visual Studio version into an environment variable (which is absent in the vanilla prompt). Also, as an aside, even though the dev prompt works correctly, it emits a (spurious) warning about F# Tools not being installed... but one issue at a time. :-) |
Do you know which MSBUILD is being run? When I use
it works but when I use the very old
it doesn't. I assume FAKE is in charge of choosing the right MSBuild, but I thought that FAKE 4.61.3 had an appropriate fix to always find the right version in all circumstances |
Seems it's using
|
Does it work when you invoke that MSBUILD.EXE directly? BTW here's a relevant FAKE issue: fsprojects/FAKE#1442. And here's the list of search paths it uses to find MSBuild.exe: https://github.com/fsharp/FAKE/blob/master/src/app/FakeLib/MSBuildHelper.fs#L25 |
No luck. Invoking |
How about if you add
to CheckFSharpInstallation.fsproj at the top of the file |
OK, adding the Microsoft.Common.Props entry fixes this for me (I can repro this now. I was not focusing on CheckFSharpInstallation.fsproj - I was building the generated project (which has the Microsoft.Common.props entry)) |
Ding! Ding! Ding! We have a winner! Adding that sorted it. However, I still get the following (spurious) warning:
However, everything does build and run correctly.. |
Print the exception being caught here:
|
Make sure you're starting from clean each time, i.e.
|
I'd been starting clean each time. But printing the caught error seems to have fixed everything. No idea why/how, though O_o Anyway, at least we have the fixes... now someone just needs to prepare PR. |
Done: #297 |
@pblasucci Could you verify? There is no printing of the caught error in that PR (did you actually get an error printed?) |
Yup. Everything looks peachy now! 👍 There's no error being displayed now. |
I have windows10 and vs2017 with all the updates.
CheckFSharpInstallation.fsproj(19,5): error : File Microsoft.FSharp.Targets not found. Is F# correctly installed on this system?
I have Microsoft.FSharp.Targets in following locations. I am confused

full output:
The text was updated successfully, but these errors were encountered: