-
Notifications
You must be signed in to change notification settings - Fork 786
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
Fix UseLocalCompiler.Directory.Build.props to invoke dotnet.exe #17542
Conversation
Make sure dotnet.exe is used when compiling
✅ No release notes required |
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.
Thanks! I was just struggling with this.
The same should be added in FSharp.Compiler.Service.fsproj after line 60, because else the same error still occurs for dotnet build of that project.
(Or in Directory.Build.props?)
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.
That doesn't look correct. What are the exact circumstances it's happening under?
Exact circumstances when I was testing in: This change is needed so that the invocation goes as "dotnet.exe ../fsc.dll" |
That shouldn't be happening. It means that build task confuses the fact that it's running under corehost |
I think it did that because some essential settings get skipped when you DisableAutoSetFscCompilerPath, there is block of props. |
Hm, I'll look at it tomorrow, that's really weird. I have never seen it happening locally |
Interesting. After adding these two lines in FSharp.Compiler.Service.fsprop, I sometimes get the (This is for |
Without your /artifacts contents changing? (i.e. not doing rebuilds in between, either CLI or from VS?) |
I do I get the error for FSharp.Build and FSharp.Compiler.Service (both TFMs), the other projects succeed. |
Possibly Ionide doing a build? I haven't found anything explicit though. |
I can't reproduce it in my machine no matter what I do :| |
Right now it`s working, let me observe if I can find something more specific. |
@Martin521 : Did it get better with the changes proposed here? |
I haven't seen the issue that I mentioned any more, and it was not really related to the file you changed, just similar symptoms. I can create a new project in my environment tomorrow and test it with and without your changes, if that is helpful. |
I have tested this in a new setup (in dev containers) and can confirm both, that the error message shown in the OP appears without the fix, and that the proposed fix works. |
Thanks @Martin521 for testing and verifying, this definitely helps |
Before, the setup was yielding:
This makes sure that compilation happens by: dotnet.exe $pathToLocalFsc.dll