Nuget not restoring symbols - nuget

We have a local nuget server on our build machine and publish our nuget packages to that server. We create the packages with the -Symbols option to crteate a .symbols.nupkg package and that is what is copied to the packages directory on the server. (There was a problem putting both .nupkg files on the server as the restore failed to work.)
When we do a nuget restore we don't see any of the PDB files or sources in our dependent projects. How do we get nuget to restore the symbols?

Related

Nuget restore is ignoring .xml files but downloading only .dll and .pdb files

The nuget package Project Xyz contains all xml files along with dll and pdb files. We are using this package Xyz in a different project Abc of a different solution.
We have a team city build setup for publishing the package Xyz to Proget feed(we use proget for private nuget packages repository).
We also have a Team City build setup to compile and deploy the Abc project. But, while compiling the build, when we restore the nuget package, it downloads only dll/pdb files but not xml files. In the build step of team city, we have runner type as dotnet and command as restore.
How do we make it restore xml files as well?
This is a follow up question to the above link? We followed below link to publish nuget package with xml files.
https://stackoverflow.com/a/63353505/5887074
Please note: Even though project level environment variables in team city has NUGET_XMLDOC_MODE=none, dot net restore is overriding environment variable for some reason with [Environment] NUGET_XMLDOC_MODE = skip

Is there Telerik UI for UWP nuget for UNO?

https://github.com/unoplatform/Uno.Telerik.UI-For-UWP is there a nuget for this repo?
I couldn't find any on nuget and Telerik.UI.for.UniversalWindowsPlatform is not support on mobile projects. Thanks.
[Update 2]
I am no longer continuing development on this and instead focusing my efforts on Telerik UI for MAUI.
[Update]
I am working on making this available for the Uno community. You can find it on nuget.org at xxx
[Original]
Telerik doesn't own that fork, so they do not publish a NuGet package for it.
If you would like to have a NuGet package, you can clone the repo locally and compile it yourself. See the Getting Started section of the README to lean how to compile the repository.
Generate NuGet Package
Once it is compiled, you can generate a .nupkg file (see number 6):
Make sure you have the required software to build UWP applications
Clone a copy of the repository code
Open UWPControls.sln located in Controls folder and build it
Open UWPMap.sln located in Controls folder and build it in x86/x64 and ARM configs
All binaries are now located in Binaries folder
You can additionally build a NuGet package by running BuildTools/BuildNuGet.bat. The generated package will be located in the NuGet subfolder.
Next Steps
Once you have your own nupkg file, you can put it in a Package Source (i.e. just a local folder) or put it in your own nuget feed server and list that as a packages source.

Cannot build only one project of a solution in Azure Devops

I am trying to create a new build pipeline using Azure Devops. I can built the whole solution, however I am not able to build for a single project in the same solution.
I am getting the following error:
The nuget command failed with exit code(1) and error(Cannot determine the packages folder to restore NuGet packages. Please specify either -PackagesDirectory or -SolutionDirectory.) Packages failed to restore
Can anybody please help me?
Build only one project of a solution in Azure Devops
To resolve this issue, you should specify a directory for nuget to save the restore nuget packages, like:
When I restore the nuget packages for one project by packages.config/project file, we should expend the option Advanced on the nuget restore task, then specify a directory, I set it as default packages, ..\packages. Then I test it, it restored successfully:
2019-02-01T06:18:22.1311238Z ##[section]Starting: NuGet restore
....
2019-02-01T06:18:28.3155511Z [command]C:\VSTS-vs2017-agent\_work\_tool\NuGet\4.3.0\x64\nuget.exe restore C:\VSTS-vs2017-agent\_work\5\s\TestSample\TestSample\TestSample.csproj -PackagesDirectory ..\packages -Verbosity Detailed -NonInteractive -ConfigFile C:\VSTS-vs2017-agent\_work\5\Nuget\tempNuGet_169.config
2019-02-01T06:18:37.0366771Z All packages listed in packages.config are already installed.
2019-02-01T06:18:37.0594978Z ##[section]Finishing: NuGet restore
2019-02-01T06:18:22.1311238Z ##[section]Starting: NuGet restore
2019-02-01T06:18:22.1319968Z ==============================================================================
2019-02-01T06:18:37.0366199Z C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin\msbuild.exe "C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\NuGetScratch\svd0ok2h.e2f.nugetinputs.targets" /t:GenerateRestoreGraphFile /nologo /nr:false /v:q /p:NuGetRestoreTargets="C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\NuGetScratch\bhkdd2rf.itk.nugetrestore.targets" /p:RestoreTaskAssemblyFile="C:\VSTS-vs2017-agent\_work\_tool\NuGet\4.3.0\x64\nuget.exe" /p:RestoreConfigFile="C:\VSTS-vs2017-agent\_work\5\Nuget\tempNuGet_169.config" /p:RestorePackagesPath="..\packages"
2019-02-01T06:18:37.0366350Z
2019-02-01T06:18:37.0366771Z All packages listed in packages.config are already installed.
2019-02-01T06:18:37.0594978Z ##[section]Finishing: NuGet restore
The reason for the error:
When we only build or restore the nuget package for one project of a solution in Azure Devops, nuget restore the nuget packages to the default \packages folder under the solution folder, but since we do not specify the .sln file in the build/nuget restore task, nuget does not know where is the solution folder. Then nuget will throw that error. So, we should specify a directory for nuget to save the restore nuget packages.
Hope this helps.

Files without extension not being deployed by Octopus

We have a file in our built NuGet package .nupkg which does not have an extension, i.e. svgo.
This file is not being deployed as part of a standard Octopus 'Deploy a package' step. We see the file in the NuGet package when viewing with NuGet Package Explorer.
We've also noticed several other extensionless files in the NuGet package do not get deployed.
We're using Octopus Deploy 3.3.27, and the deployment target is running Windows Server 2012 R2.
How do I deploy extensionless files from NuGet packages in Octopus?

NuGet package restore tries to retrieve in all configured NuGet sources

While installing the NuGet packages from the NuGet package manage, having configured multiple NuGet package sources in VS2017, the NuGet client tries to retrieve the package in all the configured NuGet sources and returns messages like "Not Found".
I have configured the below NuGet sources in my NuGet.Config,
I have tried to restore the Newtonsoft.Json NuGet package from the command prompt by using the nuget restore command. The NuGet client will try to retrieve the Newtonsoft.Json NuGet package from my custom NuGet feed, which does not contain the Newtonsoft.Json package and returns a NotFound message in the output:
However the package is restored perfectly without issues. But why does the package manager search all the sources which are configured and prints not found errors even it found it in the first NuGet source?
Why does the NuGet client try to retrieve in all configures sources? Is this a bug from NuGet? I am using Visual Studio 2017 (15.4) and NuGet package Manager (4.4.0).
No, it's not a bug.
When the NuGet client is doing a restore and sees you have a dependency on some package, it has no way of knowing which feed the package exists in. In the past, the NuGet client would query each source in order, but at some point it was changed to query all sources concurrently and use the first successful response.
There are also several scenarios where you would want to get a package that is available on nuget.org, from a source other than nuget.org. One example is you might have a private feed with commonly used packages on the same network as your build servers, so that package restore is as quick as possible and more resilient to network outages.