-
Notifications
You must be signed in to change notification settings - Fork 123
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
Error getting started using FSCS #424
Comments
Following some threads on issues on this github repo I can see that the dependency on Microsoft.Build.Framework seems to be an issue. I have added FSharp.Compiler.Tools to my test project (via nuget). I can see that this adds a dll into packages for 'Microsoft.Build.Framework' and that this in the "12.0" range. Unfortunately adding this as a reference in the project does not change the error given. The error is complaining when looking for a version 12.0.0.0 and the actual version in FSharp.Compiler.Tools is 12.0.40629.0 so I have then tried a binding redirect on app.config as follows:
I really thought this would work...but it didn't! Please help. ASIDE ONE I looked through the dependencies of FSharp.Compiler.Services from the paket file on github and could find no mention of the MSBUILD dependencies. I was just trying to trace the precise version of Microsoft.Build.Framework.dll that I would need. Why? ASIDE TWO it seems that my machine does not have the version 12.0.x.x of the Microsoft.Build series on the machine. I would imagine that this is because I have VS2015 loaded and have never had VS2013 installed. The thing is, if FSCS is now directed at F# 4.0 (which is kinda equivalent to VS2015) then why have the current version 1.4.x.x+ depend on those outdated assemblies. Just asking to test my own understanding of this dependency soup. |
The dependency is there for the project cracking facility. I think we have agreed that the best approach here is to move this out of process, and this other assembly would then take the dependency and handle loading the best MSBuild version available. I have done this for FsAutoComplete, but haven't had time to port it over. In the meantime, have you tried instead redirecting to the 14.0.0.0 version you have installed with VS2015? |
Was pretty sure that was one of the permutations I tried but I tried it again anyway. (0) FSCS latest version from Nuget (1) I referenced version 14.0.23107.0 located at "C:\Program Files (x86)\Reference Assemblies\Microsoft\MSBuild\v14.0" (2) I adjusted my app.config file as follows:
I still receive the following run-time error: [|unknown (1,1)-(1,81) parse error Could not load file or assembly 'Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.|] It appears "hard-wired" to look for a particular version and no other?! Unfortunately, FSCS is unusable for me at present. |
@cognociente I have never used the build numbers in binding redirects, I would suggest just using:
If that still doesn't work, there are three other options:
|
@rneatherway I tried to adjust app.config to not use the build numbers but it didn't work. Then tried copying your code in (2) above and calling it prior to the compile step... SUCCESS!! Thanks. |
I'm glad it works now, but it isn't a long-term solution. I'll see if I can find time for that PR. |
I'm getting the following error just trying to get the provided sample working (pretty much no matter what I try):
Attempting the first sample in:
http://fsharp.github.io/FSharp.Compiler.Service/compiler.html
In a previous release a similar error could be overcome by being careful about how you reference FSharp.Core st you make sure the optdata & sigdata files are also present. This is now not having an effect on the problem.
Error
[|unknown (1,1)-(1,81) parse error Could not load file or assembly 'Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.|]
This is actually the same root error that has arisen in a downstream project (QuotationCompiler) and has me testing where the root of the problem lies.
Configuration
Visual Studio 2015
F# 4.0 (I could use F# 3.1 if need be for the interim)
Resolution
The following seems to be the only relevant item on the subject:
#337
But I am not 100% sure.
What is the best way forward?
The text was updated successfully, but these errors were encountered: