I am trying to upload my *.snupkg file to artifactory.
Manually, this works through the website, but when I try to push with nuget push it doesn't work and also doesn't give any response
nuget push "*.snupkg" -Source "https://artifactory.test.be/artifactory/api/nuget/v3/nuget/symbol" -ApiKey "USR:key" -SkipDuplicate
Also I tried pushing the normal nupkg file, hoping that it will also upload the snupkg together, like writter here, but also no success...
Artifactory added symbol server only starting from version 7.36.
According to the documentation the supported PDF formats are:
Microsoft PDB V7 (Microsoft C/C++ MSF 7.00)
Portable PDB v1.0
If your Artifactory version is older than that, you will need to upgrade your Artifactory version.
If you have version 7.36 or above, you should be able to configure Artifactory as a symbol server using the following guide:
Artifactory as Your Symbol Server
Related
We are running an Azure DevOps Server on premise.
We use the git repos and the artifacts nuget feed for our project.
Currently we do our builds (for the nugets) manually without the pipelines and upload the nugets later.
If we would use the pipelines the "Index sources and publish symbols" task would place the symbols to a file share.
So I have two questions:
Is there a way to upload the symbols manually (e.g. via CLI like we can with the nugets)?
Anywhere a documentation how the URL of the file share would look like on an on premise server? All examples I found so far only show dev.azure.com
Is there a way to upload the symbols manually (e.g. via CLI like we can with the nugets)?
The answer is yes.
You could use the push both primary and symbol packages at the same time using the below command. Both .nupkg and .snupkg files need to be present in the current folder:
nuget push MyPackage.nupkg -source
And publish to a different symbol repository, or to push a legacy symbol package that doesn't follow the naming convention, use the -Source option:
nuget push MyPackage.symbols.nupkg -source https://nuget.smbsrc.net/
Please refere the document for some more details:
Publishing a symbol package
Publishing a legacy symbol package
Anywhere a documentation how the URL of the file share would look like
on an on premise server?
You could check the document Index Sources & Publish Symbols task:
For debugging I need to push my NuGet packages including Symboles to our self-hosted Azure Devops Server.
Therefore I use the dotnet pack task with the flags --include-symbols and --include-source in my build pipeline. As output I get two files package.1.0.0.nupkg and package.1.0.0.symbols.nupkg.
When I try to push the package.1.0.0.symbols.nupkg package in my release pipeline, I get the feedback:
409 (Conflict - The feed already contains "package.1.0.0".
(DevOps activity ID: 766B8BC7-9AE6-4998-A246-47397236122F)).
I found Publish *.snupkg symbol package to private feed in VSTS on stack. The feedback is that the Azure DevOps Server do not support NuGet Symbols and they suggest to use a symbol server.
Is it a possible workaround to simply rename the package.1.0.0.symbols.nupkg to package.1.0.0.nupkg and push this package to the feed? Is Visual Studio with able to open the debugger inside the sources of these kind of package?
Is there another way to provide NuGet Symbols for debugging on a Azure DevOps Server?
There are multiple questions in your post, let us try to solve them one by one.
Is it a possible workaround to simply rename the
package.1.0.0.symbols.nupkg to package.1.0.0.nupkg and push this
package to the feed?
The answer is no. The error 409 (Conflict - The feed already contains "package.1.0.0" means that you already have one package package.1.0.0.nupkg or package.1.0.0.symbols.nupkg with version 1.0.0 in your feed. So you could not push another package with same version in that feed. Package version in the feed is unique. In order to protect the package from stepping on each other because of the same version of the package.
So, to resolve that error, you need to update the package version, like 1.0.1 (Deleting the old version of the package from the feed will not solve this error).
Is Visual Studio with able to open the debugger inside the sources of
these kind of package?
The short answer is yes. The details will be explained in the next question.
Is there another way to provide NuGet Symbols for debugging on a Azure
DevOps Server?
The answer is yes, we need to configure Visual Studio to enable debugging remote packages. You could refer below Official document and detailed blog:
Debug with symbols in Visual Studio
ASP.NET Core Debugging Nuget Packages with AzureDevOps | VSTS Symbol Server
But when I use nuget install package then only the package.dll is part
of the content which get downloaded from the Azure DevOps Artifacts.
Why is that?
This is expected behavior for installing the package. Because most of the time when we install and use the nuget package, we do not need the debug package, so the installation package will only add the dll we need to the project and will not configure the Symbols package. If we want to debug the package, we have to configure the Symbols package like above links.
The feedback is that the Azure DevOps Server do not support NuGet
Symbols and they suggest to use a symbol server.
The feedback you mentioned in the question is for *.snupkg symbol package not the symbols package. Azure DevOps Server should support publish NuGet Symbols packages, not debug packages, we have to manually configure Visual studio to use the Azure DevOps Server.
BTW, since there are many questions in your post and they are more general, my answer is not very specific. If you have any questions about any specific questions, you are welcome to open a new post with detailed questions.
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 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."
Preambule:
I would like to setup a NuGet repository hosted inside of my company.
We already had a Nexus OSS 2.13 running so I tried setting up a Nuget hosted repository on it, and uploaded my package there to test it. I then configured NuGet repos on my Visual Studio 2015 in order to add the one on that nexus server.
The problem I encountered then is that VS2015 uses (apparently) nuget feed v3, while Nexus 2.13 has the v2 feed. The symptom was a 404 error while browsing the nexus repository (when nuget calls repo_url/Search()).
The error message looked like :
The v2 feed at '/nexus nuget repository url/Search()?[...]' returned '404 not found'
Browsing it through the repo url in a web browser (without /Search()) works fine, and so is browsing repo_url/FindPackagesById.
I tried downgrading my NuGet vsix version as much as possible, going down to v3.1.1, but no version worked with the v2 feed.
What I tried next:
I looked up Sonatype website about nexus, and saw Nexus v3 is said to handle NuGet, while v2 has no such mention. I decided to try and install Nexus 3 next to our Nexus 2.13 (on the same machine) and see what it had to offer.
I downloaded v3.0.2-02 from that same page as above and started setting it up.
I followed parts of the documentation on how to install it skipping some parts that were already done because of the v2.13 installation. (Disclaimer: I did not install v2.13 myself though I considered installing java runtime environment and stuff like that to be a given).
I then started nexus 3 as a service and successfully reached the home page and logged in as admin.
Having read a statement on hosted repository management in the documentation saying:
By default, the repository manager ships with the following configured hosted repositories:
[...]
nuget-hosted
This hosted repository is where your organization can publish internal
releases in repository using the NuGet repository format. You can also
use this repository for third-party components that are not available in
external repositories, that could potentially be proxied to gain access
to the components.
I headed to Repository -> Repositories section and clicked "Create repository".
Only maven (group/hosted/proxy) and raw (group/hosted/proxy) recipes are available. No Nuget, no npm, nothing else than maven...
Searching a bit, I found in the System -> Bundles section that the bundle for nuget repositories mvn:com.sonatype.nexus.plugins/nexus-repository-nuget/3.0.2-02 is listed as Installed
while maven's mvn:org.sonatype.nexus.plugins/nexus-repository-maven/3.0.2-02 is listed as Active.
I tried looking for a place where bundles can be activated, and thought I found one at $NEXUS_HOME/etc/startup.properties where the first line says:
# Bundles to be started on startup, with startlevel
and contains line looking the one I added to try and activate nuget:
mvn\:com.sonatype.nexus.plugins/nexus-repository-nuget/3.0.2-02 = 10
I then used > sudo service nexus3 restart to restart nexus v3, logged back into admin, went to Repositories, and saw that still no nuget recipe is available.
I went back to Bundles and saw the nuget bundle is still listed as Installed and not Active.
I'm now all out of ideas as to what I could or should do in order to simply create a hosted nuget repository, which should already be available according to nexus' documentation...
What am I missing?
What is wrong with a fresh install missing what the documentation is saying is available by default?
How do I create a hosted NuGet repository on that nexus v3?
I found a way to activate the nexus-repository-nuget plugin:
Activate karaf console in file bin/nexus.vmoptions :
-Dkaraf.startLocalConsole=true
Then start nexus with the run option:
sudo bin/nexus run
And finally in the karaf console, activate nexus-repository-nuget bundle:
bundle:start 214
Now just quit the console and stop the runner, and start as a service. The bundle should be "Activated" and you should be able to create a nuget repository.