Microsoft.Data.Edm not found (Azure Functions v3.1.4) - odata

I have created an Azure Functions project using .NET Core v2 and attempted to migrate it to Azure Functions v3. After upgrading it complains that it cannot find Microsoft.Data.Edm, Version=5.8.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 anymore. When I look in the bin folder of my v2.1 version, then this file is copied to that location. My v3.1 version lacks a lot of files, including Microsoft.Data.Edm.dll. It seems the file is copied to the bin folder, but it is being removed afterwards. Does any one know what is happening?
It seems the problems start happening when the Microsoft.NET.Sdk.Functions package is upgraded to a version higher than 1.0.31. To illustrate the problem I have created a very simple Azure Function solution that contains both the V2 and the V3 version. It can be found at https://github.com/ramondeklein/AzureFunctionsWithEdm.
When running the AzureFunctionsWithEdm2 the call http://localhost:7071/api/EdmFunction returns OK, but with AzureFunctionsWithEdm3 it fails, because it cannot load the Microsoft.Data.Edm assembly. When the Microsoft.NET.Sdk.Functions package is upgraded to 1.0.33, then the V2 also fails to work.

It seems that the RemoveRuntimeDependencies task removes this assemblies (source). It doesn't run when the _FunctionsSkipCleanOutput variable is set to true. Adding the following line effectively disables this task and makes it work for 1.0.33 and later too.
<PropertyGroup>
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
</PropertyGroup>
Item is tracked via this issue.

Related

Adding a module to web config causes runtime error - mini Orange SSO package

I'm using the MiniOrange SSO DLL with a .NET Umbraco MVC app, and although it seems to work fine locally, as soon as it's deployed to test I get a "server error in '/' application" runtime error. It looks like it's down to adding the following entry under system.webserver, modules:
<add name="APIFilter" type="miniorangesamlsso.APIFilter" preCondition="managedHandler"/>
Has anyone used this, or have any info that may help?
Update
Looks like the miniOrage DLL is missing from bin when I look at it in Azure (it's not a nuget install). I've manually added it to the packages.confige and redeploying now to see if it resolves it.

Quartz versioning issue with jboss

I m having quartz 1.7.3 in .grails/plugins folder in development environment
where in grails/web-inf/lib i have quartz-1.8.4.jar version
It works properly in development sts 3.1.0 IDE version
When i moved the same to production environment by creating war directory in the war folder it includes both 1.7.3 and quartz-1.8.4.jar files at .war/web-inf/lib/
where in jboss/server/default/lib contains quartz.jar (i.e. 1.5.2 comes with by default jboss)
now i m facing issue in invoking quartz jobs on start up and afterwards
same thing is working without changing anything in other server only i m facing the compatibility after putting logs in config.groovy i came to know the error.
I tried to put one jar from 1.7 or 1.8 in web-inf/lib still didn't worked
I did put the 1.5.2 version in web-inf/lib folder still i m facing compatibility issue
Any idea/suggestions
If i remember,
You need to check the quatz tables in the db, may in the other server ther not exist in the db or somting like that..
Tables are starting QURTZ_?
There is somting like 5-7 tables in the db.
There was versioning issue as more than one jar of diff versions were getting conflicting came to know after switching to logging in the system. As there were one more jar included in jboss-web-deplyer/lib directory after removing that jar the problem got resolved.
Thanks for the help.

A very weird problem with localization (ASP.NET MVC)

I'm using Web Developer 2010. I just created a resource file lang.resx with different values in english. Then I created a lang.FR-fr.resx with French equivalents. However after tryingto compile, I get
Error 131 Task could not find "AL.exe" using the SdkToolsPath "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A". Make sure the SdkToolsPath is set and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed
This is so weird! If I remove FR-fr part, it will work, but there will be no translation of course.
I went to that directory and found out that I don't have al.exe there. I managed to find it in .NET 2 folder, but after copying it didn't help. It throws an exception. I tried to reinstall .NET 4, to install Windows SDK, and it still doesn't work.
Maybe I can somehow get this al.exe file?
I solved it by restarting the machine :)

How can I install asp.net mvc 2 on IIS7?

