fsprojects / fsharp-language-server

Other
214 stars 37 forks source link

When running from the commandline I get FSharp.Core.dll not found and some others #67

Closed PhilT closed 4 years ago

PhilT commented 4 years ago

If run dotnet dotnet src\FSharpLanguageServer\bin\Release\netcoreapp2.0\FSharpLanguageServer.dll from cmd I get the following:

Listening on stdin
Couldn't find FSharp.Core.dll in C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.7
Couldn't find System.ComponentModel.Composition.dll in C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.7

Errors still seem to be visible in vim so is this something I should worry about or not?

PhilT commented 4 years ago

This is still happening on .NET Core 3.1 apps but I'm guessing it's not really an issue when being run by the correct process. So I'll close for now.

resolritter commented 3 years ago

I'm guessing it's not really an issue when being run by the correct process

@PhilT what is that supposed to mean? Is there a "correct way" to run the executable which circumvents those warnings?

PhilT commented 3 years ago

I'm guessing it's not really an issue when being run by the correct process

@PhilT what is that supposed to mean? Is there a "correct way" to run the executable which circumvents those warnings?

Speculation. I believe my thinking was that other apps/processes running just ignore the warnings. I was told by one plugin author that it was nothing that affected the running of the server. Still, I don't like warnings of any kind. It wastes resources as this issue demonstrates.

Perhaps we should reopen?

resolritter commented 3 years ago

If it's harmless, then I'm indifferent about reopening it. Your last comment gives enough clarification for this instance.

I don't know if it's proper to do this, but you can make the warnings go away by installing the DLLs in a dummy project and copying them to the missing path.

First of all, create the project.

dotnet new console --language "f#" --name dummy
cd dummy

Make sure the <TargetFramework> in dummy.fsproj is configured to netcoreapp[some version]. After that:

dotnet add . package FSharp.Core
dotnet add . package System.ComponentModel.Composition
dotnet build --configuration Release

This will download and create the DLLs in the project's obj folder. In this instance:

bin/Release/netcoreapp3.1/FSharp.Core.dll
bin/Release/netcoreapp3.1/System.ComponentModel.Composition.dll

You can then copy those DLLs to the missing path.