Latest nuget packge for FluentAssertions missing System.Xml references - fluent-assertions

FluentAssertions nuget package for 1.7 seems to be missing the references for System.Xml and System.Xml.Linq
Is anyone else experiencing this problem?

If you get the latest NuGet package (1.7.1.1), you'll find that your problem is fixed now.

Related

Could not load file or assembly 'Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60

After adding some nuget packages, my asp.net core app has stopped working and started to generate this error once deployed to Amazon windows server [Works OK on my dev machine (as always :-)].
Visual Studio: 2019
Target Framework: netcoreapp3.1
Installed: dotnet-hosting-5.0.7 + dotnet-sdk-5.0.401
in my deps.json file, the Microsoft.Extensions.Options always appear in the right version (3.1.10) and never in 5.0.0 version.
Any ideas where the problem might come from?
I had similar issue. The error is:
FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.Options, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The system cannot find the file specified
The fix: upgrade Microsoft.Extensions.Options in Nuget from version 2.x.x to latest version (version 5.0.0) and delete all obj and bin folders and rebuild.
My projects are on .NET Framework 4.7.2. When Microsoft.Extensions.Options get updated, several other Nuget packages that were also on version 2.x.x also got updated.
After uninstalling most of the Nuget packages and reinstalling them with the right version, the problem was resolved.

install System.Net.Http to .net framework 4.0 project

I need use AuthenticationHeaderValue for getting token
var token = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", Convert.ToBase64String(Encoding.UTF8.GetBytes($"{username}:{password}")));
so I have to install System.Net.Http package but when I install it via package manager console it give that error
what should I do?
what is AuthenticationHeaderValue alternative?
Could not install package 'System.Net.Http 4.0.0'. 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.
Install System.Net.http version which is compatible to your .Net Framework

'MySql.Data' already has a dependency defined for 'System.Text.Encoding.CodePages' [duplicate]

I'm trying to add AutoMapper as a dependency to a project using NuGet on Visual Studio Premium 2012, but it fails.
It says:
Operation failed
'AutoMapper' already has a dependency defined for
'Microsoft.CSharp'.
I'm able to add other dependencies.
I'm using the last version of the package manager for VS 2012:
NuGet Package Manager 2.8.60318.667
Any ideas what should I check?
The problem is that your NuGet Package Manager is too old. You need NuGet 2.12 since this supports the newer .NETStandard frameworks that the AutoMapper 5.0.1 NuGet package is using.
The AutoMapper has a group dependency which specifies a target framework of .NETStandard. Since your version of NuGet Package Manager is too old it does not recognise this target framework and converts it to an Unknown target framework and you end up with duplicate frameworks since there .NETStandard is used a few times in that NuGet package. This causes the error:
'AutoMapper' already has a dependency defined for 'Microsoft.CSharp'
Unfortunately NuGet 2.12 is not available for Visual Studio 2012 but is available for Visual Studio 2013.
So either you need to update to Visual Studio 2013 or above, or you will have to use the older AutoMapper NuGet package which does not support .NETStandard.
Seems to be a problem with the current version of automapper:
AutoMapper 5.0.0 Tuesday, June 28, 2016
I tried with the previous version and it works:
PM> Install-Package AutoMapper -Verbose
Install-Package : 'AutoMapper' already has a dependency defined for 'Microsoft.CSharp'.
At line:1 char:16
+ Install-Package <<<< AutoMapper -Verbose
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
PM> Install-Package AutoMapper -Version 4.2.1
Installing 'AutoMapper 4.2.1'.
Successfully installed 'AutoMapper 4.2.1'.
So, if you can't update NuGet Package Manager, the answer is:
PM> Install-Package AutoMapper -Version 4.2.1
I ended up needing to update NuGet.exe that was included in the solution to be able to build NuGet packages by running:
nuget.exe update -self
I had the same issue on VS2013. I had to update to VS2013 Update 5 and get the latest nuget distro for VS2013 at
https://dist.nuget.org/visualstudio-2013-vsix/v2.12.0/NuGet.Tools.vsix
Once that was done, I rebooted Visual Studio. After that I was able to use the Automapper 5.0.2 package
Go to Visual Studio > Tools > Extension and Updates
Find Updates in left accordion menu, Go to Visual Studio Gallery.
You will find a update for Nuget.
Update the nuget package and try installing or builing the project.
Thanks,
GT
An other workaround if you're stuck with VS2012 and the old Nuget version:
Find the Cache folder of VS 2012's Nuget Package Manager (with Tools - Options - Nuget Package Manager)
Open AutoMapper.5.x.x.nupkg with your favorite Zip Tool
Modify the file AutoMapper.nuspec - I simply deleted all dependencies except .NETFramework4.5
Add the cache folder as a Nuget source (also in Tools - Options - Nuget Package Manager)
Install Automapper either with the console or the GUI but make sure to choose first the newly added cache folder as package source.
Of course, the next version of Automapper probably needs to be adapted, too, in order to install it.
This looks like a mismatch between the .NET version used by the Automapper package and your project. Can you confirm the .NET version that your project is using?
Automapper 6.0.2 - nuget 2.8.8 gives this error. Needed to update to 3.4.4 to get this working.
Removed both CSharp and AutoMapper. Installed CSharp (4.0.0.0) first and then added Automapper (6.1.1.0). This resolved the problem for me.
I observed this exact problem when opening a project with Visual Studio 2010.
After opening with VS2017, I was able to install AutoMapper without any error.

