Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Could not find Windows Runtime type 'Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementWatcher'.' #77

Closed
MofaggolHoshen opened this issue Jan 15, 2018 · 3 comments

Comments

@MofaggolHoshen
Copy link

I have created one .Net Core Console App for reading Bluetooth messages and i have referenced Widows.winmd for using BluetoothLEAdvertisementWatcher (Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementWatcher). I am getting this "System.TypeLoadException: Could not find Windows Runtime type 'Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementWatcher'" error while running docker container.

Dockerfile:

FROM microsoft/dotnet:2.0-runtime-nanoserver-1709 AS base
WORKDIR /app

FROM microsoft/dotnet:2.0-sdk-nanoserver-1709 AS build
WORKDIR /src
COPY *.sln ./
COPY ConsoleApp1/ConsoleApp1.csproj ConsoleApp1/
RUN dotnet restore
COPY . .
WORKDIR /src/ConsoleApp1
RUN dotnet build -c Release -o /app

FROM build AS publish
RUN dotnet publish -c Release -o /app

FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "ConsoleApp1.dll"]

@MichaelSimons
Copy link
Member

@summoncse - Since this issue is specific to .NET Core, would you please move the issue to the https://github.com/dotnet/dotnet-docker repo? It would also be useful if you could include what the csproj looks like. I am wondering if this is related to Nano Server? Does the app run within the sdk image?

@MofaggolHoshen
Copy link
Author

@MichaelSimons Here is look like my csproj -

Exe netcoreapp2.0 ..\..\..\Program Files (x86)\Windows Kits\10\UnionMetadata\Windows.winmd true

@MichaelSimons
Copy link
Member

MichaelSimons commented Jan 16, 2018

Moved to dotnet/dotnet-docker#358. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants