Closed sigmarsson closed 3 years ago
I have the same issue. What I did is moved all the stuff in Windows projects to Microsoft native packages: WCT, Behaviors, etc. and removed Uno.WinUI reference as a workaround.
To build for Project Reunion, you'll need to reference the Uno.WinUI.*
packages. You can get a sample for this using the WinUI 3 dotnet new
templates.
I had those Uno.WinUI.* for Wasm as depicted as the last two ones.
Just cranked up one solution for desktop with this template, no reference for such packages are configured for the desktop head. As mine lacks them too.
dotnet new unoapp-winui -o MyApp
Really beyond me, Cleaned, VS Restart, Rebuild, now having 11446 Errors.
These references are set up by that template :
1.txt Attached the log file in case any1 has time to review it.
If you can reproduce the issue in small sample app based on the dotnet new template, it'll help.
Template I used : dotnet new unoapp-winui -o "Weather.History" -uwp=false -ios=false -android=false -macos=false -sw=false -sg=false
0.05% of my source : https://github.com/sigmarsson/5663
Heads are starting up but throwing run time errors.
GitHubExists in both Microsoft.Windows.SDK.Net and Uno #5663 - sigmarsson/5663
Thanks for the repro. The error you are seeing is an intellisense error only, as the build is likely to work properly.
For the original issue you mentioned, it is likely that you are including Uno.WinUI in library projects that are cross-targeted with WinUI 3. In such case, you'll need to conditionally include the nuget package:
<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
<PackageReference Include="Uno.WinUI" Version="3.6.6" />
</ItemGroup>
As some of your library projects are failing to build. Ensure those build individually first.
Cool, dependencies are compiling fine and now I am try ing to compile the Desktop head only and c only 16 errors;
Why is it seeking the types in both Microsoft.WinUI Version=3.0.0.0 and Uno.UI Version=255.255.255.255
I can only succeed to launch the app if I obliterate all references of Uno.UI package and all ones requires it.
<!--<PackageReference Include="Uno.UI" Version="3.6.6" />-->
<!--<PackageReference Include="Infragistics.Uno.Charts" Version="20.2.59-alpha" />-->
Had to remove for example the Infragistics package as well , since it requires Uno.UI. Something is wrong with that package.
Infragistics does not support Uno.WinUI yet, and making a combination of the two is likely to produce the errors you're experiencing.
Have you tried using Uno.UI instead ? (dotnet new unoapp
instead of dotnet new unoapp-winui
)
I had to reference Uno.UI
explicit since I need the Windows.Devices.*
and Windows.Storage
namespaces but I had to remove them. And without having Infragistics included here, I cannot compile as long as Uno.UI
is being referenced.
The Infragistics issue is a separate one then.
App.xaml.cs(89,23): error CS1061: 'LaunchActivatedEventArgs' does not contain a definition for 'UWPLaunchActivatedEventArgs' and no accessible extension method 'UWPLaunchActivatedEventArgs' accepting a first argument of type 'LaunchActivatedEventArgs' could be found (are you missing a using directive or an assembly reference?)
App.xaml.cs(60,44): 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'
Any1 idea why these errors occuring ?
This is happening because you have uno installed on your Windows application. Your application seems to be a mix of WinUI and UWP, and I suggest that you restart the migration from a dotnet new unoapp
to avoid these conversion errors.
This issue is happening for me as well. First I create a blank application which works fine, but as soon as I add Uno.Cupertino, it starts giving a lot of build errors similar to this one:
App.xaml.cs(108,50,108,69): error CS0433: The type 'SuspendingEventArgs' exists in both 'Microsoft.Windows.SDK.NET, Version=10.0.22000.24, Culture=neutral, PublicKeyToken=31bf3856ad364e35' and 'Uno, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null'
@kazo0 have you noticed this as well?
It is happening right now in a new machine here.
I tried using: dotnet new unoapp -o ProjectName Uno-check is ok, but WSL.
But creating the app using the Visual Studio GUI and selecting Net6, it works fine.
Current behavior
I have been migrating about 20-30 projects, earlier was a pure WinUI 3 preveiw 4 solution, but by today I rendered them to net5 libraries so I wish to expect the Uno heads soon be starting up.... So I moved the WinUI pages to the shared project and referenced in Desktop and Wasm heads.
Desktop:
Wasm:
The error's contexts
(Btw, why are the Storage related bits situated in the Uno.UI package? did not even think it was in this particular package)
The
Suspending
event ought to be neat separated by the #ifdef.Throws the error again as this event arg exists in both assembly.
Project files
How to reproduce it (as minimally and precisely as possible)
You need something else of this environment ?
Environment
Nuget Package:
Nuget Package Version(s): Please see above the referenced Nuget packages.
Affected platform(s):
IDE:
Windows 10 OS spec: