felixrieseberg / electron-uwp-background

:zap: Sample explaining how to use UWP background tasks with Electron apps
MIT License
83 stars 13 forks source link

error CS0234: The type or namespace name 'ApplicationModel' does not exist in the namespace 'Windows' (are you missing an assembly reference?) #4

Open Praveer1981 opened 5 years ago

Praveer1981 commented 5 years ago

Hi, I was following the steps mentioned in readme.md->[## Building from Source] I am not able to build BackgroundTaskRegisterer successfully. below is the error which I got in VS2017 1>G:\Github_Downloads\electron-uwp-background\background-task-registerer\Program.cs(3,15,3,31): error CS0234: The type or namespace name 'ApplicationModel' does not exist in the namespace 'Windows' (are you missing an assembly reference?) 1>G:\Github_Downloads\electron-uwp-background\background-task-registerer\Program.cs(39,71,39,89): error CS0246: The type or namespace name 'IBackgroundTrigger' could not be found (are you missing a using directive or an assembly reference?)

Do I need to do any additional settings to get rid off this build error ?

Praveer1981 commented 5 years ago

Hi Any Update on this ?

plamenmetodiev commented 5 years ago

Hi,

You can resolve this by clicking edit to your BackgroundTaskRegisterer.csproj file. There find the Windows reference and check the path of the file. `

C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.16299.0\Windows.winmd

`

This fixed it for me.