I am deploying a C # site for Azure from the GitHub repository. This website links to a couple of F # libraries, and they just compile on my machine, but in Azure, the build fails with a number of compilation errors.
Here is a snippet of the build log:
FS0001: A generic construct requires that the type 'Company' have a public default constructor [C:\DWASFiles\Sites\eureka-servicestack-poc\VirtualDirectory0\site\repository\Eureka.ServiceStack.FSharp.Poc\Services\Services.fsproj] C:\DWASFiles\Sites\eureka-servicestack-poc\VirtualDirectory0\site\repository\Eureka.ServiceStack.FSharp.Poc\Services\CompaniesService.fs(28,17): error FS0039: The field, constructor or member 'PopulateWith' is not defined [C:\DWASFiles\Sites\eureka-servicestack-poc\VirtualDirectory0\site\repository\Eureka.ServiceStack.FSharp.Poc\Services\Services.fsproj] C:\DWASFiles\Sites\eureka-servicestack-poc\VirtualDirectory0\site\repository\Eureka.ServiceStack.FSharp.Poc\Services\AppHost.fs(17,55): error FS0072: Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. [C:\DWASFiles\Sites\eureka-servicestack-poc\VirtualDirectory0\site\repository\Eureka.ServiceStack.FSharp.Poc\Services\Services.fsproj] An error has occurred during web site deployment.
The first error should be fixed after I put the CLIMutable attribute in the violation record type, and the second error was fixed after the correct namespace was included. I do not know what the third error is about, especially since none of them occurs locally.
To make sure I had the same version of F # in both places, I included the FSharp.Core DLL in the solution and reference the local version. This did not help, but he removed the warning that he could not find version 4.3.1 of the file.
Is it possible that I am launching another version of the F # compiler and how can I check this? So far, it has worked fine, which makes me suspect some slight difference in versioning something. Unfortunately, itβs quite difficult to get an idea of ββwhat is really going on in the build environment. This is a free Azure website, and you donβt think you are getting direct access to it.
I probably could solve some problems at the moment, but there seems to be a deeper problem here.
source share