microsoft / containerregistry

Microsoft Artifact Registry description and related FAQ
397 stars 89 forks source link

Using build function from mcr.microsoft.com/dotnet/sdk:3.1 thorw error #104

Closed thealbres closed 4 months ago

thealbres commented 2 years ago

Hi, I am trying to build a dacpac using the dotnet container, but when I try to use the build function it throws a error

The error I am getting is this : image /app/Receivables.sqlproj(61,3): error MSB4019: The imported project "/usr/share/dotnet/sdk/3.1.416/Microsoft/VisualStudio/v11.0/SSDT/Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the expression in the Import declaration "/usr/share/dotnet/sdk/3.1.416//Microsoft/VisualStudio/v11.0/SSDT/Microsoft.Data.Tools.Schema.SqlTasks.targets" is correct, and that the file exists on disk.

I also tried to run from command line instead of a dockerfile, same error. I found some questions on the internet about the same error, but everyone I saw about that was during the building localy, since I am using docker I don't think the approaches also work for me.

This is my docker file

FROM mcr.microsoft.com/dotnet/sdk:3.1 AS dacpac_builder

COPY ./../Receivables /app
RUN cd /app && dotnet build Receivables.sqlproj

Can someone help me?

Thanks

mthalman commented 2 years ago

Since your question is specific to a .NET container image, a better location for this would be at https://github.com/dotnet/dotnet-docker/discussions.

thealbres commented 2 years ago

Done! https://github.com/dotnet/dotnet-docker/discussions/3534

Thank you