I've had F# Powerpack for a while now. It ran perfectly. But a few days before, I don't know what I did, whenever I compile my project and run it, I get an error
Method not found: 'System.Object Microsoft.FSharp.Text.Parsing.Tables`1.Interpret(Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Text.Lexing.LexBuffer`1<Char>,!0>, Microsoft.FSharp.Text.Lexing.LexBuffer`1<Char>, Int32)'.
I tried on my laptop too. Then I thought, that it might be an error in my code. So I started a new project, F# Parsed Language Starter Kit (the starter kit you find online), and it fails with the same error. I tried reinstalling F# Powerpack but the error continues.
You've probably installed VS2010 SP1.
http://fsharpnews.blogspot.com/2011/03/dont-install-vs2010-sp1.html
Please send details of your install configuration and updates to fsbugs AT microsoft.com.
Also, please repair Visual Studio, and/or look at the instructions on this page and send us the contents of your pub.config file.
A workaround to get you going again is to recompile the F# Power Pack for .NET 4.0 (it is a .NET 2.0 binary, and this related to the issue you're seeing)
I've got the same error when trying to build WikiBooks Lexing/Parsing example in Visual Studio 2012. I resolved the problem by switching target framework from 4.0 to 4.5 in project settings.
Related
I installed RProvider 1.1.22 on Visual Studio and it worked with dotnetcore 3.1 and R 3.4.4. I tried to do the same thing using Visual Studio Code, but after installing RProvider I get this error "the type provider 'RProvider.RProvider' reported an error: The type provider constructor has thrown an exception: ReflectionOnly loading is not supported on this platform.F# Compiler(3053)"
Does anyone know what causes this error and its fix? If not, I would appreciate explaining the meaning of "Reflection Only loading". I tried searching it on the web but with no luck.
Update: RProvider worked with me on visual studio even with .Net 5. However, as #CaringDev mentioned, there seems to be a problem with the new dotnet build. It will only build through MSBuild.exe.
Assembly.ReflectionOnlyLoad is not supported on NET 5.0. If you want to use RProvider in VS Code you will have to target netcore3.1.
It seems RProvider does not work with new SDK-style projects. The message containing ReflectionOnly loading is mentioned in a PR
Given that the RProvider project is not actively maintained, I fear you are on your own.
I just recently swapped my MS PC for an Mac, I'm trying to continue working on an MVC project, but I'm getting an error (Error CS1902: Invalid option 'portable' for /debug; must be full or pdbonly (CS1902)).
Are there any good documents that explain how to make it work? I have seen people porting MVC to .NET Core, but I can't get the analyser to work on my Mac (not sure it's supported yet).
I did two things.
I update the Microsoft.Net.Compliers via nuget.
https://www.nuget.org/packages/Microsoft.Net.Compilers/
Change one value in the properties of project.
https://johnharold.wordpress.com/2017/08/16/csc-error-cs1902-invalid-option-portable-for-debug-must-be-full-or-pdbonly-cs1902/
I wish you can solve the problem
I had this same problem when trying to use Visual Studio for Mac to build a solution that works fine in Windows. Turns out the /debug:portable flag was being passed to the build command, even though the 'Debug Information' was correctly set to 'Full' in my project settings. Search the build output for 'portable' and you will indeed find the flag there regardless of your settings.
The fix is to upgrade the Microsoft.Net.Compilers nuget package. In my case, it upgraded from 1.0 to 2.7, and then the project built successfully.
Right click on the project in the solution explorer and go to
Options, Build, Compiler and change Debug information to Full
Using the latest VS2013, if I create a clean console application and add a nuget reference to BCL.Async, all colouration in VS dies. You then get: -
"Internal language services have encountered severe errors. Syntax coloring or other features may stop working. If you experience such issues, they could be fixed as follows: (1) Clean current solution (2) Restart Visual Studio (.."
Needless to say neither works.
The bug is repro-ed when the project targets .NET 4.0 but not when it targets .NET 4.5.
To be clear, the error message originates from Visual F# Power Tools (see https://github.com/fsprojects/VisualFSharpPowerTools/blob/bc76dc272cb941fdbc04e2a0d203a685c5d3bc84/src/FSharpVSPowerTools.Logic/Resource.fs#L55). What happened is that FSharp.Compiler.Service chokes on newly-added assemblies and throws exceptions to upper layers.
When I installed Microsoft.BCL.Async from NuGet package console, there are some installation errors. So I had to manually add references to System.Data, System.ServiceModel and System.ServiceModel.Discovery so that the project can be compiled. When the project is compilable, colorization goes back in normal.
That said, the error message could be improved to avoid being so horrifying though.
I've created a simple xamarin studio f# project and and f# unit project. When I build I get
unknown-file(1,1): Error FS2020: The assembly
'Studio.app/Contents/MacOS/lib/monodevelop/AddIns/NUnit/nunit.framework.dll'
is listed on the command line.
Assemblies should be referenced using a command line flag such as
'-r'. (FS2020) (FRXUI.Spec)
I have made no source code changes after generating the template projects.
The problem is the space in the path to the file, the reference should read
/Applications/Xamarin Studio.app/Contents/MacOS/lib/monodevelop/AddIns/NUnit/nunit.framework.dll
There is currently a known issue here
You can also work around it by using nuget, I almost always use fsunit with NUnit for unit tests in F#. If you don't already have it, you can also get monodevelop-nuget-addin which makes installation of these packages pretty easy.
I got this too. I worked around it by replacing the reference to nunit.framework in my test project with a version built from source.
I want to build this project on windows from source code.
http://sourceforge.net/projects/portableapps/
I have downloaded the source code. But I have no idea how to build it.
EDIT---------
Actually I downloaded the source codes. But, I don't know using which software I have to open/build the source.
For example, for .NET projects, I would use Visual Studio. I need to know which IDE is required for this project
If you mean the launcher, then the source can be found here. I was able to build 2.0 beta 5 from source. I got an error running it, but didn't investigate further.
I have to say, the source code for this project is pretty well hidden. A comment in this blog post suggests that the latest version requires Delphi XE. If you are using an earlier version, this could be the problem. Otherwise, you'll need to be more specific about what's going wrong.