Tuesday 15 July 2014

c# - Deployment of a web application using FSharp.Data to Azure Websites -


This is a common question that uses my C # / F # MVC project FSharp.Data NuGet package, and the deployment process Message fails with

assembly "FSharp.Data, version = 1.1.4.0, culture = neutral, publicKeyToken could not be detected = null."

The only effective way I can see the NuGet reference (FSharp.Data, FSharp.Data.DesignTime, FSharp.Data.Experimental, FSharp.Data.Experimental.DesignTime is to change all) With explicit reference DLLs, and copy the local set to true. I hate to throw the child of Noah Gate in this way with water. Is there any fast way? Alternatively, is it an open issue to add my vote?

You can add an element to ensure your web.config For that when your project has been posted on Azure, then the FSharp.Data assembly is included. I have used this technique before deploying mixed F # / C # ASP.NET MVC projects for blue; It has been a while, but I do not think I had to change the copy to local copies set on the referenced assemblies (which I added through NuGet).

Anyway, the need to add an entry should look something like this:

  & lt; Configuration & gt; & Lt; Order & gt; & Lt; Assembly binding xmlns = "karash: schema-microsoft-com: asm.v1" & gt; & Lt; DependentAssembly & gt; & Lt; Assembly name = "FSharp.Data" /> & Lt; / DependentAssembly & gt; & Lt; / AssemblyBinding & gt; & Lt; / Order & gt; & Lt; / Configuration & gt;   

Based on Rob's comment that he is still receiving the same error message, here I will take the next step to diagnose the issue.

  • Build the ezoor deployment package (you do not need to deploy it). When this build is finished, get the deployment package file ( * .cspkg ); This is actually just a zip file, so remove the contents in a folder, like, together. In the extracted folder, enter *. There should be a file with the Cssx extension which is much more than the others; It's also a zip file, so remove it in another folder, then browse with that folder in Windows Explorer, go to the SitesType folder, then enter the 0 folder got into. Now you should see the root of your website (i.e., those files / folders that will be copied to C: \ inetpub \ wwwroot on the web server). Check the bin folder - can you see the FSharp.Data assembly? If not, this is a build / packaging problem, the server is not a problem; If you see FSharp.Data assembly, proceed to the next step.
  • Deploy remote desktop in one of your project to Azure, then the examples are being hosted on your project. (For example, there is a special process for enabling remote desktop - if you have not done this yet, you have to do this before continuing.) Once you are logged in, you Event Viewer ( Administrative Tools ); Log in under Application Windows Log - Are there any ASP.NET Errors? If so, click them and see the error message, there may be a .NET exception message about not being able to resolve the FSharp.Data assembly. If so, browse for Celsius: \ inetpub \ wwwroot \ and make sure FSharp.Data create website folder bin Is in. If so, go to the next step.
  • Some FSharp.Data assembly is being packed and posted correctly with your web project, then this problem may be (or If your project is generated with one of its dependencies, the .NET 4.0 assembly is running on your project .NET 4.5. When logging in to Azure instances (via Remote Desktop) you can enable fusion logging and use the Fusion Log Viewer to find out how SLR is trying to load the assembly. If you track the problem, the possible way to fix it will be to send you the & lt; Compulsive redirects & gt; element and Enter your web.config in the entry. It is here that the original F # PowerPack (which targets the .NET 2.0 version of FSharp.Core ) is working on .NET 4.0 on my F # / C # project: < / P>

      & lt; DependentAssembly & gt; & Lt; Assembly name = "FSharp.Core" publicKeyToken = "b03f5f7f11d50a3a" culture = "neutral" /> & Lt; Compulsive Redirect Old Version = "0.0.0.0-4.0.0.0" Newverson = "4.0.0.0" /> & Lt; / DependentAssembly & gt;      

No comments:

Post a Comment