-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nuget 'PackageReference' not installing higher version of available packages #7430
Comments
Can you please clarify how are you trying to install it? Also by dotnet we emant the dotnet.exe, not the .NET Framework version you are using. |
Hi nkolev92, We are trying to install the required packages using the NuGetPackageManager from the VS2017 with the settings Packagereference as default selection. Please let me know if i can provide you any other details on this. Thanks, |
Are you using the UI? Can you give a step-by-step description of what you are doing, what your expectations are and what actually happens. |
I will try to document it, mean while can you please comment on below issue what we are facing very frequently Different things are happening here very frequently, not sure what is the root cause. We are facing an issue during installing a package using 'PackageReference' only and not with 'Packages.config', though the required package with latest version is available in the feed. |
Not sure what exactly your scenario is, but considering we haven't had any similar reports, I'd imagine it's as simple as you trying to install a package that doesn't exist in that feed as the error suggests. |
It seems to be bit difficult to explain via documentation here for you to explain my issues. Please advise |
@nkolev92 Restoring packages for C:\WORK\practice\NugetPackageRefDemo\ConsoleApp1\ConsoleApp5\ConsoleApp5.csproj... |
@nkolev92 Please let me know if i can provide you any other details on this. Attempting to gather dependency information for package 'MyPackage.3.0.0.1' with respect to project 'ConsoleApp1', targeting '.NETFramework,Version=v4.5.2' |
Please advise me if i need to update any nuget versions on my machine |
The packages.config logs seem to be doing a lot more than just that simple package. Make sure you are using the exact same sources for that. I see that you are using a private server, what's the host there? It could be a server side issue as well. |
Thanks @nkolev92 for your response. |
I'm sorry if I'm hijacking the thread, but the title is the same as I'm experiencing. Let me know if I should start a new issue. I'm seeing the same as @Rajkumar-Uppala : B. When referencing the package in a "semver" way (3.*), it does not pick the highest version, but rather the lowest within the range: This might be as expected, but I still don't understand it fully:
|
@koasol - Thanks for including your experience also here. |
@koasol The dependencies tree has the correct information. @Rajkumar-Uppala |
@nkolev92 Yes something similar to that |
@nkolev92 BTW.. how to verify the assests file?. |
The assets file has a targets section which is TFM based. It should be pretty self descriptive. |
We have started exploring the option of 'PackageReference' concept to our project.
Earlier we used 'Packages.config' to refer and install the required packages. which used to work fine.
Issue we are facing here with 'PackageReference':
Consider an example say i have a Custom Nuget Package with multiple versions in the repository
MyPackage.1.0.0.0
MyPackage.1.0.0.1
MyPackage.1.0.0.2
MyPackage.2.0.0.0
MyPackage.2.0.0.1
MyPackage.2.0.0.2
MyPackage.3.0.0.0
MyPackage.3.0.0.1
BasePackage.1.0.0.0
BasePackage.2.0.0.0
1)if i create a new console project and trying to install, it is taking a lower(MyPackage.1.0.0.0) or mid range version of package instead of available highest version of package(MyPackage.3.0.0.1)
2)if 'MyPackage' has a dependency on 'BasePackage', here also it is not correctly installing the latest available version (BasePackage.2.0.0.0)
I am not sure what i am missing to configure.
Could you please guide me how to solve these issues.
Details:
dotnet --4.5.2 version
VS version - VS2017 15.8.7
OS version - Windows7
The text was updated successfully, but these errors were encountered: