Using HtmlAgilityPack NuGet package in dotnet core v1.0 - amazon-web-services

I am trying to use HtmlAgilityPack nuget package in netcoreapp1.0 (I am restricted to this version since AWS Lambda supports only it). Which version of the HtmlAgilityPack package should I use? The point is .NETStandardLibrary 1.6.0 is only compatible with netcoreapp1.0 but I don't see any version of HtmlAgilityPack which would be compatible with .NETStandardLibrary 1.6.0. The minimum version I can see is .NETStandardLibrary 1.6.1 but this is for netcoreapp1.1.

From a .NET Standard API prospective nothing changed between NETStandard.Library 1.6.1 and 1.6.0. We only bumped the version of the meta-package so that we could pull in newer versions of the dependent packages which contain implementation fixes but no real new API surface for NS1.6.
See the issue #171 in DotNet standard repo What's the change in NetStandard.Library 1.6.1 vs 1.6.0?
Even if there will be no HtmlAgilityPack compatible (or build against) netstandard1.6, but there is a netstandard1.6.1 I would just build it for myself by replacing netstandard v1.6.1 nuget package with netstandard v1.6 package ( HtmlAgilityPack is open source - right :) ).
Most importantly there is no netstandard1.6.1, it was never released or even worked on, v1.6.1 stands only for the version of NETStandard.Library NuGet package.

Related

VCPKG versions of packages

is there possibility how to install older version of packages by using vcpkg install?
I found that there is a file in versions/baseline.json, but even if I change the version of the package there, it always install the newest one.
Maybe https://github.com/microsoft/vcpkg/blob/master/docs/specifications/versioning.md is what you are looking for. Be aware you need to pass an additional flag to vcpkg to activate that feature. It also only works in manifest mode and not in classic mode.

How do I get VS 2017 to install the dependencies for packages that I am trying to install?

I was following a Lynda tutorial that was showing how to add versioning to my APIs. It told me to install the NuGet package Microsoft.AspNetCore.Mvc.Versioning. I tried that and it gave me an error because it needed Microsoft.AspNetCore.Mvc.Core. So I tried to install that package, and, again, another error because it needed another package.
So I started googling for a way to make VS 2017 pull in dependencies with NuGet installation. None of the answers that I found were helpful. I’ve tried managing as packageReference and packages.config. “Allow format selection on first package install” is unchecked. And so on.
So I decided to just power through and add all the dependencies manually. I had to install 29 packages. It took me over half an hour, not including time spent chasing the cat up and down the stairs screaming at the top of my lungs.
Is there some switch I forgot to flip, or some options I didn't add, or does Microsoft really think we might want the option to install a package without installing its dependencies?
How do I get VS 2017 to install the dependencies for packages that I am trying to install?
I have reproduced this issue on my side. This is the correct behavior for nuget. That because the package which you want to install have a indirect dependency Microsoft.AspNetCore.Authentication.Abstractions (>= 2.2.0).
Note: (Version need >= 2.2.0).
However, the default package for the .net core API project also have same indirect dependency Microsoft.AspNetCore.Authentication.Abstractions (>= 2.1.1 && < 2.2.0) with version limit (>= 2.1.1 && < 2.2.0).
Note: version limit (>= 2.1.1 && < 2.2.0).
It conflict with dependency of package Microsoft.AspNetCore.Mvc.Versioning. That the reason why nuget not install the dependencies for package.
To resolve this issue, we just need to update the target framework (Right click project->Properties->Target Framework) from .NET Core 2.1 to .NET Core 2.2 for your .net core API project.
If you do not have the version 2.2.0, please download it from here and install it:
.NET SDKs for Visual Studio
After update the target framework to 2.2, the default package Microsoft.AspNetCore.App will be update to Microsoft.AspNetCore.App 2.2.0, which dependency update to Microsoft.AspNetCore.Authentication.Abstractions(>= 2.2.0 && < 2.3.0). So it compatible with the dependencies of the package Microsoft.AspNetCore.Mvc.Versioning 3.1.1.
Now I can install the package Microsoft.AspNetCore.Mvc.Versioning 3.1.1 with its dependency.
Hope this helps.

