F# Script "Error FS0078: Unable to find the file" - f#

When I try to run a F# script with FSI (4.1) I get this error on the Windows command shell:
stdin<0,1>: error FS0078: Unable to find the file 'open System' in any of C:\..\Desktop
I've tried referencing the standard libraries with #I and #r, but have not found a way to make it run.
The script file uses:
open System
open System.Windows.Forms
open System.Drawing
The script runs fine in Visual Studio Code when the code is sent to F# Interactive.
The locations for F# and .NET files:
C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0\
C:\Windows\Microsoft.NET\Framework\v4.0.30319\

Related

What is the location for windbg Preview in windows 10?And how to rename a project name in visual studio 2019?

I got location for windbg in here but opening this exe file it looks different from windbg preview
:- "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\windbg.exe"
I was unable to change the name so I made another project and copy paste the code now I am getting this error :
*** WARNING: Unable to verify checksum for CDAnalysis.exe
WinDbg Preview is a UWP app, so its binaries span in multiple locations.
Its launcher is at %LocalAppData%\Microsoft\WindowsApps\WinDbgX.exe.

No error highlighting for a F# file named test.fsx in VSCode

When I open test.fsx in VSCode, it doesn't show error highlighting. If I change its name to Test.fsx or test1.fsx, it works fine. Does test.fsx have special meaning in F# project?
I created F# project file using dotnet new console --language F# and added test.fsx under root folder.
VSCode: 1.45.1
Ionide: 4.11.1
Both are latest version.
I also have Visual Studio for Mac installed, but it doesn't have such problem.

'Cannot open program database' problem in Windows docker container

I use ninja as the build tool of cmake, ninja build parallelly. When build in the physical machine, it compiles without any problem, but in a Windows docker container, it reports:
fatal error C1041: cannot open program database 'blabla.pdb'; if multiple CL.EXE write to
the same .PDB file, please use /FS
The compiler is MSVC 2015, but the /FS seems a 2012 or 2013 option, after add /FS to the CXX flags:
The C++ compiler
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe"
is not able to compile a simple test program.
It compiles without problem if I just use one core.
I have searched the web for a long time, but no useful information found.

Why MSBUILD gets error from Rad Studio 10.3 IDE but from command line works?

In a Rad Studio Rio C++ project, when I compile, I get:
MSBUILD : error E1028: unable to open output file '.\Win32\Debug\Unit1\obj': 'no such file or directory'
Note that it shows Unit1\obj, not Unit1.obj.
It works fine if I compile from command line using MSBUILD MyProject.cbproj
Also, it works fine if I set on the Run C++ compiler in separate process
Also, I have found that the problem is only when I use the Configuration Manager, assigning to the projectt an .optset file. If I unlink this .optset file, then it compiles from the IDE again.
It seems a bug.

F# Cannot find DLL

I am currently learning F# and working through the samples on tryfsharp.org. I am using the Mono F# on a Mac.The script begins as follows:
#r "MathNet.Numerics.dll"
open MathNet.Numerics
open System.Numerics
When starting the script I get the following error message:
/Users/benjamin/Desktop/Kalman/kalman.fsx(1,1): error FS0078: Unable to find the file '
MathNet.Numerics.dll' in any of
/Library/Frameworks/Mono.framework/Versions/3.0.12/lib/mono/4.5
/Users/benjamin/Desktop/Kalman
/Library/Frameworks/Mono.framework/Versions/3.0.12/lib/m
I do not know, where to find that DLL or how to install it.
You should just be able to use nuget to get that library.
http://nuget.org/packages/MathNet.Numerics
See here to install nuget:
http://docs.nuget.org/docs/start-here/nuget-faq

Resources