I've setup a Nuget Remote Repository that points to official nuget site.
It was able to download all the packages, but at the end of the log it is throwing an error.
[Error] File ILMerge.2.13.0307 doesn't exists
This is really weird because I can see that the artifact was downloaded. It's existing in my hard drive.
One thing I noticed though is the casing differences:
Package name in the repository: ilmerge.2.13.0307.nupkg
Package name in my hard drive: ILMerge.2.13.0307.nupkg
Package name in package.json file: ILMerge
I suspect that artifactory compares the package name. I maybe wrong.
I temporarily solved the issue by disabling the Collect Build Info settings in Artifactory Nuget Task. But this isn't the permanent solution.
See image below:
Related
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'm getting the following error during Cloud Build
"##[error]Cannot determine the packages folder to restore NuGet packages. Please specify either -PackagesDirectory or -SolutionDirectory."
I ran into this error verbatim after running nuget.exe restore on a project that didn't actually reference any NuGet packages, however, within the project's directory sat a packages.config file containing an entry to a package. This config file was not included or referenced by the project, it was just sitting in the directory.
Deleting the stray packages.config file resolved the error.
Just like the build log said, you should give a argument the -PackagesDirectory or -SolutionDirectory to specify a folder to store the packages.
Check the restore options for more details.
Hope this helps.
I want to set up continuous integration and deployment for an XAP Mobile app in Azure Devops.
In order to get CI/CD I need to set up the Azure Pipeline to install the right packages.
There is some information in the docs on Hosting your own NuGet feeds
and Get started with NuGet packages in Azure DevOps
Dev Express explained that they do not currently provide a Nuget feed for XAF, but I can make my own Delegate's DCNugetPackageBuilder
Using DXNugetPackageBuilder to make Nuget packages
As per the instructions I downloaded the .pdb files extracted them to c:\tmp\symbols
I also downloaded DXNugetPackageBuilder and edited buildPackages.bat according to instructions.
Next I ran build.ps1 in elevated Powershell
This created the .nupkg files at C:\tmp\Nuget
By default this uses the files located at
C:\Program Files (x86)\DevExpress 18.1\Components\Bin\Framework
and the .pdb files located at
c:\tmp\symbols
Using Nuget.Exe and the Credential Provider to push the packages to the feed
The Connect To Feed screen mentions I need to download Nuget.exe and the credential provider
Here are the docs on the Credentials Provider
I unzipped the VSTS CredentialProviders Nuget.Exe is included.
The next step is to follow the instructions given by the "add this feed" section of the Connect To Feed screen.
For example
nuget.exe push -Source "SBDDevExpress" -ApiKey VSTS c:\tmp\Nuget\DevExpress.Data.18.1.6.0.nupkg
I ran into an access denied issue that got solved here
then I was able to push all the packages I wanted.
Set the Nuget Package Source
In VS2017 with my solution open I used Tools -> Nuget Package Manager -> Package Manager Settings
I added package settings with the Azure endpoint set up as a package source.
Errors building
When I run the build pipeline I get errors like
The type or namespace DevExpress could not be found are you missing a directive or assembly reference?
From studying Updater.cs and Module.cs
It seems I am missing the following namespaces from the Nuget feed.
DevExpress.ExpressApp.DC;
DevExpress.ExpressApp.Updating;
DevExpress.Persistent.BaseImpl.PermissionPolicy;
[Update]
DevExpress suggested I compare the dlls generated in the bin folder with my package feed.
I found several missing files and pushed their packages.
I now have
XafMobile.Module\Properties\licenses.licx(1.0): Error LC0003: Unable to resolve type 'DevExpress.ExpressApp.ModuleBase"
I can see from the source code that ModuleBase is a public class in DevExpress.ExpressApp
I am wondering if this is something to do with reflection.
There is some mention of it at Dev Express support
[Update]
I tried removing the licence files and syncing the project.
Now the errors show as missing assembly references
Also When I rebuild my solution the license files are missing from the properties folders
I wonder if this helps explain it
[Update]
Manuel Grunder [DevExpress MVP] and DXNugetPackageBuilder author explained that
"
When working with nuget.packages you need to reference them via nuget as well
as he explains here
"
As is explained here
"When working with nuget.packages you need to reference them via nuget as well. Thats the reason why it did not work in the first place."
I am having trouble running a build on travis. On our local jenkins machine everything is fine. The travis build fails with the following state
Unable to find version '4.8.0.770-beta' of package 'Lucene.Net'.
The solution folder contains a nuget.config file that specifies multiple nuget feeds. My guess is that something is going wrong there. I could use some help.
The project is on GitHub at https://github.com/RHEAGROUP/docupanel
Not every time but quite frequently I get ##[error]The nuget command failed with exit code(1) and error(NU1102: Unable to find package MyPackage with version (>= 1.0.5)
in my Azure Pipelines builds (different packages and different versions):
The package definitely exists as it had just been built a couple of minutes ago and I can see it in the Artifact Feed:
Here is my pipeline:
The project consists of multiple packages so this is starting to get really inconvenient. If I try on different build agents I eventually get one to work but the pipelines are supposed to be more of a hands off process. As far as I can tell (or guess), Nuget is caching the index.json for the feed. The only other issues I can find related to this specifically happen in people's local environments. Is there some way to get Nuget to properly check if packages exist?
1.Not sure about the real cause of your issue, but if cleaning cache can help to resolve your issue, you only need to enable this option in Restore task.
2.Also, sometimes the package not found error could be related to feed permissions in Devops. Go Artifacts=>custom Feed=>Feed Settings in right corner:
Make sure your build service have access to that feed.
NuGet does cache what versions of a package are available on each feed for 30 minutes, so the package was published more recently than that, and that machine had already restored a different version of the package within the last 30 minutes, it will be a problem.
You could run dotnet nuget locals http-cache --clear or nuget.exe locals http-cache -clear before the restore, that will delete NuGet's HTTP cache.