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.
Related
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 am working through setting up our first build definition through TFS 2013. I have worked through all of the errors (mostly missing reference files) except one:
Type 'iDB2Command' is not defined.
The type is part of IBM.Data.DB2.iSeries.dll, which I have placed on the build server in the appropriate location. I am really at a loss as to what to do in this situation.
Obviously building through Visual Studio works just fine. The file is not registerable. The iSeries client/SDK installs are not necessary (I do not have them on my machine, and I can build).
My best guess is that it wants the .NET 2.0 SDK (TFS is running on Windows Server 2013 and I already had to install several versions of the Windows and .NET SDKs).
How do I get my build to see this file and complete?
Ultimately this appears to have been a permissions issue. By following advice similar to the answer to this question (which I had to do for the Excel reference), I needed to put the IBM DLL into a Libs folder within the Team Project.
Once I did this, and updated the references in the solution, the build worked just fine.
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.
Using the latest stable of CC.NET (new to it) and VS 2010.
I have defined project files for simple C# projects (4 in total) and one MVC Project.
The C# projects all compile correctly; however, the MVC3 project refuses to build.
I receive the following error in CC.NET:
error MSB4019: The imported project
"C:\Program
Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets"
was not found. Confirm that the path
in the declaration is
correct, and that the file exists on
disk.
After searching around and finding This link
and This other link (both referring to older versions of Visual Studio), it seemed that the general solution was to copy these files from that directory to the solution directory, add them to the solution with visual studio, and then change this line in the .csproj file:
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
To this:
<Import Project="$(SolutionDir)\Microsoft.WebApplication.targets" />
However, this technique that worked for other VS Versions produces a different result in VS 2010: I receive the .NET Project upgrade wizard, as if upgrading the project from an old version of .NET. This strangeness is compounded by the fact that even if I do an undo and re-save the file exactly as it was, I receive the same message. It's as if the project has been marked dirty or something else has changed somehow.
Anyone have any ideas? This seems like it should be easier, but I can't seem to find another resource on it anywhere. Hoping StackOverflow will come through per usual. :)
Thanks in advance for any help!
The .targets file for v10.0 also has an assembly in the install folder - Microsoft.WebApplication.Build.Tasks.dll. Did you copy that file over as well? That will likely be necessary for the .targets file to work correctly, though that may not be the cause of your problem.
It sounds like CC.Net isn't getting a proper reference to the msbuild executables.
Trying installing both of these on your build server (that's who I was able to get past that exact error).
Links :
Windows SDK .Net 4
VS2010 Integrated Shell
Have taken over the management of a system written in C# MVC. It's a pretty big project so working my way through it bit by bit to learn what everything does. I've just made my first set of changes to it, and am ready to deploy. To do this I changed the debug mode to production which has have all the correct settings for deployment on the server.
However, when I try to compile the project I get lots of Errors and warnings. Most are to do with the third party NLog library which is used in the project.
The type or namespace name 'NLog'
could not be found (are you missing a
using directive or an assembly
reference?)
I have double checked the using statements which are all okay, and in References there is a reference to NLog. In my handover guide for this project, it states that the NLog.dll should be within the bin folder in the project. Now, if I go into the folder structure of the project, I can see this bin folder which does contain NLog, and other objects that are throwing me errors. However, I cannot see this bin folder at all in the folder structure in Visual Studio, so I'm wondering is this my problem?
If anyone could offer any advice I'd be so grateful.
Thanks.
You shouldn't see the bin folder in the solution explorer, so that's not the problem. My suspicion is that NLog is included in a class library project that is required by some other project in the solution. For some reason, this class library project is not compiling and thus you have this library as well as NLog (which it brings along when it's compiled) not available. I'd make sure that you have NLog included as a reference directly in all projects which directly reference it or have a dependency that references it. Pay particular attention to any test projects, which won't typically get built when you build your production code using the right-click menu build action, but will when you build the entire solution.