Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Passing NuGet 'Pack' arguments in Azure DevOps Build Pipeline

$
0
0

In my Azure DevOps Build pipeline, I have added a NuGet task of pack command type (version 2.*).

I am trying to pass the -Exclude ***.tt argument so that it excludes these files when referenced from another projects. However, in the generated NuGet package, those .tt files are appearing in the Content folder.

The command written in the log of the host is:

nuget.exe pack PROJECTNAME.csproj -NonInteractive -OutputDirectory SOME_OUTPUTPATH -Properties "Configuration=release;\"-Exclude ***.tt\"" -Verbosity Detailed

As you see, exclude is not part of the properties but should be as a separate -Exclude argument.

Any idea how may I achieve this? Many thanks!

Added a screenshot and YAML:

enter image description here

steps:- task: NuGetCommand@2  displayName: 'NuGet pack'  inputs:    command: pack    packagesToPack: ProjectName.csproj    buildProperties: '-Exclude ***.tt'

Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>