I'm trying to deploy an MVC4 web application to Azure. It has a dependency on an F# project (houses the controllers for the MVC app) which keeps failing to build w/ error:
C:\DWASFiles\Sites\jbf\VirtualDirectory0\site\repository\JBF.Web\JBF.Web.Controllers\JBF.Web.FSharp.fsproj : error MSB4057: The target "Build" does not exist in the project.
The project(s) exist in VS2012 which forces the upgrade of F# projects. I'm wondering if this is a dependency that Azure doesn't support yet with all of the 4.5 refs found in the import statements from the fsproj:
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft F#\v4.5\Microsoft.FSharp.Targets" Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft F#\v4.5\Microsoft.FSharp.Targets')" />
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets" Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')" />
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft F#\v4.0\Microsoft.FSharp.Targets" Condition="(!Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')) And (Exists('$(MSBuildExtensionsPath32)\..\Microsoft F#\v4.0\Microsoft.FSharp.Targets'))" />
<Import Project="$(MSBuildExtensionsPath32)\FSharp\1.0\Microsoft.FSharp.Targets" Condition="(!Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')) And (!Exists('$(MSBuildExtensionsPath32)\..\Microsoft F#\v4.0\Microsoft.FSharp.Targets')) And (Exists('$(MSBuildExtensionsPath32)\FSharp\1.0\Microsoft.FSharp.Targets'))" />
For the record if I pre-build the DLL and deploy that (with a reference to the DLL instead of the project) it works just fine. Also, the fsproj has no actual dependency on F# 3.0 (it's an F# 2.0 project migrated to VS2012).
The Microsoft Azure Well-Architected Framework provides technical guidance specifically at the workload level across five pillars - cost optimization, security, reliability, performance efficiency and operational excellence.
"Most of Microsoft 365 services, including Teams, SharePoint Online and Office online, as well as Xbox Live services run primarily on Azure infrastructure today.
Update: this issue is tracked by https://github.com/projectkudu/kudu/issues/137
I just reproed this. Here is the sample repo: https://github.com/KuduApps/WebAppWithFSharpLibrary.
It's definitely a bug. Could you please open an issue on https://github.com/projectkudu/kudu to track this? It's best to track issue there then as StackOverflow questions. Thanks!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With