I have developed an ASP.NET MVC 2 website, and now need to deploy it to my web server. I've overcome some hurdles already, since ASP.NET was not installed etc. but I've now got to the point where I can serve up plain content files, and if I try to hit one of my MVC URLs I get this:
Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Not surprising, that, as I've not installed MVC2. Problem is, I can't find any good information about how to install it!
The Microsoft Download Center lists 3 files, none of which look promising:
ASP.NET-MVC-2-RTM-Release-Notes.doc
AspNetMVC2_VS2008.exe
mvc2-ms-pl.zip
The site doesn't bother to explain what the files actually are, but I assume that the last file is the source code. That's what it looks like, anyway. The release notes are no help whatsoever, since they're all about installing on your development machine, and indeed the name of the EXE makes it clear that that's all about Visual Studio integration too.
So how do I actually deploy the darn thing?
The other option linked to from Scott Gu's blog is the Microsoft Web Platform Installer. Now, I don't want to install more than just MVC2, and I already have IIS etc. set up, so this seems a bit heavy. But it's all academic, as it refuses to run on my server, saying "your system is not supported" or words to that effect. (The server is Windows Server 2008 Standard SP2, so I really don't know what it's problem is).
Help!
[It's ridiculous that this should be so hard - or perhaps not hard at all, but certainly a well-kept secret!]
To deploy an MVC application, you just need to ensure that you set the references up to copy to your bin folder. Specifically, these DLLs will need to be in there...
System.ComponentModel.DataAnnotations.dll
System.Web.Abstractions.dll
System.Web.Mvc.dll
System.Web.Routing.dll
Note: Copying a reference to your bin folder.
In practice, you do this by following these steps:
Right-click on the reference in
the "references" section of your
project
Select "Properties"
Locate the "Copy Local" property and
set it to "true"
PLEASE NOTE!
System.Web.Abstractions.dll
System.Web.Routing.dll
You only need these two if .NET 3.5 SP1 has not been installed - if you don't have SP1, you will need to include these two dlls, which are part of SP1 and are needed by MVC for routing.
The correct answer is given by Darin Dimitrov in this answer (posted here for your convenience):
You could do a server install which doesn't require Visual Studio installed:
msiexec /i AspNetMVC2.msi /l*v .\mvc.log MVC_SERVER_INSTALL="YES"
Now you are probably asking where's this AspNetMVC2.msi coming from. Actually you download AspNetMVC2_VS2008.exe from here, rename the .exe to .zip and inside you'll find what you are looking for (in the mvcruntime sub-folder).
Copy System.Web.Mvc.dll from your development machine to the application's Bin folder on the web server (or to the GAC).
This file comes from AspNetMVC2_VS2008.exe.
You do not need to put these files in the Server GAC. You can, but you don't need to.
You can simply copy these files to your /bin directory on the server. In fact, if you have Copy Local set to true when you right click on the reference, it will do just that.
You need to make sure the reference path to this file:
System.Web.Mvc.dll
is in your /bin directory.
I find running the web platform installer tool works great for getting servers and development machines running. It can be found here... http://www.microsoft.com/web/default.aspx

Why is Nant not working with TeamCity?

I have nant set up to build my ASP.NET MVC project and it works fine locally. I add nant to a tools folder and add it to version control. TeamCity picks up my changes and starts the build but it fails.
I believe I'm using the latest version of Nant and I have added the .net framework 3.5 to the nant.exe.config. What am I missing on the server and yes the .net framework is installed on the server as the asp.net mvc app does work if I manually build and deploy there?
The build file is as follows:
<target name="compile" description="Compiles using the AutomatedDebug Configuration">
<msbuild project="Tolt.Sims.sln" />
</target>
Here is the error:
BUILD FAILED Failed to initialize the 'Microsoft .NET Framework 2.0' (net-2.0) target framework.
Property evaluation failed. Expression: ${path::combine(sdkInstallRoot, 'bin')} ^^^^^^^^^^^^^^ Property 'sdkInstallRoot' has not been set.
For more information regarding the cause of the build failure, run the build again in debug mode. Try 'nant -help' for more information
If you're using the beta version of NAnt (which currently is the only way you'll get support for targeting anything greater than the 2.0 framework), you maybe running into a registry problem. A similar problem was reported by Tim Barcz.
Things pretty much boiled down to NAntContrib (provider of msbuild task) pointing to the 2.0 version of msbuild. Check out his solution to see if it applies to your scenario.
Potentially, you dont have the .NET Framework 2.0 SDK installed.
You can install it from
http://www.microsoft.com/downloads/details.aspx?familyid=fe6f2099-b7b4-4f47-a244-c96d69c35dec&displaylang=en
I fixed this by adding the following in the registry:
New string value at: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework
Named: sdkInstallRootv2.0
With the value: C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\
Seemed to spring into life...
w://
This was fixed after the 0.86 beta1 release. On April 1, 2010, 0.90 was released with the fix in case upgrading nant is an option for you. To provide further detail, the fix release in 0.90 appears to have been simple changes to the nant.exe.config file. The bolded text below was added and will likely fix the problem without having to install the 2.0 SDK.
<directory name="${path::combine(sdkInstallRoot, 'bin')}" if="${property::exists('sdkInstallRoot')}" />
Update the net-2.0 section to fix it.
See http://www.mail-archive.com/nant-developers#lists.sourceforge.net/msg07519.html; it's a known bug in 0.86 beta1.
I've run into similar issues with NAnt. I know this isn't the Best solution, but it is one that works if you need to get your project moving.
I've found that installing a development environment (C# Express didn't work for me, but VS 2008 did) on the server makes this issue go away. (Yes, I realize this goes against normal best practices, but it works and lets my scripts run so I can get back to coding.)
Just figured I'd share incase anyone else is in a similar situation..(this has worked for me both with CruiseControl.Net and with Hudson).

Resources