Asked by:
F# compiler bug in standalone deployments

General discussion
-
Hello,
I have identified an issue with the standalone distribution of the F# compiler (VWD_FSharp.exe). In particular, fsc.exe fails to resolve the basic .NET assemblies whenever no version of Visual Studio 12 is installed. Compiling the simplest possible F# program yields the following error messages:
error FS0082: Could not resolve this reference. Could not locate the assembly "mscorlib.dll". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. (Code=MSB3245) error FS0082: Could not resolve this reference. Could not locate the assembly "System.dll". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. (Code=MSB3245) error FS0082: Could not resolve this reference. Could not locate the assembly "System.Xml.dll". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. (Code=MSB3245) error FS0082: Could not resolve this reference. Could not locate the assembly "System.Runtime.Remoting.dll". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. (Code=MSB3245) error FS0082: Could not resolve this reference. Could not locate the assembly "System.Runtime.Serialization.Formatters.Soap.dll". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. (Code=MSB3245) error FS0082: Could not resolve this reference. Could not locate the assembly "System.Data.dll". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. (Code=MSB3245) error FS0082: Could not resolve this reference. Could not locate the assembly "System.Drawing.dll". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. (Code=MSB3245) error FS0082: Could not resolve this reference. Could not locate the assembly "System.Web.dll". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. (Code=MSB3245) error FS0082: Could not resolve this reference. Could not locate the assembly "System.Web.Services.dll". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. (Code=MSB3245) error FS0082: Could not resolve this reference. Could not locate the assembly "System.Windows.Forms.dll". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. (Code=MSB3245) error FS0082: Could not resolve this reference. Could not locate the assembly "System.Numerics.dll". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. (Code=MSB3245) unknown(1,1): error FS0078: Unable to find the file 'mscorlib.dll' in any of C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5 C:\Users\testvm C:\Program Files (x86)\Microsoft SDKs\F#\3.0\Framework\v4.0
F# interactive seems to be unaffected by this issue. It seems that the compiler fails to take into account the case where core assemblies are installed under the windows folder. I have been able to reproduce this in my custom build of the F# compiler.
- Edited by eirik t Monday, April 22, 2013 10:14 AM
- Changed type Keith BattocchiMicrosoft employee, Moderator Monday, April 22, 2013 4:50 PM Not a question
Monday, April 22, 2013 10:13 AM
All replies
-
Please send bug reports to fsbugs@microsoft.com. This forum is intended for discussions or questions about F#.
Monday, April 22, 2013 4:50 PMModerator -
It appears you need to install the Windows SDK as well to get the Reference Assemblies. For example, for Windows 8 and Windows 2012 Server:
http://msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx
- Edited by dsymeMicrosoft employee Monday, April 22, 2013 5:12 PM
Monday, April 22, 2013 4:58 PM -
You can download a standalone version of the F# 3 bits here (7.5MB MSI): http://go.microsoft.com/fwlink/?LinkId=261286
You may also need to install the .Net framework you're targeting.
See Building F# 3.0 Projects on a Build Server WITHOUT Visual Studio for full details.
- Edited by Phillip Trelford Thursday, July 4, 2013 12:46 AM added more details
Thursday, July 4, 2013 12:40 AM -
Hi,
I am trying to use FSharp.Compiler.CodeDom to do dynamic compilation and I am having the same issue. It works locally since I have VS 2012 installed, but doesn't work when I roll it out to Windows Server 2012.
In my case I am rolling app to Azure Worker/Web Role so installing Windows SDK each time is not really an option. Is there a way to tell fsc.exe to use /Windows directory?
Has there a been any progress on this bug Is there a case management system where I can follow resolution of this issue.
Eric
- Edited by Eric20P Sunday, January 12, 2014 2:17 PM
Sunday, January 12, 2014 2:16 PM -
Hi Eric,
I know you probably have solved your problem by now. But I had the same issue, and wrote a blog post about how I solved it, check it out here:
http://wp.sjkp.dk/preparing-azure-cloud-service-for-running-f-compiler-service/
Basically I scripted the installation of the SDK dsyme suggested. It's not nice, but it works.
- Edited by sjkp.dk Sunday, September 28, 2014 9:03 PM
Sunday, September 28, 2014 8:31 PM