FSlex/FSyacc crash - can't locate FSharp.Core assembly - f#

I'm having an issue with FSlex/FSyacc crashing on my machine.
In context this is inside Visual Studio 11 beta running on Windows 8 Consumer Preview (32 bit) running inside a Parallels virtual machine.
------ Build started: Project: Basis, Configuration: Debug Any CPU ------ C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1546,5):
warning MSB3245: Could not resolve this reference. Could not locate
the assembly "log4net, Version=1.2.11.0, Culture=neutral,
PublicKeyToken=669e0ddf0bb1aa2a". Check to make sure the assembly
exists on disk. If this reference is required by your code, you may
get compilation errors. Basis ->
C:\Users\nexus\Desktop\Statical\trunk\Statical\Basis\bin\Debug\Basis.dll
------ Build started: Project: Syntax, Configuration: Debug Any CPU ------ cd C:\Users\nexus\Desktop\Statical\trunk\Statical\Syntax\ CALL C:\Users\nexus\Desktop\Statical\trunk\Statical\Syntax\fsyacc.cmd CALL
C:\Users\nexus\Desktop\Statical\trunk\Statical\Syntax\fslex.cmd
Running fsyacc.cmd... CalParser.fsp Running fsyacc.exe... Unhandled
Exception: System.IO.FileNotFoundException: Could not load file or
assembly 'FSharp.Core, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The
system cannot find the file specified. File name: 'FSharp.Core,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at .$FSharp.PowerPack.FsYacc.Driver.main#() WRN:
Assembly binding logging is turned OFF. To enable assembly bind
failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There
is some performance penalty associated with assembly bind failure
logging. To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog]. Running fslex.cmd... Not
running fslex.exe as CalLexer.fs is newer than CalLexer.fsl
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1036,5):
error MSB3073: The command "cd
C:\Users\nexus\Desktop\Statical\trunk\Statical\Syntax\ CALL
C:\Users\nexus\Desktop\Statical\trunk\Statical\Syntax\fsyacc.cmd CALL
C:\Users\nexus\Desktop\Statical\trunk\Statical\Syntax\fslex.cmd"
exited with code -532459699. Done building project "Syntax.fsproj" --
FAILED.
The relevant piece seems to be this:
Unhandled Exception: System.IO.FileNotFoundException: Could not load
file or assembly 'FSharp.Core, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The
system cannot find the file specified. File name: 'FSharp.Core,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at .$FSharp.PowerPack.FsYacc.Driver.main#()
Not sure why it can't locate the FSharp.Core assembly.
Ideas?

I had forgotten to install F# 2.0. There was a dependency on that.

Related

MVC5 FileNotFoundException: System.Data.SqlClient

Why Am I getting this error with my MVC5 project? I already added System.Data.SqlClient 4.0.0-beta-23019 nuget package in mu project.json. Any suggestions?
Error message:
FileNotFoundException: Could not load file or assembly
'System.Data.SqlClient, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The
system cannot find the file specified.

Update assembly version MvcSportStore

I am trying to follow an example in a book about MVC but i get an error when trying to build the project.
This is the error:
Error 2 Assembly 'SportsStore.WebUI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Mvc, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' c:\Users\XXX\Documents\Visual Studio 2013\Projects\Sport\SportsStore.WebUI\bin\SportsStore.WebUI.dll SportsStore.UnitTests
It seems to me that I am running two different versions of the same assembly and I should probably update or "downdate" one of them? Can someone suggest which file and how to change it?
Thank you
The answer might be a little too late but hopefully it helps someone else. I had a similar issue and I resolved it by removing the lower version and running the command below inside of package manager console
install-package Microsoft.AspNet.Mvc -version 5.2.0

Could not load assembly WebPages.Deployment version 2 at host?

I have a ASP.NET MVC 2 website (VS2010) that I have upgraded to ASP.NET MVC 3 (VS2012) and this works fin on local IIS7 but when publishing it I get this exception on host :
Could not load file or assembly 'System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
After some seartch I found this that states that I should set CopyLocal on some of the references(inlcuding the System.Web.WebPages) and also use the publish tool in VS2012, but this generated the following exception?
Could not load file or assembly 'System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
And I canĀ“t find any Deployment dll to set copyLocal?
How could I solve this?
Have a read of http://joel.net/getting-asp.net-mvc-3-working-on-discountasp.net
You need to add a reference to System.Web.WebPages.Deployment and set that also to CopyLocal.

Program crashes when using Managed DirectX with .Net Framework 4.0

We are having a problem using DirectSound with the Managed DirectX dlls and the .Net Framework 4.0
The program works fine with .Net Framework 2.0 - but we have a requirement to upgrade to 4.0 to use some other components.
When the program invokes the Sound module, it crashes with the exception noted below.
Anybody seen this one and know how to fix it?
==============================================
System.IO.FileNotFoundException was unhandled
Message=Could not load file or assembly 'Microsoft.DirectX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Source=Microsoft.DirectX.DirectSound
FileName=Microsoft.DirectX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
FusionLog=""
[stack dump snipped]
InnerException: System.IO.FileNotFoundException
Message=Could not load file or assembly 'Microsoft.DirectX, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
FileName=Microsoft.DirectX, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
FusionLog==== Pre-bind state information ===
LOG: User = *****************
LOG: DisplayName = Microsoft.DirectX, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Users/*********/Documents/Visual Studio 2010/Projects/************/bin/x86/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : Microsoft.DirectX.DirectSound, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\***********\Documents\Visual Studio 2010\Projects\****************\bin\x86\Debug\***************.exe.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Redirect found in application configuration file: 1.0.2902.0 redirected to 2.0.0.0.
LOG: Post-policy reference: Microsoft.DirectX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
InnerException:
I know this is a late reply but for me to get this working I had to find two DirectX DLL Microsoft.DirectX and Microsoft.DirectX.DirectInput and add then as a reference to the project.
Then just use the DirectX namespace for calling methods.
<!-- Uncomment this section when switching from Net2.0 to Net 4.0
It is intended to fix problems loading DirectX dlls - per Microsoft-->
<!--
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
-->
Officially the legacy DirectX Managed 1.1 assemblies do not support .NET 4.0. See this blog post for details.
You could look at using SlimDX or some other alternative...

ASP.NET MVC with Mono

I'm trying to develop an app with ASP.NET MVC Mono.
Installed latest version of Mono and Monodevelop. While trying to run a default "Welcome to ASP.NET MVC on Mono!" app I get the following errors:
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a
configuration file required to service this request. Please review the
specific error details below and modify your configuration file
appropriately.
Parser Error Message: Could not load file or assembly 'System.Web.Mvc,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or
one of its dependencies. The system cannot find the file specified.
Source Error:
Line 34: Line 35: Line 36: Line 37: Line 38:
Source File: C:\Users\Sergey\Desktop\mvc\mvc\web.config Line: 36
Assembly Load Trace: The following information can be helpful to
determine why the assembly 'System.Web.Mvc, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.
WRN: Assembly binding logging is turned OFF. To enable assembly bind
failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There
is some performance penalty associated with assembly bind failure
logging. To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].
Version Information: Microsoft .NET Framework Version:2.0.50727.4927;
ASP.NET Version:2.0.50727.4927
Tried putting System.Web.Mvc.dll from C:\Program Files\Mono-2.10.6\lib\mono\2.0 to bin\ - app still doesn't run, I just get
The located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)
instead of
The system cannot find the file specified.
What should I do?
P.S. My OS is Windows 7.
As suggested in the comment, I'm posting this as an answer ;) When trying to run application which references Mono's assemblies, one can try running it with Mono (not .NET what MonoDevelop does as default) as it uses different GAC.

Resources