.Net Agent requirement

Using the new .Net build step runner, the agent requirement of DotNetCLI_Path Exists is insufficient- that finds any agent that has DotNet Core installed, but you really need the SDK installed.

1. Can I update the .Net build step's built in Build Step Requirement?
2. What can I put in as an Explicit project Parameter? I've tried variations of Exists=>(DotNetCoreSDK*) to match any version of DotNetCoreSDK, but no luck.

0
3 comments

Hi Seanl,

You can't directly modify the built-in agent requirements for the .NET build step in TeamCity, but you can achieve the desired behavior by adding custom agent requirements or parameters.

You can define an explicit parameter that checks for the presence of the .NET SDK by using a custom agent parameter that points to the SDK path. On each agent that has the .NET SDK installed, define a custom parameter that reflects the presence of the SDK For example: DotNetCoreSDK_Installed=True.  Add an agent requirement for this parameter. 


This ensures that only agents with the SDK installed can run the build.

0

It's disappointing that I had to touch almost every build configuration to set DotNetCoreSDK8.0_Path = exists, as Agent Requirements don't inherit beyond templates, but it did resolve my issue.

0

Hi Seanl,

> Agent Requirements don't inherit beyond templates

It is possible to enforce build features, options, and parameters. Build steps and build requirements can also be enforced. Go to the project settings page and select the enforced settings template.

For more detailed information, please refer to the https://www.jetbrains.com/help/teamcity/build-configuration-template.html#Enforcing+settings+inherited+from+template.

Best Regards,
Tom

0

Please sign in to leave a comment.