Using Async with MVC4 and Azure - azure

I'm watching this lecture http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2287 and on 14:08 he says that MVC4 has the Async feature. I have VS2010 with MVC4 beta installed, but doesn't have the Async available.
After doing some search I understaand that to use Async you need VS11 and what is more important that here https://www.windowsazure.com/en-us/develop/vs11/ they tell that Azure doesn't support VS11 projects yet.
This is very confusing because in the video he does not tell that I need VS11 and I can't tell from the UI if it is VS11.
So my question is there a way how can I TODAY use Async + MVC4 on Azure?

There's a CTP that you could install and which enables this feature in VS2010. It stays CTP though. The feature will be part of the .NET 4.5 framework and available with VS11.

If you need to use the new MVC 4 and .Net 4.5 features on Azure, please go to the Azure UserVoice site and vote for this feature: http://www.mygreatwindowsazureidea.com/forums/34192-windows-azure-feature-voting/suggestions/2598170-iis8-and-asp-net-4-5-support-in-azure-platform

Related

VS2017: why cannot select Azure Functions for NetCore?

So I researched a lot about trying to create an Azure Functions project. Downloaded latest extensions, updated my VS2017 community, etc.
I still only get two options NetFw and NetStandard.
How can I use NetCore as the target?
For now .Net Core TargetFramework is not supported yet.
See the comment from Azure Functions team.
We expect to have manual steps that you can try by mid October, and our goal is to have all relevant template/tooling updates complete and deployed by the end of October.
Update
v2 Function project with .NET Core TargetFramework(netcoreapp2.1) support has been available, make sure VS >= 15.8(right now 15.8.8) and Azure Function and Web Jobs Tools(On VS menus>Tools>Extensions and Updates) is latest(15.10.2046 right now).

Target .NET Core 2.0 with Azure Functions in Visual Studio 2017

Since Microsoft has released .NET Core 2.0 for Azure Functions a few days ago, I'm trying to understand how to create a new Functions project in VS2017 targeting .NET Core.
I've tried many configurations and still ended up with .NET 4.7.
Did anyone manage to create a new Function targeting .NET Core?
Thanks.
This is supported with the 1.0.5 release of the Microsoft.NET.Sdk.Functions package.
In your Azure Functions Project, do the following:
Update the Microsoft.NET.Sdk.Functions package version to 1.0.5
Right click on your project, click the Edit <projectname>.csproj option and modify the TargetFramework element value to netstandard2.0
This will should generate .NET Standard 2.0 assemblies with all the artifacts created by the Azure Functions tooling.
As of today I have been able to target .Net Standard 2.0 in a "reasonably" intuitive way and without editing any .csproj files.
You need a reasonably recent version of Visual Studio. I'm using Visual Studio Professional 15.5.3 (although I would guess that community would work).
You need to have the Azure development workload installed. This will install an extension called Azure Functions and Web Jobs Tools.
So far so plain vanilla. There were 2 additional bits that were to me not at all intuitive but ended up being very easy to do - easy when you know how!
You need to make sure that the Azure Functions and Web Jobs Tool is 15.0.31114.0 or greater - that's when they added .net core 2.0 support (see https://github.com/Azure/Azure-Functions/blob/master/VS-AzureTools-ReleaseNotes.md). You can update this using Tools/Extensions and Updates, or see https://marketplace.visualstudio.com/items?itemName=VisualStudioWebandAzureTools.AzureFunctionsandWebJobsTools
Even when you've done that, Visual Studio is a tiny bit weird about letting you create Azure Functions that target .net 2.0. When you go File/New Project, nothing has changed in the list of available project types, and if you select Azure Functions, the list of Frameworks just shows .NET Framework *, no .NET Standard, no .NET Core.
But if at this point you persevere and select Azure Functions, you then get a new dialog I hadn't seen before, which allows you to select Azure Functions v2 Preview (.NET Core).
Now, when I then look at the project properties, it turns out it is targeting .NET Standard 2.0, which in turn seems to contain Microsfot.NETCore.Platforms (1.1.0). So is this .net core 2.0 or not? Not quite sure but its' good enough for my purposes so now going to tuck into some coding.
Cheers!
For now, it's a manual process. You need to create .NET Standard 2.0 library, add function.json manually and run it with core tools.
the package Microsoft.NET.Sdk.Functions does not yet support .NET Standard 2.0 class libraries. This is the package that identifies a project as Functions project to Visual Studio and generates function.json from attributes during build.
You can still author C# class libraries that target .NET Standard 2.0, but you must use a manually-authored function.json. The templates for C# class libraries aren’t yet available in the Core Tools, but you can get a sample from GitHub.
from Develop Azure Functions on any platform
Update: 1.0.5 version of SDK should now support it, as mentioned by Fabio.