Why does opencv on Canopy downgrade numpy, scipy, and other packages when I try to install it?

On my package manager for canopy, every time I try to download opencv it downgrades several other important packages. I am then not able to upgrade those same packages or run my code. How can I download opencv without downgrading my other packages?
You haven't provided any version or platform information. But perhaps you are using an old Canopy version (current is 2.1.9), or perhaps you are using the subscriber-only "full" installer, which is only intended for airgapped or other non-updateable systems. Otherwise, the currently supported version of opencv is 3.2.0 (build 3.2.0-4) which depends on numpy 1.13.3, which is the currently supported version of numpy.

Package X is not compatible with netstandard2.0

I created a .NET Standard v2.0 project in Visual Studio 2017 v15.3.1 and I'm unable to install "Microsoft.EntityFrameworkCore 2.0.0" package in it (by Nuget 4.3). Previously the .NET SDK and Runtime, both 2.0.0, were installed.
The errors I get follow this pattern:
"Package X is not compatible with netstandard2.0 (.NETStandard,Version=v2.0)." (i.e. System.Reflection.TypeExtensions 4.1.0).
What could it be causing these errors?
EDIT: I'll show the exact warnings and errors with an example (there are too many).
Restoring packages for [.csproj path]...
Warning:
Package "System.Collections 4.3.0" was restored using ".NETFramework,Version=v4.6.1" the project target framework ".NETStandard,Version=v2.0". This may cause compatibility problems.
...
Error:
Package Remotion.Linq 2.1.1 is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Package Remotion.Linq 2.1.1 supports:
net35 (.NETFramework,Version=v3.5)
net40 (.NETFramework,Version=v4.0)
net45 (.NETFramework,Version=v4.5)
netstandard1.0 (.NETStandard,Version=v1.0)
portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259)
...
Error restoring package. Reverting package changes for 'ClassLibrary1'.
Time elapsed: 00:00:02.4689637
========== Ended ==========
Clicking the "Clear all Nuget Caches" will resolve issue.
Issue solved installing, independently, newer versions for each of the packages' dependencies which were showing error, so that the big package "Microsoft.EntityFrameworkCore 2.0.0" gets installed at last.
Hope it helps.
Edited: It happened to me another time and tried a faster solution. The key was deleting Nuget's cache from the packages' manager configuration.

What is Podfile.lock in our Xcode projects and why is it used?

I am a beginner in using pods in Xcode projects. I have been confused by Podfile.lock. I want to update a framework "OBJECTMAPPER" to 2.0 to make it compatible with Swift 3. However it doesn't.
Why doesn't it update to the latest version (2.0)? Does it have anything to do with Podfile.lock? Which is as follows ->
and why is it used?
Update: The Podfile
Just In case any one is wondering the same i did 2 years ago. I will tell a small description. When u install a library with cocoapods you will be generated a podlock against it with the version which it(The library) is installed. For example suppose you have library named "XX" and you install it with pods. if the latest version of "XX" is 2.0.0, then u will be installed the latest version and podfile.lock is locked with -(XX - (2.0.0))
Suppose if a new version is released of that library and u dont want it's updates to be installed in our project then use pod install.. This will only install any new library in podfile and will not affect your existing library by updating them to latest code.("This prevents some functions of that library which you have used to not disappear if they have depricated it").This is monitored by podfile.lock
If you want to update "XX" to a newer version in future use pod update for that library
pod install will not update ObjectMapper to the latest version because there is no reason for it to do so. ObjectMapper is included as a dependency to UberRides and version 1.5.0 satisfies the requirement which is 1 or above.
In order to force an update you can add ObjectMapper to the podfile with the required version, e.g.
pod 'ObjectMapper', '2.0'