Why project cannot find references for WebJobs.Core? - azure

Following this I created a console .Net Core 2.1 application, and I'm using Microsoft.Azure.WebJobs.Core NuGet v. 3.0.0-beta5. For some reason the project can't compile as it says it cannot find the assemblies. Why on earth?

Actually, you do not need to install Microsoft.Azure.WebJobs.Core NuGet v. 3.0.0-beta5.
You could just try to install Microsoft.Azure.WebJobs version 3.0.0-beta5. Then it will work.
This Microsoft.Azure.WebJobs package contains the runtime assemblies for Microsoft.Azure.WebJobs.Host. It also adds rich diagnostics capabilities which makes it easier to monitor the WebJobs in the dashboard. For more details, you could refer to this article.

Related

Migrate Microsoft.WindowsAzure.Mobile.SQLStore to Microsoft.Azure.Mobile.Client.SQLiteStore

I am trying to update one of my Xamarin.Forms apps that uses the deprecated Microsoft.WindowsAzure.Mobile.SQLStore pacakge with the new Microsoft.Azure.Mobile.Client.SQLiteStore package but I get the following error when I try to install the package in my Core pcl project:
Could not install package 'Microsoft.Azure.Mobile.Client.SQLiteStore 4.0.0'.
You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile78', but the package does not contain any assembly references or content files that are compatible with that framework.
For more information, contact the package author.
I tried to follow this documentation but they seem to forget to add the code sample, so I can't figure out exacly what they are doing. The deprecated Microsoft.WindowsAzure.Mobile.SQLStore package installed in a PCL library but the new Microsoft.Azure.Mobile.Client.SQLiteStore package doesn't or so it seems.
Any help would be appreciated.
It turns out that Microsoft.Azure.Mobile.Client.SQLiteStore 4.0.0 does not support PCL anymore but they moved to .NET Standard 1.4. PCL support stops at version 3.1.0
So if you are using PCL install v3.1.0. But before you install v3.1.0, make sure you manually remove the deprecated Microsoft.WindowsAzure.Mobile.SQLStore first.
Check out this issue for more details: https://github.com/Azure/azure-mobile-apps-net-client/issues/337
you can try and open the .csproj of your PCL and replace the Profile78 entry with a profile the NuGet package supports (probably Profile259 which includes almost everything but windows phone silverlight)
If your project won't compile after changing your profile (because there are missing type references e.g.) try picking a different profile the package supports.
If you're having multiple PCLs you might need to change the target profile of all of them.
Try Changing .Net profile to Profile 7 and then update.
Go To Cross Platforms Project Options->Build->General->.Net Portable

ServiceStack set up packages

I'm trying on ServiceStack but getting stuck in the installation. Can I ask what's the correct packages to install? For a very simple tutorial on Pluralsight.
It doesn't seem to allow me to enable using ServiceStack.Interfaces or using ServiceStack.ServiceInterface in my application. Even though those are right there in the References.
I have installed ServiceStrack, ServiceStack.Host.MVC, ServiceStack.Host.AspNet and more.
Assuming you want to build just minimal web-service, you do not need to install Host.MVC or Host.AspNet, just install the minimal package using NuGet Package Manager like this:
Install-Package ServiceStack
After that you can use this guide to configure your newly ServiceStack Web-Service.
The easiest way to install ServiceStack is with ServiceStackVS VS.NET Extension which will download the right packages for each project type. See this guide on Creating your first project with ServiceStackVS.
If you want to add packages manually to a normal ASP.NET Web Application please see Creating a Service from Scratch.

Catel 4.0.0 and Dependency on Microsoft.Bcl.Build

When updating a project to use current Catel version (4.0) I am getting this warning:
All projects referencing MyInfrastructureProject.csproj must install nuget package Microsoft.Bcl.Build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317569.
The error is reported for projects that references MyInfrastructureProject.csproj.
I find it odd that I need to add additional libraries to other project especially when it is concerned with nuget (if I am getting the picture correctly) and not with actual functionality of my code (or maybe even Catel). But in any case, I don't really understand the issue.
I searched a little for this issue but didn't find relevant details or explanations.
Should I go ahead and add the Microsoft.Bcl.Build reference everywhere in my project?
Thanks,
Tomer
If you don't know what is Microsoft.Bcl.Async you should study it.
Catel uses this feature pack so as to use async/await on .NET 4 and Silverlight 5. So if you use Catel in a .NET 4 project, you inherit the same dependencies, which is what the warning says.
Thus, yes, please go ahead and add the NuGet package to the necessary projects, or simply upgrade your projects to .NET 4.5 and reapply the NuGet packages.

StorageClient does not exist in the namespace using Microsoft.WindowsAzure

This code was working previously but on updating nuget packages something seems to have gone awry. If I add in the Microsoft.WindowsAzure.StorageClient dll that had previously been deployed then it is not recognising the Cloud classes such as CloudBlobClient which I am using WindowsAzure.Storage nuget 4.2
I need this to be able to write to azure file services so cannot simply uncomment
Microsoft.WindowsAzure.StorageClient namespace does not exist in the new Microsoft.WindowsAzure.Storage.dll. I would strongly recommend removing all references to Microsoft.WindowsAzure.StorageClient.dll and changing the code to use the new library.
If you still cannot see Microsoft.WindowsAzure.Storage after these steps, you can try uninstalling the NuGet package and reinstalling it.
Although the Microsoft.WindowsAzure.StorageClient DLL is likely outdated, I succeeded to download it manually from https://nuget.org/packages/AzureSDK2.2DLLs/ and install it to Visual Studio 2013 Community (using the instructions from another answer).

Force NuGet to download packages built to project .Net version

This should be a simple question but I can't seem to find the answer anywhere.
I've got a project that I'm building to .Net 3.5. I'm trying to include Newtonsoft JSON.Net as a reference, but NuGet is installing a version built to .Net 4.0. This makes it impossible for me to use my compiled assembly in an environment that does not support .Net 4.0.
Is there any way to configure NuGet so that it ensures that the reference is not built to a version of .Net beyond the project settings?
Maybe you can use this answer to a similar question:
Download old version of package with nuget
It says that you can install an old version of a package
You can try to install a version compatible with .NET Framework 3.5, and it will be solved!
;) I hope this helps
NuGet will use the project's target framework to pick the correct assembly from the NuGet package. You cannot override this behaviour.
The latest version of the Json.NET NuGet package (6.0.1) contains an assembly specifically for .NET 3.5 so NuGet should automatically pick that one if your project has a target framework of 3.5.
Changing my project's target framework to 3.5 results in the following element being added to the project:
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
This is what NuGet uses to determine which assembly to use.
When Json.NET is installed into this project the Newtonsoft.Json.dll file is referenced from the packages\Newtonsoft.Json.6.0.1\lib\net35 directory. That assembly targets .NET 3.5

Resources