Closed sigmarsson closed 3 years ago
It looks like you've added a reference to a package that uses WPF somehow, which is not supported by Uno. You're also trying to use net6 packages, which are not yet tested with Uno.
Okay, set them back down to 5 and also obliterated that Desktop build target but still witness exactly the same 9 errors as earlier.
Can you share the build binlog as mentioned here: https://platform.uno/docs/articles/uno-builds-troubleshooting.html ?
$msbuild Weather.History.sln /bl
without PackageReference Include="Uno.UI" Version="3.6.6"
$msbuild Weather.History.sln /bl
with PackageReference Include="Uno.UI" Version="3.6.6"
Thanks for the binlog. You're importing a dependency to vanara.pinvoke.gdi32
, which uses WPF. You'll need to remove it from your dependencies for this to work on WebAssembly.
Done. Whats more, vanara* removed but still 11432 errors while building the Wasm head and those 14 errors in winUI head still vexing if Uno.UI 3.6.6 is being referenced, exhibited by #5663
Can you post again a binlog ?
Thanks. You cannot mix Uno.UI and Uno.WinUI in the same solution. Your project file contains this:
<PackageReference Include="Uno.WinUI.WebAssembly" Version="3.7.0-dev.195" />
<PackageReference Include="Uno.WinUI.RemoteControl" Version="3.7.0-dev.195" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.Wasm.Bootstrap" Version="2.1.0-dev.48" />
<PackageReference Include="Uno.Wasm.Bootstrap.DevServer" Version="2.1.0-dev.48" />
<PackageReference Include="Uno.UI" Version="3.6.6" />
You need to remove the last Uno.UI reference.
Merci. That was helping everything to resolve on the Wasm head. Did you mean those WinUI and UI packages are exclusive incompatible for any head ? e.g. Like these ones in the Desktop head ?
<PackageReference Include="Microsoft.ProjectReunion.WinUI" Version="0.5.0" />
<PackageReference Include="Uno.UI" Version="3.6.6" />
That's exactly right, you cannot have both packages in a project, directly or indirectly.
Okay. But how shall I harness the Windows.Devices
and Windows.Storage
namespaces in this case ?
If you're on the UWP project, you can use those APIs directly, they are readily available. If on non-windows platforms, you can use Uno.UI or Uno.WinUI but not both. Also you cannot use Microsoft.ProjectReunion.WinUI
but it is already part of the Uno.WinUI
package for the non-windows platforms.
Okay, cool. You will introduce a new package or multiple ones later for Windows non-UWP to make Windows.Devices
and Windows.Storage
namespaces available. Is that true?
Those namespaces are already available in all targets. The errors you are getting are caused by both packages (Uno.UI and Uno.WinUI) being present, you need only one.
Would you mind I am dispatching you another binlog ? Just replaced the WinUI pgks with Uno.UI and got this :
I can find no more refs on Uno.WinUI pkg.
Thanks. Replacing Uno.WinUI with Uno.UI also implies moving most of the Microsoft.UI.Xaml
to Windows.UI.Xaml
as well (WinUI to UWP).
Okay, changed the NS and droped Microsoft.ProjectReunion* too and now under 20 errors.
Why TabView
cannot be found now ?
https://stackoverflow.com/questions/60053616/tabview-suddenly-missing-from-uwp
Perhaps TabView isnt existing any more in UWP? Shall I install the Microsoft.UI.Xaml pkg?
Stack OverflowWas trying to implement a TabView in my UWP project yesterday but it doesn't show up in the ToolBox and if I add it via code it says TabView is not supported in a Windows Universal Project. Th...
Okay, Microsoft.UI.Xaml
pkg added and hopefully the remaining error is the one exhibited in #5663
With.Microsoft.UI.Xaml.nuget.zip
error CS0433: The type 'LaunchActivatedEventArgs' exists in both 'Microsoft.Windows.SDK.NET, Version=10.0.19041.10, Culture=neutral, PublicKeyToken=31bf3856ad364e35' and 'Uno, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null'
The Microsoft.UI.Xaml
package cannot be added to the Uno heads, and only on the UWP head. You will have to uninstall it from the Uno heads.
Wasm head compilation errors
This is the project file :
How to reproduce it (as minimally and precisely as possible)
Perhaps the presence of the preview packages ?
Workaround
Yet undisclosed.
Environment
Nuget Package:
Nuget Package Version(s):
Affected platform(s):
IDE:
Relevant plugins:
Anything else we need to know?
Perhaps
<TargetFramework>net5</TargetFramework>
causin problems ?Build log