microsoft / DockerTools

Tools For Docker, including Visual Studio Provisioning and Publishing
Other
173 stars 26 forks source link

VisualStudioCredential is supported in .NET Framework container? #403

Open noh626 opened 9 months ago

noh626 commented 9 months ago

Hi, I'm currently trying to incorporate docker tools into my projects.

For my .NET 6 application, everything runs smoothly. However, I'm encountering a challenge with an application built on .NET Framework related to obtaining the DefaultAzureCredential. It looks like both the tokenprovider.json and token proxy are absent within the container.

The error I receive is as follows: Visual Studio Token provider cannot be accessed at C:\Users\ContainerAdministrator\AppData\Local\.IdentityService\AzureServiceAuth\tokenprovider.json.

From my observations, the token proxy mounted from my local system to the Docker container seems to be for dotnet core.

I'm wondering if the VisualStudioCredential is compatible with the .NET Framework, or if there's something I missed. Any help would be appreciated.

NCarlsonMSFT commented 9 months ago

@noh626 unfortunately yes, the current support for tokens relies on .NET 6+ being isntalled in the container.