Using Azure packages with .NET Core / MVC

I'm exploring Core MVC 1.0.
Is it possible to use Azure nuget packages I've been using in the past in previous Web API projects? For example, I've been using Microsoft.Azure.Mobile.Server.Notifications which gives me extension methods on HttpConfiguration that I can use in my controllers like:
var pushClient = Configuration.GetPushClient();
But I understand HttpConfiguration no longer exists.
Is there any way to use Azure packages like this with MVC controllers, or should I just be waiting until they release versions that target .net core? If so, are they even working on this? I can find anything anywhere.
Technically you can work with ASP.NET Core packages targetting the Full Framework too. We have several apps that are targetting netcoreapp and others targetting net461 due to Azure packages, but both use ASP.NET Core packages. Of course, this is valid if your environment has the Full Framework (Azure App Service does).
You can see how both the netcoreapp and net46 versions go related to NetStandard here.
To achieve this, remove the Microsoft.NETCore.App from the dependencies and change netcoreapp1.0 to net461 on your frameworks declaration.
When the NetCore-compatible packages go live, just reverse the change and your app will keep working.
With regard to the Mobile Apps Server SDK support for ASP.NET Core, the work is on our backlog, but we don't have a timeline to share. This is partly because some of the dependencies (such as Asp.NET OData and OData) don't yet support ASP.NET Core.
In the meantime, you could try #matias-quaranta's answer for how to use both together.

MvvmCross using Xamarin newly supported Async

Now Xamarin officialy supports the new C# 5 Async keywords async and await, how could we use them in an MvvmCross project using PCL and what do we need to reference/install (Task<>, what PCL profile etc.)
regards,
Arthur
Async/await is available in PCL's targeting .NET 4.5 and Windows Phone 8 and Windows Store projects. This means something like Profile78 could be useful.
However, if you need to target Windows Phone 7 you will need to work your way around the licensing issues that come with using Microsoft.BCL, as it is only allowed to use that on Microsoft platforms. There is Async Bridge from this years Build conference, by Daniel Plaisted, which could help. I've had it working in my Xamarin projects.

Where is WCF Data Services in Visual Studio Express 2012 for Web

I watched EF4.1 and n-tier application video for Julie Lerman,
she added a new ASP.NET Empty Web Application project in the solution (VS 2010). After that she added a new item, WCF Data Service.
I can not find this item in Visual Studio Express 2012 for Web. Could you please help me? Is this a limitation in the express 2012 version?
Here is an image of what I can see in the Add New Item form
I can't post answer my question, so:
I should intall "WCF Data Services 5.2 RTM Tools Installer"
More details on WCF Data services blog.
Thank you.
Yes, you need to install "WCF Data Services 5.2 RTM tools installer". For the VS pro and ultimate versions, we chain in the installer for "WCF data Services - 5.0". For the express editions, customers need to install the version they need.
One thing to note - even in Pro/Ultimate editions, the version that gets installed is 5.0. For newer features (like the new JSON format), customers will require to install the latest bits so that they can get all the new code generation features.
Thanks
Pratik

Resources