'Microsoft.WindowsAzure.Storage' version issue in Mobile Service - azure

My Mobile Service worked great till I install 'Microsoft.WindowsAzure.Storage': 4.3.0.0 through NuGet from Visual Studio.
After the installation of it, Mobile Services shows
Error
Found conflicts between different versions of the same dependent assembly 'Microsoft.WindowsAzure.Storage': 4.3.0.0. Please change your project to use version '3.1.0.1' which is the one currently supported by the hosting environment.
Does Mobile Service only support 3.1.0.1 not the latest one? Or any other configuration I can modify to make it work?
much appreciated for your response.

Oh, there's already a solution and I verified correct.
http://blogs.msdn.com/b/jpsanders/archive/2014/10/10/azure-mobile-services-net-backend-found-conflicts-between-different-versions-of-the-same-dependent-assembly.aspx
backup your project.
find a clean packages.config
copy content from it and replace to my existing problematic packages.config
open the package manager console and type: Install-Package WindowsAzure.Storage -Version 3.1.0.1
Clean the Build. Then Build
Publish again to Azure Mobile Services.
done.
Bottomline: if you want to use Mobile Services, PLEASE DO NOT USE NuGet to install latest WindowsAzure.Storage cause Azure Mobile Services currently doesn't support the latest Storage client which is very weird.

I had the same problem when working on an Azure Mobile Service project (.NET Backend). However, I could not downgrade to Azure.Storage 3.1.0.1 because it requires Ms.Data.OData; 5.6.0 (exact version). Even having the assemblyBinding which redirects all versions to MS.Data.OData to 5.6.2, still did not work.
At the end, I had to uninstall almost all Nuget packages, including Azure.MobileServices.Tables, .BackEnd, and .Enitity. This removed almost all Nuget packages. After that, I was able to install WindowsAzure.Storage 3.1.0.1
Install-Package WindowsAzure.Storage -Version 3.1.0.1
Then reinstalling all the packages that I removed earlier (Azure.MobileServices.Tables, .Backend, etc). This worked for me. Hope it helps somebody else too

Related

Unable to configure Microsoft Identity Platform while publishing .Net Core 3.1.4 project + VS 2022 + Azure

I have a .net core 3.1 project. The project has a dependency on Microsoft Identity Platform and SQL Server.
While publishing the project to Azure. I am not able to configure the Microsoft Identity Platform. It gives below Error window.
I am able to configure SQL Server dependency but not sure why it is not able to configure Identity Platform.
I am using
.Net core 3.1.4
Visual Studio Community Edition 2022
Asp.net core Identity Entity Framework 3.1.4
Any idea?
Because you didn't install the dotnet-msidentity tool.
You can try to open the cmd black window and execute this command following this document.
dotnet tool install Microsoft.dotnet-msidentity -g --version "1.0.0-preview.1.21212.1"
This command will solve your issue. But then you will meet another issue like screenshot below if your account has multiple tenant.
Someone met this issue too and raised a ticket to ms.
You may search for known issues here if you meet some other weird questions when using vs2022.
dotnet tool uninstall --global Microsoft.dotnet-msidentity
dotnet tool install Microsoft.dotnet-msidentity -g --version "1.0.2"
worked for me
if you have nuget problems make sure you habe a nuget.config in the directory you are running the command
Make sure nuGet is set as the first or default package source in Visual Studios.
Right click on the project, click on manage nuGet packages and click on the gear next to Package Source.
Verify that nuget.org is setup as the first package source.

Could not load file or assembly 'Microsoft.Azure.WebJobs.Host, Version=3.0.22.0

