Azure Pipeline - Tasks seems to run on different containers, how to make all them share same

%3CLINGO-SUB%20id%3D%22%5C%26quot%3Blingo-sub-3157832%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3EAzure%20Pipeline%20-%20Tasks%20seems%20to%20run%20on%20different%20containers%2C%20how%20to%20make%20all%20them%20share%20same%26lt%3B%5C%2Flingo-sub%26gt%3B%3CLINGO-BODY%20id%3D%22%5C%26quot%3Blingo-body-3157832%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3E%3CP%3EI%20have%20the%20following%20YAML%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3CPRE%3E%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E%23%20.NET%20Desktop%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E%23%20Build%20and%20run%20tests%20for%20.NET%20Desktop%20or%20Windows%20classic%20desktop%20solutions.%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E%23%20Add%20steps%20that%20publish%20symbols%2C%20save%20build%20artifacts%2C%20and%20more%3A%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E%23%20https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fdevops%2Fpipelines%2Fapps%2Fwindows%2Fdot-net%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%5Cn%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Etrigger%3A%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E-%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Emaster%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%5Cn%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Epool%3A%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EvmImage%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E%5C'windows-latest%5C'%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%5Cn%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Evariables%3A%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E-%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Egroup%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E%5C'CertPass%5C'%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%5Cn%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Esteps%3A%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%5Cn%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E-%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Etask%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EDownloadSecureFile%401%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EdisplayName%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EDownload%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EPfx%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ename%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EmyCertificatePfx%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Einputs%3A%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EsecureFile%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Eventasmlcert.pfx%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%20%20%5Cn%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E-%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Etask%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EDownloadSecureFile%401%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EdisplayName%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EDownload%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Esni%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ename%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EsnInstallPfx%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Einputs%3A%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EsecureFile%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3ESnInstallPfx.exe%26lt%3B%5C%2FSPAN%26gt%3B%20%20%20%20%5Cn%5Cn%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E-%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Etask%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EPowerShell%402%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Eenv%3A%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3ESN_INSTALL_PFX%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E%24(snInstallPfx.secureFilePath)%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EMYCERTIFICATE_PFX%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E%24(myCertificatePfx.secureFilePath)%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EMYCERTIFICATE_PFX_PASSWORD%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E%24(certpass)%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Einputs%3A%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EtargetType%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E%5C'inline%5C'%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Escript%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E%5C'%26amp%3B%5C%22%24(%24ENV%3ASN_INSTALL_PFX)%5C%22%20%5C%22%24(%24ENV%3AMYCERTIFICATE_PFX)%5C%22%20%5C%22%24(%24ENV%3AMYCERTIFICATE_PFX_PASSWORD)%5C%22%5C'%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%20%20%5Cn%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E-%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Etask%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3ENuGetToolInstaller%401%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%5Cn%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E-%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Etask%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3ENuGetCommand%402%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Einputs%3A%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3ErestoreSolution%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E%5C'%24(solution)%5C'%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%5Cn%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E-%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Etask%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EVSBuild%401%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EdisplayName%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E%5C'Build%20.csproj%20file%5C'%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Einputs%3A%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Esolution%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E%5C'%24(solution)%5C'%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Eplatform%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E%5C'%24(buildPlatform)%5C'%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Econfiguration%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E%5C'%24(buildConfiguration)%5C'%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%5Cn%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E-%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Etask%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EVSTest%402%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Einputs%3A%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Eplatform%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E%5C'%24(buildPlatform)%5C'%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%20%20%20%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Econfiguration%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E%5C'%24(buildConfiguration)%5C'%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%26lt%3B%5C%2FPRE%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FPRE%3E%3C%2FP%3E%3CP%3EBecause%20my%20solution%20has%20different%20projects%20that%20are%20strongly%20signed%20with%20a%20PFX%20certificate%20I%20have%20first%20to%20add%20the%20certificate%20to%20the%20machine.%20Then%20the%20solution%20build%20happens%20but%20what%20I%20saw%20is%20that%20the%20Container%20name%20for%20the%20Certificate%20task%20is%20different%20for%20every%20project%20that%20is%20built.%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3EWhen%20I%20run%20the%20PowerShell%20script%20for%20the%20certificate%20the%20output%20is%3A%26lt%3B%5C%2FP%26gt%3B%3CPRE%3E%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EThe%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ekey%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Epair%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ehas%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ebeen%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Einstalled%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Einto%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ethe%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Estrong%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ename%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3ECSP%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ekey%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Econtainer%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E%5C'VS_KEY_2211CE6F0D92996F%5C'%26lt%3B%5C%2FSPAN%26gt%3B%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E.%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EVS_KEY_2211CE6F0D92996F%20Finishing%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EPowerShell%26lt%3B%5C%2FSPAN%26gt%3B%20%5Cn%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EAnd%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ein%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ethe%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Esolution%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ebuild%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Etask%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EI%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Eget%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Eerrors%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Erelated%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Eto%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ethe%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EPFX%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ebecause%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Eit%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ecouldn%5C't%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ebe%20found%20because%20every%20project%20compilation%20seems%20to%20be%20running%20on%20different%20containers%3A%26lt%3B%5C%2FSPAN%26gt%3B%5Cn%26lt%3B%5C%2FPRE%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FPRE%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EProject%20A%20error%3A%26lt%3B%5C%2FSTRONG%26gt%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FSTRONG%3E%3CPRE%3E%3CSTRONG%3E%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EError%20MSB3325%3A%20Cannot%20import%20the%20following%20key%20file%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E***cert.pfx.%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EThe%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ekey%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Efile%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Emay%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ebe%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Epassword%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Eprotected.%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3ETo%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ecorrect%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ethis%2C%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Etry%20to%20import%20the%20certificate%20again%20or%20manually%20install%20the%20certificate%20to%20the%20Strong%20Name%20CSP%20with%20the%20following%20key%20container%20name%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EVS_KEY_71452E506F1E61FB%26lt%3B%5C%2FSPAN%26gt%3B%20%26lt%3B%5C%2FPRE%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FPRE%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EProject%20B%20error%3A%26lt%3B%5C%2FSTRONG%26gt%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FSTRONG%3E%3CPRE%3E%3CSTRONG%3E%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EError%20MSB3325%3A%20Cannot%20import%20the%20following%20key%20file%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3E***cert.pfx.%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EThe%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ekey%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Efile%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Emay%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ebe%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Epassword%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Eprotected.%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3ETo%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ecorrect%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Ethis%2C%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3Etry%20to%20import%20the%20certificate%20again%20or%20manually%20install%20the%20certificate%20to%20the%20Strong%20Name%20CSP%20with%20the%20following%20key%20container%20name%3A%26lt%3B%5C%2FSPAN%26gt%3B%20%3CSPAN%20class%3D%22%5C%26quot%3B%5C%26quot%3B%22%3EVS_KEY_1789CEF560C2266D%26lt%3B%5C%2FSPAN%26gt%3B%20%26lt%3B%5C%2FPRE%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FPRE%3E%3C%2FP%3E%3CP%3ESo%20if%20you%20see%20the%20Powershell%20executes%20the%20certificate%20in%20a%20conatiner%20VS_KEY_2211CE6F0D92996F%2C%20then%20Project%20A%20is%20compiled%20in%20a%20container%20VS_KEY_71452E506F1E61FB%20and%20Project%20B%20in%20a%20container%20VS_KEY_1789CEF560C2266D%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3EAny%20clue%20on%20how%20to%20make%20all%20my%20tasks%20execute%20in%20the%20same%20container%3F%26lt%3B%5C%2FP%26gt%3B%26lt%3B%5C%2Flingo-body%26gt%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3C%2FLINGO-SUB%3E
Visitor

I have the following YAML

 

# .NET Desktop
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net

trigger:
- master

pool:
  vmImage: 'windows-latest'

variables:
- group: 'CertPass'

steps:

- task: DownloadSecureFile@1
  displayName: Download Pfx
  name: myCertificatePfx
  inputs:
    secureFile: ventasmlcert.pfx
    
- task: DownloadSecureFile@1
  displayName: Download sni
  name: snInstallPfx
  inputs:
    secureFile: SnInstallPfx.exe    

- task: PowerShell@2
  env:
    SN_INSTALL_PFX: $(snInstallPfx.secureFilePath)
    MYCERTIFICATE_PFX: $(myCertificatePfx.secureFilePath)
    MYCERTIFICATE_PFX_PASSWORD: $(certpass)
  inputs:
    targetType: 'inline'
    script: '&"$($ENV:SN_INSTALL_PFX)" "$($ENV:MYCERTIFICATE_PFX)" "$($ENV:MYCERTIFICATE_PFX_PASSWORD)"'
    
- task: NuGetToolInstaller@1

- task: NuGetCommand@2
  inputs:
    restoreSolution: '$(solution)'

- task: VSBuild@1
  displayName: 'Build .csproj file'
  inputs:
    solution: '$(solution)'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

- task: VSTest@2
  inputs:
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

Because my solution has different projects that are strongly signed with a PFX certificate I have first to add the certificate to the machine. Then the solution build happens but what I saw is that the Container name for the Certificate task is different for every project that is built.

When I run the PowerShell script for the certificate the output is:

The key pair has been installed into the strong name CSP key container 'VS_KEY_2211CE6F0D92996F'. VS_KEY_2211CE6F0D92996F Finishing: PowerShell 

And in the solution build task I get errors related to the PFX because it couldn't be found because every project compilation seems to be running on different containers:

 

Project A error:

 Error MSB3325: Cannot import the following key file: ***cert.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_71452E506F1E61FB 

Project B error:

 Error MSB3325: Cannot import the following key file: ***cert.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_1789CEF560C2266D 

So if you see the Powershell executes the certificate in a conatiner VS_KEY_2211CE6F0D92996F, then Project A is compiled in a container VS_KEY_71452E506F1E61FB and Project B in a container VS_KEY_1789CEF560C2266D

 

Any clue on how to make all my tasks execute in the same container?

0 Replies