How to use XPathSelectElement in .Net Core 1.0? - c#

In .Net 4.X, this extension method is under System.Xml.XPath.
However I'd like to know how could I find/use it in .Net Core? I have a class library.
The porting tool doesn't show anything about XPathSelectElement.
Or maybe any replacement in .Net core?
Thanks a lot!

You need to add package System.Xml.XPath.XDocument 4.0.1. This package provides extension methods that add System.Xml.XPath support to the System.Xml.XDocument package.
Run below command in Package Manager Console.
PM> Install-Package System.Xml.XPath.XDocument -Version 4.0.1
You can also install it from NuGet package manager having version NuGet 2.12 or higher.

As suggested by Lex Li, we could use this website to search the package name. In my case it is: System.Xml.XPath.XDocument.

Related

How can I install Naudio Nuget package in C# WPF

There is no Naudio version for my .net 4.5 project. I need to install it but it says
"Error Could not install package 'NAudio 2.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', 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."
NAudio 2.0.0 targets .NET Standard 2.0. which is not supported by .NET 4.5.
.NET implementation support
You have two options:
Change the target framework of you project to at least .NET 4.6.1 but recommended version is .NET 4.7.2
Install NAudio 1.10.0 instead of 2.0.0. NAudio 1.10.0 supports .NET 3.5+
You need to install the previous version like by running this command in package manager console Install-Package NAudio -Version 1.10.0

Farsi.Library 2.7.0 Fails to install

I tried to install Farsi.Library 2.7.0 through the NuGet Package Manager Console.
But following error occurs:
Install-Package : Could not install package 'Farsi.Library 2.7.0'. You
are trying to install this package into a project that targets
'.NETFramework,Version=v4.5.2', 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.
According to his blog entry all versions of this library beyond and including version 2.6 are based on .NET Framework 4.6 - somehow this fixes a few bugs with the persian calendar. This is why the installation fails for you.
Install version 2.5.1.5, the latest version of this library which is based on .NET Framework 2.0, to bypass this.
Or upgrade your project to .NET Framework 4.6 or later.
Install-Package Farsi.Library -Version 2.5.1.5

XDocument extension method XPathSelectElement not found in .NET Core [duplicate]

In .Net 4.X, this extension method is under System.Xml.XPath.
However I'd like to know how could I find/use it in .Net Core? I have a class library.
The porting tool doesn't show anything about XPathSelectElement.
Or maybe any replacement in .Net core?
Thanks a lot!
You need to add package System.Xml.XPath.XDocument 4.0.1. This package provides extension methods that add System.Xml.XPath support to the System.Xml.XDocument package.
Run below command in Package Manager Console.
PM> Install-Package System.Xml.XPath.XDocument -Version 4.0.1
You can also install it from NuGet package manager having version NuGet 2.12 or higher.
As suggested by Lex Li, we could use this website to search the package name. In my case it is: System.Xml.XPath.XDocument.

Add ServiceStack.Interfaces with Nuget version 3.9.7.0

I used Nuget to install ServiceStack.Text,ServiceStack.Client and ServiceStack.Common in version 3.9.7.0.
When trying to install ServiceStack.Interfaces version 3.9.7.0 it couldn`t find it.
If i still need the specific version of 3.9.7.0 what should i do?
I prefer to manage all my packages threw nuget..but if won`t have a choise i will use different solution.
In ServiceStack v3 the ServiceStack.Interfaces.dll was maintained in the ServiceStack.Common NuGet package, so to install a specific version of ServiceStack.Interfaces from NuGet you can specify the version you want:
Install-Package ServiceStack.Common -Version 3.9.70
See the v3 installation docs for other NuGet instructions.
The ServiceStack.Interfaces library for ServiceStack v3 was reset to 1.0.0.0 when v4 was released, in this commit.
You can see the version information for the library here:
https://github.com/ServiceStack/ServiceStack/blob/v3/src/ServiceStack.Interfaces/Properties/AssemblyInfo.cs

Simple Membership and .net Framework 4.0 asp webforms

I search alot but i did not find any useful answer.
can i use Simple Membership with .net Framework 4.0 in asp webforms ?
because when im trying to install Microsoft.AspNet.WebPages.WebData through Nuget it tells me:
install-package : Could not install package 'Microsoft.AspNet.WebPages.Data 3.1.2'. You are trying to install this
package into a project that targets '.NETFramework,Version=v4.0', 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.
If i can use it please someone tell me how i should add this on my exist project.
thank you
From the nuget command line, execute the following:
Install-Package Microsoft.AspNet.WebPages.Data -Version 2.0.20710
The 2.0.20710 package contains the .NET 4.0 referenced WebMatrix.Data.dll.

Categories