I have recently cloned a new repository which has AzureFunctions but I am unable to run it. The build succeeds and on Run click it opens a window suggesting that it is downloading Azure
I am using VS2017 and .Net core 2.1.
It seems to be working for other team members but not for me.
I keep getting this 'Could not find Azure.WebJobs.Host...' error continuously.
I've tried all the fixes that are there on the internet without any luck.
The Azure Functions and Web job tools dlls seem to be up-to-date as they are not shown in the updates tab.
Updating all the nuget dependencies also did not work.
I tried using VS2017 and .Net core 2.1.
Installed Microsoft.Azure.WebJobs - 3.022 version from Nuget Packages.
Included Namespace
using Microsoft.Azure.WebJobs.Host;
I found that there is no Microsoft.Azure.WebJobs.Host direct assembly to include.
If you install Microsoft.Azure.WebJobs you can directly use Microsoft.Azure.WebJobs.Host namespace.
Check your .csproj , if you have any PackageReference Included with Microsoft.Azure.WebJobs.Host, try to remove and build your Application.
It must include Microsoft.Azure.WebJobs

Cannot install Microsoft.Azure.ServiceBus using NuGet

I'm running a test .Net Core Console app to try using ServiceBus messages. However after using Nuget to install Microsoft.Azure.ServiceBus v3.1.1 I get the following error
Package Microsoft.Azure.ServiceBus 3.1.1 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package Microsoft.Azure.ServiceBus 3.1.1 supports: netstandard2.0 (.NETStandard,Version=v2.0)
I've tried installing up to v3.3.0 and get the same, I'm using the latest .Net framework and have updated my VS2017 so I don't know what the problem can be. Has anyone else had this issue?
I don't know what the problem can be
No matter the version of package Microsoft.Azure.ServiceBus is v3.1.1 or v3.3.0, both of their Dependencies is .NETStandard 2.0 while your app is .NetStandard 1.0. So, as Peter said, the version of .net core you have is too old.
You could go to download the latest .Net Core SDK and then reinstall the package you want.
Or you could download the Microsoft.Azure.ServiceBus v1.0.0. However, because the version is too old, some feature may not have. So, I suggest that you could update your TargetFramework to .net core 2.0+.
Your console app needs to have a TargetFramework .net core 2.0+ (Check in .csproj file), download latest .NET Core SDK and create a new .Net core console app to install the package again.

Nuget 3.0 error on azure deployment

I have a VS2015 project that I have successfully deployed on Azure (via Github) as a web app.
However, after some offline updates, when I deploy, i get the error
The 'System.Net.Http 4.0.0' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60717.93'."
Is nuget 3.0 installed on the web app servers? And how can I use it?
I ended up reverting the System.Net.Http 4.0.0 package to an older version, that works with NuGet version 2.8.60717.93.
NuGet doesn't go on the the app server, it goes on the build server. Make sure your build server has the latest NuGet client. See this SO Answer.

How to upgrade nuget packages if the installed version is missing?

Running into a situation where I deployed an application to production a few months ago and now I need to do some work on it, on an entirely new machine. The first I do is pull source and nuget restore won't restore because it can't find the particular version of the package it was developed under. When I check nuget.org for this package version it is not there. So how do I upgrade my solution to the latest binaries?
Visual Studio 2013 trying to update ServiceStack '4.0.39' to latest, which is '4.0.40' at the time of this post.
Thank you,
Stephen
The best solution I've come up with for this is to manually edit the Packages.config file(s) and set the version number to whatever you want. Restore should then work. It's not a perfect solution but it has dug me out of some holes.
(I know this is an old answer, but it just came up in some Googling)
One issue with the accepted answer (of just updating the version # in packages.config) is that this is just triggering a "package restore"--and will skip any "installation steps" the package might have (things that were done automatically when you first added the package, such as adding assembly references, modifying config files, etc.).
An alternative way would be to edit the packages.config and REMOVE the package in question from there---then start up VS and add the new version. This will trigger the package's usual install routine to do it's thing.
I recommend you to use the NuGet Package Manager Console of Visual Studio:
TOOLS > NuGet Package Manager > Package Manager Console
Command to update a NuGet package to the latest version:
Update-Package ServiceStack
Command to update a NuGet package to a specific version:
Update-Package ServiceStack -version 4.0.40

Resources