Unable to find package Telerik.UI.for.Xamarin with version(>=2022.1222.1) - macos

We have a Xamarin project, and we need to start debugging on MAC. We use the MacInCloud Service.
After cloning the project from source control, I encounter the following error -> Unable to find package Telerik.UI.for.Xamarin with version(>=2022.1222.1). It appears as soon as the project is cloned and with the the 'Could not restore packages'.
What options do I have to resolve this issue?
I have tried removing the the package from the Packages directory and removed the reference in the csproj aswell.
I can't do a manual install of telerik as we do not have admin rights on MacInCloud.
The log file >This is the entire log file - Getting restore information for project /Users/user219905/Documents/GitHub/gts-mobile/GtsApp/GtsApp/GtsApp.csproj
Getting restore information for project /Users/user219905/Documents/GitHub/gts-mobile/GtsApp/GtsApp.iOS/GtsApp.iOS.csproj
Getting restore information for project /Users/user219905/Documents/GitHub/gts-mobile/GtsApp/GtsApp.Android/GtsApp.Android.csproj
Running restore with 4 concurrent jobs.
Reading project file /Users/user219905/Documents/GitHub/gts-mobile/GtsApp/GtsApp/GtsApp.csproj.
Restoring packages for /Users/user219905/Documents/GitHub/gts-mobile/GtsApp/GtsApp/GtsApp.csproj...
Restoring packages for .NETStandard,Version=v2.0...
GET https://api.nuget.org/v3-flatcontainer/telerik.ui.for.xamarin/index.json
GET https://nuget.devexpress.com/xRMAAuTIJGNTlKc1O83zlgVKkkr2ibgsDfUBelIIfu3Oq2Ku77/api/FindPackagesById()?id='Telerik.UI.for.Xamarin'&semVerLevel=2.0.0
GET https://api.nuget.org/v3-flatcontainer/telerik.ui.for.xamarin.datagrid/index.json
GET https://nuget.devexpress.com/xRMAAuTIJGNTlKc1O83zlgVKkkr2ibgsDfUBelIIfu3Oq2Ku77/api/FindPackagesById()?id='Telerik.UI.for.Xamarin.DataGrid'&semVerLevel=2.0.0
NotFound https://api.nuget.org/v3-flatcontainer/telerik.ui.for.xamarin.datagrid/index.json 172ms
OK https://api.nuget.org/v3-flatcontainer/telerik.ui.for.xamarin/index.json 173ms
OK https://nuget.devexpress.com/xRMAAuTIJGNTlKc1O83zlgVKkkr2ibgsDfUBelIIfu3Oq2Ku77/api/FindPackagesById()?id='Telerik.UI.for.Xamarin.DataGrid'&semVerLevel=2.0.0 367ms
OK https://nuget.devexpress.com/xRMAAuTIJGNTlKc1O83zlgVKkkr2ibgsDfUBelIIfu3Oq2Ku77/api/FindPackagesById()?id='Telerik.UI.for.Xamarin'&semVerLevel=2.0.0 502ms
Resolving conflicts for .NETStandard,Version=v2.0...
Unable to find package Telerik.UI.for.Xamarin with version (>= 2022.1.222.1)
Found 1 version(s) in nuget.org [ Nearest version: 2015.3.1202 ]
Found 0 version(s) in DevExpress
Unable to find package Telerik.UI.for.Xamarin.DataGrid. No packages exist with this id in source(s): DevExpress, nuget.org
Package 'Microsoft.Bcl 1.1.10' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
Package 'Microsoft.Net.Http 2.2.29' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
Package restore failed. Rolling back package changes for 'GtsApp'.

Related

Project Reference & Nuget Package Reference Conflict - Key with same name already exists

Using Visual Studio 2019 Version 16.6.0 Preview 2.1 - I have a solution with two projects:
Project A - Has a nuget package dependency Package1
Project B - Has a project reference to Project A
I now also require that Project B include the same nuget package dependency Package 1
When i attempt to install the package I get an error "An item with the same key has already been added".
I have seen a few posts that discuss this, but no definitive solution. For debugging purposes I want to keep Project A as a project reference for Project B. Any idea how I can solve for this?
Project Reference & Nuget Package Reference Conflict - Key with same
name already exists
First, try to remove the Project Reference of Project A in Porject B,then Install Package in Project B and then add the Project Reference of Project A in Project B.Check if it works.
If not, I think there are some different conflicting versions of a nuget package in your Project. See this similar issue. You should remove the duplicate packages. Try these:
1) if you use Packages.config, you should check whether there are two duplicate packages like these:
<package id="Newtonsoft.Json" version="4.5.11" targetFramework="net40" />
<package id="Newtonsoft.Json" version="5.0.8" targetFramework="net40" />
Delete the old one and remain the latest one. At the same time, check your xxx.csproj file and delete the duplicate nodes.
2) delete bin,obj folder of Project A and Project B
3) clean local nuget caches and delete the packages folder under your solution(xxxx\Projects\MyProjName\packages).
After that, run update-package -reinstall under Tools-->Nuget Package Manager-->Package Manager Console.
Do both on Project A and Project B.
4) and then to install Package 1 on Project B to test whether the issue persists.

How to disable "transitive package management" for a Visual Studio project

