Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile fsx scripts with Windows 7 (Win7) #273

Closed
markek opened this issue Jul 22, 2016 · 17 comments
Closed

Cannot compile fsx scripts with Windows 7 (Win7) #273

markek opened this issue Jul 22, 2016 · 17 comments
Labels

Comments

@markek
Copy link
Contributor

markek commented Jul 22, 2016

Description

Tried compiling my fsx project and got this error. Then tried fresh pull of samples/node/express and got same error. I noticed that the node/console project does compile. One difference between them is that the latter uses fsproj and the former uses fsx.

Repro steps

npm install -g fable-compiler
cd samples/node/express
fable

Expected behavior

successful compilation

Actual behavior

npm install
Start compilation...
FABLE ERROR:
...

Related information

  • Fable Version 0.4.1
  • win7
@MangelMaxime
Copy link
Member

This is the behavior that I encounter yesterday on my computer at work.

Here is the result if I try to execute the FABLE COMMAND manually, I got this error

System.Exception: Cannot read project options: Cannot load the file or assembly 'Microsoft.Build.Framework, Version=12.0.0.0
, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of it dependencies. The file specify is not found.
   à [email protected](String message)
   à Fable.Client.Node.Main.getProjectOpts(FSharpChecker checker, CompilerOption
s opts)
   à Fable.Client.Node.Main.main(String[] argv)

Sorry if the error is not the exact message. My computer at work is in french.

As @colinbull mention that he has been able to build .fsproj and not .fsx file, I tested both with the same code and I confirm this situation too.

@alfonsogarciacaro
Copy link
Member

I cannot reproduce the problem in Windows 10, but in any case I have released [email protected] using again the Nuget version of FSharp.Compiler.Service instead of the custom build. Could you please give it a try with the new version and confirm if the problem has been solved? Thanks!

@MangelMaxime
Copy link
Member

The new version didn't fix this issue.

I think that you can't reproduce this issue under Windows 10, because it's "specific" to Windows 7. I mean at home I am working with Windows 10 without problem and here at work under Windows 7 I got the error.

@alfonsogarciacaro
Copy link
Member

Probably the error is coming from FSharp.Compiler.Service then, I'll report it there. The alternate solution is that we all update to Windows 10 😉

@MangelMaxime
Copy link
Member

If only I could at work :)

Thanks.

@alfonsogarciacaro
Copy link
Member

What .NET version do you have installed on the Win7 system?

@MangelMaxime
Copy link
Member

Hum the default one installed with Visual Studio 2015.

Should be .Net 4.5/4.6, I think.

@alfonsogarciacaro
Copy link
Member

I've published [email protected]. This just has a fix to be able to visualise the stack trace of the problem. Can you please try again with the new verbose and post here the error stack trace? Thanks!

@MangelMaxime
Copy link
Member

Sure, but I cannot do it before Monday. I will post the result here later so.

@markek
Copy link
Contributor Author

markek commented Jul 25, 2016

Ok, I am using a fresh aws workspace for my computer. It isn't win 7 but it is:
64-bit dual core - windows server 2008 r2 data center sp1 - with a win 7 experience.
Note the user's desktop is on a D: drive.
I installed vs community with updates, custom install, check f# language.
I installed node v4.4.7 lts 64-bit.
I downloaded fable-master.zip, unzipped and went to samples/node/express

Results:

fable --verbose

Fable F# to JS compiler version 0.4.3
npm install

PROJECT FILE: D:\Users\mark\Desktop\Fable-master\Fable-master\samples\node\expre
ss\index.fsx
OUTPUT DIR: D:\Users\mark\Desktop\Fable-master\Fable-master\samples\node\express
\out
WORKING DIR: D:\Users\mark\Desktop\Fable-master\Fable-master\samples\node\expres
s

FABLE COMMAND: cmd /S /C "D:\Users\mark\AppData\Roaming\npm\node_modules\fable-c
ompiler\bin\Fable.Client.Node.exe --copyExt true --verbose true --module commonj
s --sourceMaps true --projFile ./index.fsx --outDir D:\Users\mark\Desktop\Fable-
master\Fable-master\samples\node\express\out --ecma es5"

Start compilation...
ERROR: Cannot read project options: Could not load file or assembly 'Microsoft.B
uild.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a
3a' or one of its dependencies. The system cannot find the file specified.
   at [email protected](String message)
   at Fable.Client.Node.Main.getProjectOpts(FSharpChecker checker, CompilerOptio
ns opts)
   at Fable.Client.Node.Main.main(String[] argv)

@alfonsogarciacaro
Copy link
Member

Thanks! Now we have more information to deal with the problem 👍 Can you please try installing MSBuild tools 2013?

@MangelMaxime
Copy link
Member

MangelMaxime commented Jul 25, 2016

For me it's working now using MSBuild tools 2013. Thanks you.

@markek
Copy link
Contributor Author

markek commented Jul 25, 2016

For me also. Thanks very much.

@markek markek closed this as completed Jul 25, 2016
@alfonsogarciacaro alfonsogarciacaro changed the title win7 samples/node/express compiler produces FABLE ERROR: ... Cannot compile fsx scripts with Windows 7 (Win7) Jul 25, 2016
@alfonsogarciacaro
Copy link
Member

Fantastic! Thanks you both for your help and patience checking the issue. Hopefully, people with the same problem will find this when searching a solution. Actually, @MangelMaxime already had shown the solution when posting the error message on his first comment, but for some reason I missed that 😕

@WilliamBerryiii
Copy link

WilliamBerryiii commented Sep 16, 2016

Should this get added to a getting started guide? Just ran into this with a demo node project.

NVM ... it's listed here: https://github.com/fable-compiler/Fable

@jimfoye
Copy link

jimfoye commented Oct 27, 2016

I know this is closed, but I'm just curious, why is it necessary to install Microsoft Build Tools 2013 if we already have VS 2015 installed?

@tpetricek
Copy link
Collaborator

It is an old issue in the F# Compiler Service (FCS) (fsharp/fsharp-compiler-docs#631) which Fable uses - but fortunately, it should be fixed soon, because the issue has recently been addressed in FCS (fsharp/fsharp-compiler-docs#649)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants