You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using winforms2 so I am stuck with net4.8 but I thought it's okay because Microsoft.Toolkit.Uwp.Notifications says that it supports net461 but...!
When building I've got this error:
C:\Program Files\dotnet\dotnet.exe exec "C:\Program Files\dotnet\sdk\8.0.304\Roslyn\bincore\csc.dll" /noconfig /nowarn:1701,1702 /fullpaths /nostdlib+ /platform:AnyCPU /errorreport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:X:\projekty\piwotworki\webview\packages\System.Runtime.WindowsRuntime.4.6.0\ref\netstandard2.0\System.Runtime.WindowsRuntime.dll /reference:X:\projekty\piwotworki\webview\packages\System.Runtime.WindowsRuntime.UI.Xaml.4.6.0\ref\netstandard2.0\System.Runtime.WindowsRuntime.UI.Xaml.dll /reference:X:\projekty\piwotworki\webview\packages\Microsoft.Toolkit.Uwp.Notifications.7.1.3\lib\net461\Microsoft.Toolkit.Uwp.Notifications.dll /reference:X:\projekty\piwotworki\webview\packages\Microsoft.Web.WebView2.1.0.2739.15\lib\net462\Microsoft.Web.WebView2.Core.dll /reference:X:\projekty\piwotworki\webview\packages\Microsoft.Web.WebView2.1.0.2739.15\lib\net462\Microsoft.Web.WebView2.WinForms.dll /reference:X:\projekty\piwotworki\webview\packages\Microsoft.Web.WebView2.1.0.2739.15\lib\net462\Microsoft.Web.WebView2.Wpf.dll /reference:X:\projekty\piwotworki\webview\packages\Microsoft.NETFramework.ReferenceAssemblies.net48.1.0.0\build\.NETFramework\v4.8\mscorlib.dll /reference:X:\projekty\piwotworki\webview\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll /reference:X:\projekty\piwotworki\webview\packages\Microsoft.NETFramework.ReferenceAssemblies.net48.1.0.0\build\.NETFramework\v4.8\System.Core.dll /reference:X:\projekty\piwotworki\webview\packages\Microsoft.NETFramework.ReferenceAssemblies.net48.1.0.0\build\.NETFramework\v4.8\System.Data.dll /reference:X:\projekty\piwotworki\webview\packages\Microsoft.NETFramework.ReferenceAssemblies.net48.1.0.0\build\.NETFramework\v4.8\System.dll /reference:X:\projekty\piwotworki\webview\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll /reference:X:\projekty\piwotworki\webview\packages\Microsoft.NETFramework.ReferenceAssemblies.net48.1.0.0\build\.NETFramework\v4.8\System.Windows.Forms.dll /reference:X:\projekty\piwotworki\webview\packages\Microsoft.NETFramework.ReferenceAssemblies.net48.1.0.0\build\.NETFramework\v4.8\System.Xml.dll /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\EventBus.dll /subsystemversion:6.00 /target:library /utf8output /langversion:7.3 StorageEvents.cs Properties\AssemblyInfo.cs "obj\Debug\.NETFramework,Version=v4.8.AssemblyAttributes.cs"
0>StorageEvents.cs(95,17): Error CS0012 : The type 'IAsyncAction' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows.Foundation.FoundationContract, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'.
0>StorageEvents.cs(98,50): Error CS0012 : The type 'ScheduledToastNotification' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows.Foundation.UniversalApiContract, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'.
0>------- Finished building project: EventBus. Succeeded: False. Errors: 2. Warnings: 0C:\Program Files\dotnet\dotnet.exe exec "C:\Program Files\dotnet\sdk\8.0.304\Roslyn\bincore\csc.dll" /noconfig /nowarn:1701,1702 /fullpaths /nostdlib+ /platform:AnyCPU /errorreport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:X:\projekty\piwotworki\webview\packages\System.Runtime.WindowsRuntime.4.6.0\ref\netstandard2.0\System.Runtime.WindowsRuntime.dll /reference:X:\projekty\piwotworki\webview\packages\System.Runtime.WindowsRuntime.UI.Xaml.4.6.0\ref\netstandard2.0\System.Runtime.WindowsRuntime.UI.Xaml.dll /reference:X:\projekty\piwotworki\webview\packages\Microsoft.Toolkit.Uwp.Notifications.7.1.3\lib\net461\Microsoft.Toolkit.Uwp.Notifications.dll /reference:X:\projekty\piwotworki\webview\packages\Microsoft.Web.WebView2.1.0.2739.15\lib\net462\Microsoft.Web.WebView2.Core.dll /reference:X:\projekty\piwotworki\webview\packages\Microsoft.Web.WebView2.1.0.2739.15\lib\net462\Microsoft.Web.WebView2.WinForms.dll /reference:X:\projekty\piwotworki\webview\packages\Microsoft.Web.WebView2.1.0.2739.15\lib\net462\Microsoft.Web.WebView2.Wpf.dll /reference:X:\projekty\piwotworki\webview\packages\Microsoft.NETFramework.ReferenceAssemblies.net48.1.0.0\build\.NETFramework\v4.8\mscorlib.dll /reference:X:\projekty\piwotworki\webview\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll /reference:X:\projekty\piwotworki\webview\packages\Microsoft.NETFramework.ReferenceAssemblies.net48.1.0.0\build\.NETFramework\v4.8\System.Core.dll /reference:X:\projekty\piwotworki\webview\packages\Microsoft.NETFramework.ReferenceAssemblies.net48.1.0.0\build\.NETFramework\v4.8\System.Data.dll /reference:X:\projekty\piwotworki\webview\packages\Microsoft.NETFramework.ReferenceAssemblies.net48.1.0.0\build\.NETFramework\v4.8\System.dll /reference:X:\projekty\piwotworki\webview\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll /reference:X:\projekty\piwotworki\webview\packages\Microsoft.NETFramework.ReferenceAssemblies.net48.1.0.0\build\.NETFramework\v4.8\System.Windows.Forms.dll /reference:X:\projekty\piwotworki\webview\packages\Microsoft.NETFramework.ReferenceAssemblies.net48.1.0.0\build\.NETFramework\v4.8\System.Xml.dll /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\EventBus.dll /subsystemversion:6.00 /target:library /utf8output /langversion:7.3 StorageEvents.cs Properties\AssemblyInfo.cs "obj\Debug\.NETFramework,Version=v4.8.AssemblyAttributes.cs"
0>StorageEvents.cs(95,17): Error CS0012 : The type 'IAsyncAction' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows.Foundation.FoundationContract, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'.
0>StorageEvents.cs(98,50): Error CS0012 : The type 'ScheduledToastNotification' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows.Foundation.UniversalApiContract, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'.
0>------- Finished building project: EventBus. Succeeded: False. Errors: 2. Warnings: 0
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello!
I am using winforms2 so I am stuck with net4.8 but I thought it's okay because
Microsoft.Toolkit.Uwp.Notifications
says that it supports net461 but...!When building I've got this error:
I've only used this code:
Basically it needs
Windows.Foundation.FoundationContract
but minimal framework for this package is .NET 5.What to do? how to live?
Beta Was this translation helpful? Give feedback.
All reactions