-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JFrogDotnetCore@1 task with a restore command fails with a "create file" error if both arguments are passed, and collectbuildinfo is true. #476
Comments
Actually, I'm finding if you use the argument field at all, you're bound to run into many any varied issues, even including not getting past the Initialize job step--which essentially means your pipeline doesn't run. I've noticed:
In short, this task's command-line handling is simply broken and unusable. I think I'm better off using a regular And lastly, this task doesn't even use V3 of the Nuget API, and so it doesn't play nice with some Nuget implementations, such as Baget (which doesn't implement the Nuget v2 API). Nuget.exe/dotnet doesnt' care and "figures it out". This is just a poorly implemented task. I'd recommend others to refrain from using it. |
OK, an update: The build failing on Initialize job was due to a bug in Azure DevOps Server when using an option to Clean all build directories. It works the first time, then all subsequent builds fail. I needed to start from a clean foundation to ensure package restore was working correctly. Having said that, there is a problem with this task. The problem is, it ONLY uses the Nuget v2 API (even though there's a radio button selection for V2 and V3, with V3 being the default)--and our existing Nuget solution, Baget, does not implement the V2 Nuget API, so package restore FAILS using the Nuget configuration file generated by this task. If Instead I provide my own configuration file, where I specify that the v3 API is to be used, everything works. JFrog, please implement using the v3 Nuget API from this task when it's selected in the task!!! |
Hi @davidrueckert , Note that the task creates a temporary nuget.config based on the Artifactory connection and resolution repository and uses it in the restore process. If you'd like to pass your own config please currently use the Hi @fourpastmidnight , Thanks |
Hi @RobiNino . It looks like the behavior in this issue has been corrected. It looks like two updates to this extension have been released since I opened this ticket over 2 months ago. This issue must have been corrected in one of those updates. As for using the --configfile jfrog cli argument, there is no field in the JFrogDotNetCore Task where I can add a Jfrog CLI argument. I suppose that I can't use this task if I need to use our own NuGet.config file. |
Thanks for the response. My particular issue is actually due to a bug in Artifactory that I'm working through with customer support. But thanks for the info on the correct parameter to use, in case I need it in the future for some reason.
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: David Rueckert ***@***.***>
Sent: Tuesday, April 16, 2024 3:56:40 PM
To: jfrog/jfrog-azure-devops-extension ***@***.***>
Cc: Craig E. Shea ***@***.***>; Mention ***@***.***>
Subject: Re: [jfrog/jfrog-azure-devops-extension] ***@***.*** task with a restore command fails with a "create file" error if both arguments are passed, and collectbuildinfo is true. (Issue #476)
Hi @RobiNino<https://github.com/RobiNino> . It looks like the behavior in this issue has been corrected. It looks like two updates to this extension have been released since I opened this ticket over 2 months ago. This issue must have been corrected in one of those updates. As for using the --configfile jfrog cli argument, there is no field in the JFrogDotNetCore Task where I can add a Jfrog CLI argument. I suppose that I can't use this task if I need to use our own NuGet.config file.
—
Reply to this email directly, view it on GitHub<#476 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABUTP2LRWNVQA5VDWY4DSQ3Y5V67RAVCNFSM6AAAAABCXQIDLGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJZHAZDKMJVHA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@davidrueckert , @fourpastmidnight , |
Describe the bug
Using the jfrogDotnetCore@1 task with a restore command, a create file error is thrown if both a value is passed in the argument field and the collectbuildinfo field is set to true.
If collectbuildinfo is set to false, the task successfully runs.
Current behavior
The task fails with this error.
CreateFile /p:RestoreConfigFile=C:\a\4\s\unit-testing-using-dotnet-test\nugetv1.config: The filename, directory name, or volume label syntax is incorrect.
Reproduction steps
displayName: dotnet restore test
inputs:
command: 'restore'
arguments: '/p:RestoreConfigFile=$(Build.SourcesDirectory)\unit-testing-using-dotnet-test\nugetv1.config'
artifactoryConnection: 'artifactory'
targetResolveRepo: 'Nuget'
collectBuildInfo: true
buildName: '$(Build.DefinitionName)'
buildNumber: '$(Build.BuildNumber)'
includeEnvVars: true
Expected behavior
The task should successfully run using the passed arguments and publish the build information to Artifactory.
Azure DevOps extension name and version
JFrogDotnetCore@1
JFrog CLI version
2.52.9
Operating system type and version
Windows 2022 server
JFrog Artifactory version (if relevant)
No response
JFrog Xray version (if relevant)
No response
JFrog Distribution version (if relevant)
No response
The text was updated successfully, but these errors were encountered: