Update
If you couldn't see any folders getting created on build agent. Then one possibility, that two stages may not run in same build agent. Please double check this info.
If you still get similar error, kindly set debug=true
and share related logs here for troubleshooting.
OP verified issue solved: Using different release agents for Dev and TT. Changing both agent to single worked out.
According to your error info, guess you are using host agent.
It's not related to which drive you are using.
Avoid hard-coded references
When you use a Microsoft-hosted agent, always use variables to refer
to the build environment and agent resources. For example, don't
hard-code the drive letter or folder that contains the repository.
The precise layout of the hosted agents is subject to change without
warning.
Source Link
If you are using self-host agent. It's related to your default agent installed path. There is a related predefined variables
Agent.ReleaseDirectory
The directory to which artifacts are downloaded during deployment of a release. The directory is cleared before every deployment if it requires artifacts to be downloaded to the agent. Same as System.ArtifactsDirectory and System.DefaultWorkingDirectory.
More details please refer to Agent variables
If you want to change the path, you need to make sure you agent is installed under C:\
not D:\
. Besides, you could also choose to use Copy Files task in release pipeline to copy files from a source folder to a target folder according to your needs.