ASP.NET 5 Class Library (Package) fails to create

I'm adding a new project as Class Library (Package) to my solution and I'm getting errors in project.json.
.NET Platform 5.4 error NU1001: The dependency Microsoft.CSharp >= 4.0.1-beta-23516 could not be resolved.
.NET Platform 5.4 error NU1001: The dependency System.Collections >= 4.0.11-beta-23516 could not be resolved.
1>C:\Projects\iSeekDevelopments\Source\ISeek.MyProperty.Core\project.json(15,24,15,24): .NET Platform 5.4 error NU1001: The dependency System.Linq >= 4.0.1-beta-23516 could not be resolved.
.NET Platform 5.4 error NU1001: The dependency System.Runtime >= 4.0.21-beta-23516 could not be resolved.
.NET Platform 5.4 error NU1001: The dependency System.Threading >= 4.0.11-beta-23516 could not be resolved.
Why does it try to reference 4.0.11-beta-23516?
How could it be fixed?
Running dnu restore fixed the issue.

Nuget External packages cannot depend on packages that target projects

When I attempt to Install-Package Twitter.Bootstrap in an empty mvc4 web project I get this
Install-Package Twitter.Bootstrap
Attempting to resolve dependency 'bootstrap (≥ 3.0.1)'.
Attempting to resolve dependency 'jquery (≥ 1.9.0)'.
Install-Package : External packages cannot depend on packages that target projects.
At line:1 char:1
+ Install-Package Twitter.Bootstrap
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
What can I do to fix this
?
I had the same problem, this work for me:
Install-Package Bootstrap
"As of v3.0.1.1 the Twitter.Boostrap package will begin redirecting users to the Bootstrap package managed by the Outercurve foundation. The reason for this move is pretty simple. Bootstrap is a cleaner namespace since the project dropped the twitter name a few releases ago and Bootstrap now officially ships with the Visual Studio 2013 ASP.Net templates. So to avoid confusion on which release is "official", we've agreed to redirect everyone over to the new Microsoft maintained namespace."
http://chriskirby.net/bootstrap-nuget-package-moving-to-outercurve/
https://github.com/sirkirby/twitter-bootstrap-nuget/issues/22
I encountered the same error with both VS 2010 and VS 2012. The suggested solution did not solve the problem, but I did notice that the NuGet Package for Bootstrap is dated Nov 1, 2013 (yesterday). The new package has version number 3.0.1.1 and it lists a dependency of Bootstrap version 3.0.1 or higher. It appears there is an error in version 3.0.1.1 of this package with a circular reference in the dependency. Look for version 3.0.1 by the same authors.
I am assuming you are using Visual Studio 2012. In VS2012 new MVC4 projects are loaded with jquery 1.7 by default. But Bootstrap 3.0.1 has a dependency on jquery 1.9 or higher
So first run
update-package jQuery
and then
install-package twitter.bootstrap
I had the same problem. After I updated NuGet Manager, it solved by problem. To update NuGet Manager, you can to Tools -> Extensions and Updates
I had the same problem when installing Bootstrap 3.0.1.1. It does look like it is looking for 3.0.1 for its dependency. I at the end installed 3.0.0 with no problem.
I had this same problem that brought me to this question. In Package Manager I searched for bootstrap and there were several results returned.
I clicked on the on at the top of the list and tried to install this one (version 3.0.1.1) and received the error reported in the original question. The ID of this package is Id: Twitter.Bootstrap
There was another Bootstrap package listed with version 3.0.2 with Id: bootstrap
I installed the second one v. 3.0.2 and this installed without any issues.
Taken from fontawesome:
"The folks at Outercurve have taken over support for the Twitter.Bootstrap package now being called simply bootstrap.
More info here http://chriskirby.net/bootstrap-nuget-package-moving-to-outercurve/"
It would seem to me that the redirect to the new Microsoft maintained namespace is causing this to happen.
My Problem perfectly solved
Try
Install-Package Bootstrap
Instead of
Install-Package Twitter.Bootstrap
refered post:
Bootstrap v3.0.1.1 fails on clean VS empty project - how to resolve?$privUrl
how to launch Package Manager console
http://docs.nuget.org/docs/start-here/using-the-package-manager-console
just try installing Twitter bootstrap MVC with NuGet Package Manager and enjoy
Just try update vs2012 !I resolved it!
I updated VS2012 to VS2013. It resolved the problem
I also had the same issue. But resolved when updated the Nuget Manager and tried again after that.