OpenSSL Nuget package not installing in VS 2015 - visual-studio

I am trying to install the OpenSSL Nuget package in VS 2015.
I get the error:
Attempting to gather dependencies information for package 'openssl.1.0.2.1' with respect to project 'BLL', targeting '.NETFramework,Version=v4.5'
Package 'openssl' is not found in the following primary source(s): 'https://api.nuget.org/v3/index.json'. Please verify all your online package sources are available.
========== Finished ==========
I also tried running
Install-Package openssl
from the Package Manager Console, but it did not work. It downloaded the "openssl.1.0.2.1.nupkg" file to my packages directory, but there are no other files.
Has anyone else run into this?

The OpenSSL package used for C++ project. And I get the same issue with you when installing the version 1.0.2.1. Then I download the OpenSSL package to local and open it with NuGet Package Explorer, I don't find any content files in this package.
I have submit this issue to OpenSSL package. Please add your comments to this feedback and please waiting response from the owner patiently.
https://github.com/openssl/openssl/issues/1865
But when install the OpenSSL package 1.0.2, it doesn't get any error. So I suggest you install the version 1.0.2 in your project.

Related

Failed to install ClosedXML dependency

I need to install ClosedXML dependency to build a C# project with .net framework 4.7.2 but when trying to install I always get the same error: "Cannot resolve dependency 'SixLabors.Fonts'. Sources used: 'nuget.org', 'Microsoft Visual Studio Offline Packages'"
I have tried everything to install from the nuget package manager
What version are you trying to install? I think you should install SixLabors.Fonts first and then install ClosedXML, as the newer versions of ClosedXML depend on it.
I faced the same proplem when trying to install ClosedXML today. ClosedXML depends on the SixLabors.Fonts library which is only available in beta at the moment.
To find the library with the NuGet Browser, make sure to check the "Include prerelease" box. You should then be able to find it listed below. After installing SixLabors.Fonts, you should be able to install ClosedXml without any further issues.

Nuget Visual Studio 2022 control dependency version

Whenever I try to install any package from Nuget through Visual Studio 2022 - be it the GUI or package manager console, I can't seem to find a way to get the highest dependency version.
For example: if I add latest version 1.0.152 protobuf-net.Grpc to my project it has a dependency on Grpc.Core.Api >= 2.36.1. The current version for Grpc.Core.Api is 2.46.3...
In the GUI under options I have no option to control dependency version what so ever it seems like the Install-Package cmdlet doesn't obey -DependencyVersion Highest:
Install-Package protobuf-net.Grpc -DependencyVersion Highest
Installing NuGet package protobuf-net.Grpc 1.0.152.
Committing restore...
Successfully installed 'Grpc.Core.Api 2.36.1'
Successfully installed 'Microsoft.NETCore.Platforms 2.1.0'
Successfully installed 'protobuf-net 2.4.6'
Successfully installed 'protobuf-net.Grpc 1.0.152'
Successfully installed 'System.Memory 4.5.3'
Successfully installed 'System.Private.ServiceModel 4.5.3'
Successfully installed 'System.Reflection.DispatchProxy 4.5.0'
Successfully installed 'System.Security.Principal.Windows 4.5.0'
Successfully installed 'System.ServiceModel.Primitives 4.5.3'
How can I force Nuget to install the highest dependencies version?
According to your description here are some suggestion:
First check your project type “-DependencyVersion Highest” only used in packages.config format.
You can see the project type support about two package management formats: Projects.config and PackageReference.
Someone posted a similar issue on github, see the issue here. Hope this help you.
If you want to use “Grpc.Core.Api 2.46.3 “, you can try to delete the bin and obj folder and then go to Tools>Options>Nuget Package Manager>General>Clear All Nuget Caches.
Then you can install Grpc.Core.Api 2.46.3 package before install protobuf-net.Grpc 1.0.152

The specified task executable location ......csc.exe is invalid error

I have a project on TFS that is working on everyone else's machine, except mine. When building I get the error that can be seen in the image. "The specified task executable location csc.exe is invalid." currently trying to repair VS 2017 now.
Based on the message, seems the csc.exe is damaged.
Just try below things to narrow down the issue:
Navigate to the Microsoft.Net.Compilers package location, delete
the package folder, then rebuild. Generally the package will be
restored automatically during the build.
YOUR_PROJECT_DIR\packages\Microsoft.Net.Compilers.2.6.1
Uninstall and Re-install the Microsoft.Net.Compilers package:
Open Visual Studio
Go to Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution
Go to Installed tab and find Microsoft.Net.Compilers package
Uninstall the package from your project
Try to build your project now. (Thus it will use the default compiler which lives in the .NET framework folder:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe)
If you really need the Microsoft.Net.Compilers package then go ahead and find it in the Browse tab and install the latest stable
version.
Build the project and if everything works, make sure you commit changes to your code repository.
You can also try to run below command to uninstall and reinstall the
Nuget packages from the Package Manager Console: See Microsoft.Net.Compilers
Uninstall-Package Microsoft.Net.Compilers -Version 2.6.1
Install-Package Microsoft.Net.Compilers -Version 2.6.1
Remove Microsoft.CodeDom.Providers.DotNetCompilerPlatform and Microsoft.Net.Compilers Nuget Packages.
Installing MSBuild 2015 will resolve the issue.
https://www.microsoft.com/en-us/download/confirmation.aspx?id=48159
I hit this question even though my error was "The specified task executable csc.exe could not be run" when pulling down existing web project with unit tests and trying to run it locally for the first time.
I was able to resolve this by building each project individually in my solution.

Can't install nugget package I made because package is not found

I created a nugget package that contains 5 dll that I want to use as dependencies for some projects. I created a package source to C:\Users\fernane\Desktop\test via Visual Studio so I can select and install my packages from that directory. The package named test 1.4.0.nupkgis in that folder.
The problem I have is that when I try to install said package (test), I get the following error :
Package 'test 1.4.0' is not found in the following primary source(s): 'C:\Users\fernane\Desktop\test'. Please verify all your online package sources are available (OR) package id, version are specified correctly.
I created the package using Nuget Package Explorer.
ID of the package : test
Version : 1.4.0
My question is the following : Why do I get this error and how can I install my package?
Thank you and have a nice day.
My question is the following : Why do I get this error and how can I install my package?
Make sure you've "all" source selected in Package Manager Console and then try update-package command:
Alternatively, you can install that package via Manage NuGet Package UI, Right click your project->Select Manage NuGet Package->change the Package Source to your local feed->find the pacage, install it:

Can't Install NuGet packages that require Newtonsoft.Json.10.0.1 in Visual Studio 2015

I've been having problem installing NuGet packages that require Newtonsoft.Json.10.0.1
I just recently installed it and when ever I try installing packages that need it, I get this error:
Severity Code Description Project File Line
Error An error occurred while retrieving package metadata for 'Newtonsoft.Json.10.0.1' from source 'C:\Users\Sharon Umute\documents\visual studio 2015\Projects\sermon\packages'. 0
I tried upgrading to Newtonsoft.Json.10.0.2 and adding the path to Environment Variables but I keep getting the same error.
I've checked the path, the Newtonsoft.Json.10.0.2 folder contains lib, tools, and Newtonsoft.Json.10.0.1.nupkg.
I'd really appreciate some help with this.
I had a similar problem when installing System.Net.Http. Simply remove the line that references Newtonsoft.Json in packages.config. It solved my problem
I had this issue when trying to upgrade my packages and resolved it by upgrading to Newtonsoft.Json version 10.0.1.
In package manager run:
Install-Package Newtonsoft.Json -Version 10.0.1
After that, all my other packages were able to update.
open packages.config, delete <package id="Newtonsoft.Json"..>, then refresh it

Resources