I am new to Docker and I am trying to build a WPF application using Docker.
The WPF application runs on .NET Framework 4.8.
This is the contents of my Dockerfile:
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8 as base
WORKDIR /
COPY . ./
RUN nuget restore
RUN msbuild /t:Restore ./ProjectName.csproj
RUN msbuild /p:Configuration=Release ./ProjectName.csproj
And im using
docker build -f Dockerfile . --no-cache
to build.
Everything runs fine until the last row when it errors out and I get this error:
error CS0246: The type or namespace name 'MSTSCLib' could not be found (are you missing a using directive or an assembly reference?)
I'm guessing there is some problem with the reference to MSTSClib, but I cant figure out how to solve it.
I've tried the following:
- Changing "copy local"
- Changing "Embed Interop Types"