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:
steps:- task: NuGetCommand@2 displayName: 'NuGet pack' inputs: command: pack packagesToPack: ProjectName.csproj buildProperties: '-Exclude ***.tt'