How do I disable "transitive package management"?
I wish to do so, so that I can install a package that I "packed" locally and have in a .nupkg file. When I attempt to do so, I get a messaging stating that The 'Source' parameter is not respected for the transitive package management based project(s) {csproj file}. The enabled sources in your NuGet configuration will be used.
Complete Context
When developing a NuGet package that's not ready for distribution via our NuGet feed, I often create a local .nupkg file like this from the package manager console:
nuget pack {path-to-csproj-file}
This generates a {project-name}.nupkg file, which I can then install in another project by opening it in Visual Studio, navigating to the package manager console, and entering the command
Install-Package {path-to-nupkg-file}
This has worked great and once the NuGet package is ready for distribution, we push it up to Azure DevOps and let the build pipeline there push it into our feed.
However, I just recently inherited a project where the prior developer apparently setup "transitive package management" that prevents this workflow. Here's what I get when I try to install directly from a .nupkg file:
Install-Package C:\Users\Josh\source\repos\SpeakerDiscountManager\SpeakerDiscountData.1.0.5.nupkg
The 'Source' parameter is not respected for the transitive package management based project(s) MembershipApplicationWidget\MembershipApplicationWidget.csproj. The enabled sources in your NuGet configuration will be used.
<snipped several lines of unsuccessfully searching configured package sources>
Install-Package : NU1102: Unable to find package SpeakerDiscountData with version (>= 1.0.5)
Obviously, it doesn't find the package I've specified via file, because it is searching online feeds and it doesn't exist in any of our online package sources--the package is in a testing state, not ready for anyone to use but me.
Based on the error message, I need to turn off "transitive package management" so that I can specify a file source for the package, but I've been unable to turn up any information online about how this is configured.
I did try installing this exact same .nupkg file in another project, using the same Install-Package {path-to-nupkg-file} procedure. This works.
How to disable “transitive package management” for a Visual Studio
project
I think this problem transitive package management is related to your current project structure which has some intricate dependencies, custom rules and so on. Therefore, turning off transitive package management is unpractical. If you create other projects and then install this package by your way, I think it probably will not occur.
As a best workaround, as you said(hint from the message The enabled sources in your NuGet configuration will be used.), add the the local nuget package's path into Nuget Package Source.
In your side, I think you specify -Source xxxxx(the path of the nuget package) to install this package in the package manager console, if so, this function actually is inconvenient.
You can just add the folder path which SpeakerDiscountData.1.0.5.nupkg exists into global nuget package source. Once you have done it, it will applies to any projects in this machine.
It has two ways:
1) VS IDE UI
Tools-->Options-->NuGet Package Manager-->Packages Sources-->add a new key and input the path of the nuget folder. Also, check its option.
2) global NuGet.Config file
(C:\Users\xxxx\AppData\Roaming\NuGet\Nuget.Config and step 1 is just add the path into this file by VS UI Control)
add these:
<packageSources>
<add key="Local Packages Source" value="C:\Users\Josh\source\repos\SpeakerDiscountManager\" />
..........
</packageSources>
After that, you can use your command to install this nuget package.
Note: If the root directory of your solution also has a file named nuget.config, the parameters in it will override the global file. It has the highest priority.
Just go to Vs IDE Tools/Nuget Package Manager/Package Manager Setting And Check The address of Package Sources.
it's something like "C:\Program Files (x86)\Microsoft SDKs\NuGetPackages".
Then Copy your package file into that folder and at last run this command in Package Manager Console:
install-package packagename

Team Foundation Server Build errors....NuGet?

Im having build errors after building my Visual Studio Core repository from Team Foundation Server. My build order is Get Sources -> NuGet Restore, Build Solution, Publish Artifact
NuGet restore points to my NuGet.config file.
Looking at the error, it seems to me that my NuGet files are not being compiled. My Nuget files are pointing to a location in my file system. I can compile and run my program on VS but i cant successfully build using TFS.
Example errors:
project.assets.json not found, run a nuget restore to generate this file.
- After looking, I found the file in the same location it said not found?
The type or name space "System" could not be found
- Im getting this error for all 8 NuGet packages????
The NuGet.config can't be pointing to your file system if you expect the restore to work on a machine other than yours. It has to be pointing to a location that the build server can access.
I'd recommend setting up a Package Management feed containing your packages.

Failed to add reference to 'Microsoft.DiaSymReader.Native.amd64'

I have created a nuget package and published to Azure. When I add the package to another project it fails with the following error:
I followed the same process for every other nuget package without issues. Any tips?

Cannot restore nuget packages on VSTS (Packages failed to install)

I'm using Visual Studio Team Services to build a .NET solution. I have a Nuget Installer task to restore the packages of the solution that is configured as follows:
Nuget.config file has 2 package sources - one is nuget.org (v2) and the other is a custom feed (Nuget Server v2.5.40416.9020). All packages from the nuget.org feed are restored but the ones from the custom feed are not, for each package from the custom feed there is an error message like this:
Unable to find version 'abc' of package 'xyz'
Error:
[error]Error:
C:\a_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.2.22\node_modules\nuget-task-common\NuGet\3.3.0\NuGet.exe
failed with return code: 1 [error]Packages failed to install
This was working fine 1 or 2 days ago.
Locally everything seems to work fine. Also, I tried with the nuget version 3.5.0 and a custom version of nuget.exe, without success.
Any suggestions?
I just had this error today. I fixed this error by reviewing the changes in my solution file with our base code branch and found some old lines that weren't supposed to be there. I think they were a result of a bad merge and should have been removed during a conflict resolve.
To fix the issue I simply removed the references that were old and everything built just fine.
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Services", "Services", "{EAECFF2D-7339-4180-8E1E-6DF9EC9EB131}"
EndProject
{3C14F190-6B6A-4913-9681-AFD9B62850FA} = {EAECFF2D-7339-4180-8E1E-6DF9EC9EB131}
{687ECE00-A567-40F3-BFF9-C3B639328F27} = {EAECFF2D-7339-4180-8E1E-6DF9EC9EB131}
Thanks,
Fissh

Resources