How to define additional parameters for dotnet publish?

I have a problem with NUnit and dotnet publish playing nice with each other and to resolve this I need to have one parameter passed from TeamCity instead of it being in the .csproj files. This is my Kotlin:

dotnetPublish {
name = "Build MyStuff"
projects = """MyStuff\MyStuff.csproj"""
runtime = "linux-%system.Platform%"
param("system.TrimUnusedDependencies", "true")
}

However when I run this command, TrimUnusedDependencies is not in the .rsp file that gets generated by TeamCity. What's the correct way of defining a parameter for a build step only?

0
1 comment

Hi Laszlo,

 

parameters can only be set at the build configuration level, not in a build step, I'm afraid. Hope this helps.

0

Please sign in to leave a comment.