Microsoft.ApplicationServer.HttpEnhancements reference missing - reference

I have opened a sample project where the highlighted reference is missing. I cannot find this reference in .net assemblies, and have had no luck googling it. Is this .net native or a third party API assembly?
Please help me in resolving this.

This assembly is provided by WebApi tools ( exactly the webapi.enhacements package) and you could get this assembly (and others) with nuget just by running this command:
Install-Package WebApi.Enhancements -Version 0.6.0
More info here.

Related

The type or namespace XXX could not be found(are you missing a using directive or an assembly reference?

I'm working on a project that targeting .NET 4.0 Framework. I added a reference to a third party dll file and call its methods in my code and have no error. But when I build the project it gave me The type or namespace error with blue underline on the methods of the dll. Using .NET Reflector I checked dll .NET Version of mscorlib.dll it is 4.0.0.0. My application Target .NET Version is 4.0 then Why I'm getting this error.
What I have done.
Remove all references to the library. Clean the project. Restart the project. again add the references. Not good in English please guide me. Stuck in it last 4 days.
Check if you have privileges to access the dll file. Then try running Visual Studio as administrator. If it does not help try to build the solution as 64x/86x not Any CPU.

Why project cannot find references for WebJobs.Core?

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.

Xamarin.Forms Failed to resolve assembly stateless error

After upgrading to the latest version of Xamarin.Forms (2.3.3.175) my iOS project throws the compilation error
Failed to resolve assembly: 'Stateless, Version=2.5.53.0, Culture=neutral, ...' (MT2002) in File MTOUCH and Path MTOUCH
The shared code is in a PCL library targeting PCL 4.5 - Profile78
So far Google search hasn't returned anything.
Anyone encounter this yet? Appreciate any help in resolving this.
I am using Xamarin Studio Community Edition version 6.1.2 (Build 44)
You are likely using couchbase lite. Stateless is an assembly required by couchbase lite. It seems it cannot be resolved if used in a pcl project. You can read something about this problem here. A couchbase developer states that
The strategy has changed since then. We won't be supporting PCL but instead we aim to support .NET Standard 2.0 when it is ready.
Hope this helps.
Xamarin.Forms has NO dependency on an assembly named Stateless of any sort. Check your dependencies, and your dependencies dependencies...

Cannot add Microsoft.Azure.Devices to ASP.NET 5 project: can't find fx/System.Net.Http.Formatting

When adding the Microsoft.Azure.Devices NuGet package (I've tried 1.0.0, 1.0.2, and 1.0.4) to an ASP.NET 5 (Web API 2) project, the reference to System.Net.Http.Formatting is marked as not resolvable with
NU1001 The dependency fx/System.Net.Http.Formatting could not be resolved
There are several NU1001 issues out there, but none whose causes seem to map to this one. The best reference is this one on Github, but the resolution details were sketchy.
The reference DLL is indeed marked as Copy Local when the package is brought into a 'legacy' assembly package, so I can see why it might not find it, but can't determine the right way to fix it.
In my actual use-case, Microsoft.Azure.Devices is being referenced by a .NET assembly package and THAT is then included as a project reference in the ASP.NET 5 project, and indeed that gives the same error as trying to directly reference the NuGet from the ASP.NET 5 project.
We're using dnx452 as the only framework referenced in the project.json file.
I tried this with version 1.0.5 and it installed successfully for me.

Microsoft.Threading.Tasks.Extensions in Xamarin Mono projects

I have built a NuGet package for my Simple.OData.Client with support for Xamarin Android and iOS. This library uses Microsoft.Bcl.Async. Tests using Android and iOS simulator went OK, but when I install this new NuGet package into another project, it fails to compile Droid/Touch projects with the following message:
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(720,2): error : Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'Microsoft.Threading.Tasks.Extensions, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile?
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(720,2): error : File name: 'Microsoft.Threading.Tasks.Extensions.dll'
Of course there is no Microsoft.Bcl.Async pack (yet) for Mono platforms, on the other hand since the library tests pass on these platforms, I guess this more of a challenge to make Visual Studio happy rather than do some code modification.
Has anyone managed to use on Mono PCLs dependent on Microsoft.Bcl.Async?
Generally, if the code in your package depends on another NuGet package, you need to declare a package dependency so that anyone installing your package will get the one you depend on too. That should take care of issues like this.
However, in this case it is a lot more complicated. Since Microsoft.Bcl.Async doesn't support Mono platforms, you can't declare that package dependency (or if you did it would always fail to install). Unfortunately the license for Microsoft.Bcl.Async restricts it to "Windows platforms". I'm not a lawyer but I think that means you shouldn't distribute Microsoft.Threading.Tasks.Extensions.dll as part of your package. Finally, there's no official PCL support for Mono platforms yet, so if you do come up with a solution that works now it may change when official PCL support comes out.
If you want to attempt getting this to work, what you basically need to do is create your own DLLs with the same names as are in Microsoft.Bcl and Microsoft.Bcl.Async for use on Mono platforms. In those assemblies, put type forwards for the types that Mono already implements (which should probably be the types in the System.* DLLs), and create an implementation of your own for the other ones (the AsyncBridge source code is useful for this). This is what I did for one of my BUILD 2012 PCL demos. The code for that is here. AsyncFacades and AsyncBridge are the relevant projects.
For those stumbling into this issue when getting the Simple.oData.Client from nuget, just install the following packages from nuget:
Microsoft Bcl Async Portable
Microsoft Bcl Async
I believe I've found the problem.
Earlier I had the following line in Simple.OData.Client nuspec file:
<file src="Simple.OData.Client.Core\bin\Release\Microsoft.Threading.Tasks.Extensions.dll" target="lib\portable-net403+win8+sl5+wp8+MonoAndroid16+MonoTouch40\Microsoft.Threading.Tasks.Extensions.dll" />
This is not how it should be because Microsoft.Bcl.Async should have taken care of copying Tasks.Extensions.dll. I reported this to Microsoft and expected this to be fixed in the RTM version of Microsoft.Bcl.Async. Apparently it was not, so all NuGet packages dependent on Microsoft.Bcl.Async should still copy this file. Then it will work.
for who has the same issue I think you can downgrade
System.Threading.Tasks.Extensions 4.4.0

Resources