-
-
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
Help debugging F# project #123
Comments
Interesting, thanks a lot for the detailed step-by-step repro. That was very helpful since I don't know the first thing about F#. The fact that MSBuild figures out this is an F# project looks for |
Okay, after a lot of trial and error and spelunking through the FSharp targets files here's what you have to do:
There were multiple problems - F# does not support design-time builds (at least not with the same properties as C# does) and setting those properties confuses it. Additionally the I'll make it so both these get set out of the box for F# projects. |
|
It's funny, @mholo65 also just reported that F# works in dotnet-depends. I was definitely able to reproduce the problem with the minimum steps in the original post and was able to create a failing test case, so I wonder if the F# failures are recent (maybe with changes to the targets that shipped with 3.x SDK). |
Thankfully the test case is working now, so we hopefully should know if F# support fails again in the future. I'll close this out, but please do follow-up @jonsequitur if you discover you were adding some special sauce - I could bake that in if so. |
Thank you for looking into this! |
@NatElkins No problem - the latest is up on NuGet now so give it a try and let me know if F# projects are working for you. |
@daveaglick F# should support a regular design time build; if it doesn't can you file an issue on the dotnet/fsharp repo? I'd like F# to be able to do what C# can. The F# code @jonsequitur was referring to doesn't use Buildalyzer in that location, but in something entirely different that I'm almost ashamed to admit exists, if you're ultimately just trying to get the list of command line options that are eventually passed to
Then the same command is executed, but this time with the additional
The command line arguments can then be separated into directives beginning with the |
@daveaglick nevermind my comment about it working for me (as it was with an older SDK). I've now verified that dotnet-depends is also broken when using .NET Core SDK 3.0 or 3.1. I'm seeing: Verified that it works as expected with .NET Core SDK 2.1. |
Oops closed by accident. BTW, are reference assemblies a prerequisite of design time builds? If so, F# doesn't support reference assemblies. If not, ignore. |
@brettfo That use of the DesignTime project is really something. Part crazy hack, part utterly brilliant. I think Buildalyzer can get at the full set of command-line args now, but without design-time support it's likely still not as performant as what you're doing. Speaking of which, I tracked down the problems I had with design-time builds via MSBuild to setting
In the binlog it looks like the Those targets exist in All that said, I'd love to get F# design-time working in Buildalyzer so it's equivalent with C#. Just not sure where to continue looking. |
@mholo65 I'm assuming that failure is with the current version of dotnet-depends (without the most recent Buildalyzer)? Whenever you get a chance to update the Buildalyzer version let me know if it continues to have problems. |
Since this is pretty old and there have been ongoing improvements, I'm going to assume this issue is either resolved or no longer relevant. Please comment or open a new issue if that's incorrect and you're still having trouble. |
Hi, I think I've seen in various comments that non-csproj files are not supported. That said, I don't think there's any fundamental reason why F# shouldn't be able to be supported. I'm trying to debug the reason why fsproj files don't work on my machine, I'm hoping someone can point me in the right direction.
Steps to repro:
mkdir repro
cd repro
dotnet new console -lang F#
dotnet package add Buildalyzer
pwd
<-- copy this.Program.fs
. Replace with the following:dotnet run
After doing this, here's what I see:
It seems to be failing to find
/usr/share/dotnet/sdk/3.0.101/fsc.exe
. That's because it doesn't exist. The actual path should be/usr/share/dotnet/sdk/3.0.101/FSharp/fsc.exe
.Do you know what is causing it to get the wrong path? Or how it can be corrected?
Thank you!
The text was updated successfully, but these errors were encountered: