1.8.1.760 Working Folder doesn't work in DotNet actions

Hi

In DotNet actions, the working folder seems to be ignored.

The config of a DotNet action below doesn’t work (project file not found):

Project Path: MyProject.csproj
Working Folder: $Source.MyProject$\src\MyProject

The config below does work:

Project Path: $Source.MyProject$\src\MyProject\MyProject.csproj
Working Folder:

I’m assuming dotnet should run inside the working folder context? I’ve only tried “DotNet Publish” and “DotNet Restore” but both exhibit this behaviour.


Cheers

Joel

Hi Joel,

The Working Folder in the DotNet actions is used to set the folder where the executable is run. The Project Path is however anchored to the workspace folder so any relative paths are prefixed with the workspace folder path, rather than the working folder path. So MyProject.csproj is converted to $Workspace$\MyProject.csproj before it is sent to the dotnet command line.

The field description does vaguely explain this, however, we can see how this could be confusing. Generally, we should anchor the path to the working folder in actions where the working folder is supplied.

We’ll look into whether we can change this without affecting any existing actions.

Thanks Dave - that makes sense. Reading the field description again I see it now - I was getting ‘workspace’ and ‘working’ confused in my head, seeing ‘$workspace$’ as the working directory placeholder.

Sorry for the trouble.