Nuget cache in linux - asp.net

I am testing Asp.net 5 (vnext) in Linux Ubuntu 14.04.3 LTS and I would like to know where is located Nuget cache to properly set local repository in Nuget.Config.
Anyone know?

The global-packages folder is where NuGet installs any downloaded
package. Each package is fully expanded into a subfolder that matches
the package identifier and version number. Projects using the
PackageReference format always use packages directly from this folder.
When using the packages.config, packages are installed to the
global-packages folder, then copied into the project's packages
folder.
Windows: %userprofile%\.nuget\packages
Mac/Linux: ~/.nuget/packages
You can also view global-packages location using below command
dotnet nuget locals global-packages --list
Typical output (Mac/Linux; "user1" is the current username):
info : global-packages: /home/user1/.nuget/packages/
For all folders used by NuGet to manages packages and package information use below command
dotnet nuget locals all --list
For more details

NuGet cache is typically located in ~/.local/share/NuGet/Cache while dnu cache is located in ~/.local/share/dnu/cache.

Related

Deploying projects with renv in offline environment

What is the correct procedure to deploy packages using renv to an offline machine?
We have an internal CRAN-like repository, which is configured via options(repos = list(cran = "http://our.repo.url")) on both the development machine and the deployment machine. It is specified in renv.lock. The renv package itself is installed on both machines, and both are the same version (1.14).
After deployment, after starting R in the project directory, it hangs for a while, and returns an error:
# Bootstrapping renv 0.14.0--------
Warning: unable to access index for repository https://cloud.r-project.org/src/contrib/:
cannot open URL 'https://cloud.r-project.org/src/contrib/PACKAGES'
* Downloading renv 0.14.0 ... FAILED
How do I tell renv to either copy itself from the system library, or install from the internal repository?
Copying from the system library would be of course the preferred course of action, to save time compiling.
You might want to file an issue at https://github.com/rstudio/renv/issues since I think renv doesn't currently support loading the renv package from a non-project library path via the autoloader.
That said, you should be able to move forward by disabling the renv auto-loader. Before launching R, you can set the environment variable:
RENV_ACTIVATE_PROJECT = FALSE
Then, when R is started, the renv auto-loader (run via source("renv/activate.R") in the project .Rprofile) will be disabled. You can then later load renv from whichever library path is appropriate, and call renv::load() to manually load a particular project.
(The other alternative to setting that environment variable is simply removing the renv auto-loader from the project .Rprofile.)

DotNet CLI: Restore Nuget package without adding to project

We build our dotnet artifacts on a TeamCity server and want to include the SqlPackage.CommandLine binaries alongside our build output. Running dotnet add package SqlPackage.CommandLine yields "Could not find any projects in C:\build". Can someone recommend a way to grab the nuget output without adding it to a project?
You can just download the NuGet package directly from nuget.org: curl -O -L https://www.nuget.org/api/v2/package/SqlPackage.CommandLine does the trick and downloads the latest version.
If you need the contents from that package, you can simply unarchive it with zip utils afterwards

Nuget installed panel empty after VS 2017 update

I updated my VS to 15.7.3 version today and now my Nuget panel with installed packages is empty. Not empty but showing only System.Runtime.
I have a packages.config file in my project and everything worked just fine before the update.
Also the solution wont build. It is showing the following error
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets. C:\Users\User\Source\Repos\xxxx1-sol\xxxx1\xxxx1.csproj 6039
What might be the problem ?
Update 1
I tried installing all of the packages again and after I installed a couple of them I saw this in References
Update 2:
I tried deleting the .packages folder before installing the packages again via Nuget and the folder .packages was not created
My project path is C:\Users\User\Source\Repos\Project123-Git
Also I see that now I have a folder .nuget at C:\Users\User.nuget that has the folder packages in it.
I also tried deleting the file packages.config but Nuget still has my newly installed packages even if packages.config does not exsist
After a suggestion on Github Nuget page I managed to find a solution
https://github.com/NuGet/Home/issues/7013
I unloaded the project, opened the project file and removed all the PackageReference nodes from it. I then deleted the obj folder and Nuget started recognizing my packages again. Project now builds just fine.
Thank you all for your help

Installing CodeDOM providers with command line

I am trying to install "CodeDOM Providers for .NET Compiler Platform ("Roslyn")". I have downloaded the command line executable from here : https://dist.nuget.org/index.html
But when I launch it, it opens, writes something and instantly closes.
I do not have time to write any command to install a package.
nuget.exe is a command line application. If you open a command prompt or terminal window and run nuget.exe it will show you help information about supported commands.
The commands for nuget.exe are also documented on the nuget.org web site.
To download a NuGet package using nuget.exe you run:
nuget install PackageId
Replacing the PackageId with the id of the NuGet package you want. In your case it should be something like:
nuget install Microsoft.CodeDom.Providers.DotNetCompilerPlatform

my RPM package requires 2 already installed shared libraries

I'm looking for help about making rpm packages.
I just created my first RPM package with rpmbuild.
This package is simple. It has just to copy several config files and one executable.
I cannot install this .rpm because 2 shared librairies used by the executable are required.
These librairies are already installed but they are not linked with another .rpm package because I build them from one of my projects. There are located in the /usr/myproject/lib directory.
I tried to put symbolic links to /lib and /usr/lib, tried also to run a "ldconfig" update from a .conf file which contains the /usr/myproject/lib directory, and tried to update the LD_LIBRARY_PATH env variable without any success.
I know I can ignore dependencies using the -nodeps command line option but I'd like in the next step to create my own yum repository but yum do not allow to install a package if the dependencies are not fulfilled.
I would also prefer to keep the automatic dependency feature of rpmbuild enabled.
Thanks in advance.
Package these 2 libraries in another RPM, then you can install both RPMs in one rpm -i call.

Resources