Open MadEste opened 4 years ago
Thanks @MadEste!
Roslyn Analyzers cannot parse .xaml files. Implement xml reader or find/replace to update to webview2?
@mrlacey for FYI on consuming the RapidXaml analyzers, which he demoed the WebView2 converter during the last community call
There are also some changes to IXP APIs that have been moved the .Experimental
namespaces and are all prefixed with Exp
. Depending on the timeline of this tool, we may want to update analyzer+code fixers to make these changes. I think the plan is that by May/June timeframe for these APIs to no longer be in the Experimental
namespace, but if we do nothing, then it will make it hard to test/validate the end-to-end of this tool.
Edit: Here are the experimental namespaces:
Microsoft.UI.Composition.Experimental
Microsoft.UI.Hosting.Experimental
Microsoft.UI.Input.Experimental
I have a PoC for converting WebView
to WebView2
that also takes care of adding/using appropriate xmlns. This is at https://github.com/mrlacey/TryConvertXaml/blob/main/TryConvertXamlSample/Program.cs
It's based on functionality from https://aka.ms/rxt
I just need to remove the final dependency on the VisualStudio SDK (it was originally solely a VSIX) and then can have it target .NET Standard. Due to the uncertainty of a timeline for this it wasn't previously a priority, but working on this again now.
Due to the uncertainty of a timeline for this it wasn't previously a priority, but working on this again now.
@mrlacey my apologies if I gave a pretense that we were looking into the xaml analyzers soon. There is still no real certain timeline yet, so please don't feel rushed. After Preview3 we could look into this, but then it's the holiday season, so it's a real possibility this won't be picked up until the new year.
Due to the uncertainty of a timeline for this it wasn't previously a priority, but working on this again now.
@mrlacey my apologies if I gave a pretense that we were looking into the xaml analyzers soon. There is still no real certain timeline yet, so please don't feel rushed. After Preview3 we could look into this, but then it's the holiday season, so it's a real possibility this won't be picked up until the new year.
Ok. Just wanted to get the current limitation documented and note that I was working on it. Just bumping it up my own internal backlog as it has other benefits for me too. I want to make sure it is done before it's needed here.
Also this just came to mind, is how do we convert .csproj which are using a C++ runtime component. you now need to create an interop project in most cases, and it's a non-trivial amount of work to do so
/cc @angelazhangmsft
Is there a build of the WinUI branch available or should I build from source?
If and when this gets picked up again, I have an improved version of my library that can be used for the XAML changes. It's improved on the basis that this version:
WinUI3 Conversion To Do
This is specific to the feature/winui branch. #306 There are still some requirements and improvements for a UWP App to WinUI3 Conversion feature.
Window.Current
which returns null in WinUI3. Create an Analyzer/CodeFix to update the C# source code?