Deleting a package from the UI, the package is deleted from the UI, but does not remove an object from uploaded files in the path /var/opt/gitlab/gitlab-rails/shared/packages
Does this run with a cron job or are they not deleted at all?
Related
I have uploaded a package(com.test:project0.1) in azure devops Artifact, however when I am making changes in code, the pipeline is getting successful but unable to replace the old package.
Can anyone please assist me.
If you used another nuget package to replace the old one, also, you have set the same version as the old before, then you should remove the old nuget caches first to remove the old one.
You should check the option Disable Local Cache option.
Then, re-run to check that.
Also, if you push a version number for the nuget package, you should modify the nugrt version under csproj file to the new one.
I have an issue with incorrect .nuspec data getting overwritten while pulling packages using Chocolatey (Nuget) via the command: choco download. The tag that is not updating correctly is <owner>.
On my internal Artifactory server, I’ll download a package (using choco download) & edit the .nuspec file. I'll edit multiple tags and then I'll re-push the package to the Artifactory server successfully. Upon reviewing the nupkg details on Artifactory, the correct package metadata is displayed. I can see this from the updated .nuspec file as well as the Nupkg info. Even the <owner> tag is updated correctly.
If I download that .nupkg from the Artifactory web browser, the .nupkg does indeed contain the updated .nupsec file with the updated <owner> tag. That is good.
If I download the package via Chocolatey, however, using the 'choco download' command, the corresponding .nuspec file has the old <owner>still. Other tags are updated but the intended <owner> tag is not.
What's even more remarkable is that if I update the <author> tag, it will update the <owner> tag as well with the same value! It does this every single time when using choco download.
In talking with Chocolatey support, the choco download command is basically just a Nuget unpacking command. There is nothing special about it being a Chocolatey command and Chocolatey support has ruled it out as being a Chocolatey problem. This issue does not exist with other Nuget repositories (like Nexus). I can replicate this on multiple issues of Artifactory.
Has anyone run into this before?
This can happen if you uploaded the modified version of the package to a local repository but resolving from a virtual repository which aggregates multiple repositories.
As a first step, make sure that the virtual repository you are resolving from includes the local repository which contains the modified package.
Next step is to "zap" the cache of the virtual repository. This can be done from the "Artifact Repository Browser" by right clicking the virtual repository and choosing "Zap Caches".
I need to execute a command line utility from a package that is downloaded as part of nuget package restore in the TFS build process.
On my local computer that is stored in c:\users\me.nuget*
I've tried every permutation of that on TFS without success. I've also tried \mydir\packages with no success as well.
The biggest problem is that I have to run the package restore step before being able to see any sort of feedback from the log. That's some slow debugging.
Any ideas? Thanks ahead.
With the latest nuget/msbuild the packages folder is held under the active user's profile directory, so an appropriate Powershell command is
Get-ChildItem $(UserProfile)\.nuget\packages
This currently evaluates on the VSTS 2017 Hosted build agent to C:\Users\VssAdministrator\.nuget\packages but by using the variable you are insulated from any changes made.
Just an addition to #Paul Hatcher's answer:
I also faced the same problem in Azure DevOps build pipeline where a specific package and nuget packages directory could not be found.
It is a Xamarin.Forms app based on a .net standard library where no packages folder exists. I later noticed in build logs that the packages are restored to nuget folder under user's profile. However this particular case is not documented on https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=vsts#agent-variables.
That means #Paul Hatcher's answer is also valid if you try to reference nuget package folder directly from your build pipeline. This ($(UserProfile).nuget\packages) should actually be a (standard) predefined build variable.
The Nuget package cache folder is in C:\Users\buildguest.nuget\packages, but it will be cleaned after build if you are using Hosted build server.
The simple way to verify:
Add NuGet restore or .Net Core Restore build step to restore packages
Add PowerShell build step to list files in C:\Users\buildguest.nuget\packages
Code:
Get-ChildItem -Path C:\Users\buildguest\.nuget\packages
Queue build and check the PowerShell step log (the packages’ will be listed in the log)
Remove/disable NuGet restore or .Net Core Restore build step > Save build definition
Queue build
The build will be failed, because the path does not exist.
So, the packages need to be restored before build solution/project if aren’t existing. You can add packages to source control and map to build agent to deal with the issue of too long time takes to restore packages.
I've got a build running in VSTS which is restoring NuGet packages from both nuget.org and a custom feed in VSTS. The custom feed is in the solutions NuGet.config as a <packageSource>, along with the user name and password in <packageSourceCredentials>
The build, including the restore, is working Ok, but there is a warning ...
2016-10-12T16:18:57.6589001Z ##[warning]To connect to NuGet feeds
hosted in your Team Services account/TFS project collection with
NuGet 3.1 or below, edit your build definition to specify a path
to a NuGet.config containing the package sources you wish to use.
How can I remove this?
Based on my test, that warning remains even through using higher version of nugget (e.g. 3.3) or do not restore package from VSTS feed. (Hosted build agent has the same result).
You can’t remove it unless you custom a build task to restore package through command line.
I submit a issue here.
Update:
The issue has been updated.
I see the issue in the code coming from our transition from depending
on assets coming with the agent to being deployed with the task. You
can get around this for now until we get an official change out by
either (1) choosing to use the Nuget 3.5 version radio button in the
task config or (2) supplying a path to your nuget.config.
So, you can use Nuget 3.5 version or specify nuget.config file.
is it possible to use nuget to deploy test data instead of dlls?
we have some largish test data files which I don't want to keep in our git repository and I am wondering if we could deploy these to the test projects during the build by including them in a nuget package which gets installed during the build.
Is this possible?
Yes, but, without knowing a few more details about how your project is structured, it's difficult to tell you exactly how you would do this.
If you just want to copy your data files into a directory in your test project, you can just put the files in a content folder in a NuGet package, and it will copy them to your project automatically, much in the same way that it would copy DLLs. If this is all you need, you can create a package like this in a few minutes.
If you need to deploy the test data files to a directory outside of your project directory, or manipulate the file names or contents, you can do this as well. I usually create a tools package to do this.
I put the files I want to copy into a tools directory in my package, and then create a simple init.ps1 or install.ps1 script to do whatever copying and file manipulation tasks are required.
If you are intimidated by the prospect of creating packages from scratch, you may find NuGet Package Explorer helpful. You can create a content folder and drag the content you want to deploy into it:
http://npe.codeplex.com/