Comment by maxxxxx
8 years ago
But again they have no upgrade path. They just produce something new and expect everyone to jump on board. My expectation is that UWP will last 2-3 years and then they will have something else that does the same but in a different way and UWP is in maintenance mode.
You may be confused. .NET Standard 2.0 support for UWP means the upgrade path is (finally) here today. Start a UWP project in VS 2017.4, make sure the project targets the Fall Creator's Update (the Windows 10 feature update to be released at the end of this month), and from that UWP app you can now add a reference to almost anything on NuGet you want. .NET Standard 2.0 support means that if it ran on the .NET Framework 4.x, it likely runs on UWP now (with rarer but obvious exceptions like using old WPF or WinForms libraries, some of which will still "work" as no-ops not actually doing anything).
Again, I'm not sure how much clearer of an upgrade path you could want? If you have a WPF app today, everything but the XAML will work in Fall Creators Update UWP. The XAML may even be trivial to convert to UWP XAML, they are related like family.
Wait so are you saying UWP apps can now access the machine they're running on in a sane manner (so, limited only by the privileges of the user who ran the app, without additional limitations enforced by the platform itself)?
Because that was the main limitation of Metro apps, you couldn't really do anything useful with them, you couldn't even access the hard drive normally or edit the windows registry. This is why you couldn't "upgrade". It wasn't an upgrade to any previous tech, it was a downgrade as the platform literally had less capabilities. It is, or at least was, basically a platform for making sandboxed mobile apps that you can run on the desktop...
This is why they clearly weren't (at least Metro, I haven't worked with UWP) an "upgrade" to anything. Silverlight wasn't an "upgrade" to WPF for the exact same reason. It was a more limited platform and you couldn't switch WPF apps over. So MS calling Silverlight or Metro a new version of WPF would have been retarded.
Things are still sandboxed, but the sandbox has grown a lot since early Windows 8 ("Metro" era). Depending on your definition of "sane", it seems rather "sane" to me to have at least some sandbox protection of the applications to run. Yes, Windows 8 felt like a straight-jacket more than a sandbox to some, but current UWP, especially with .NET Standard 2.0 support in the FCU, at least builds with most of the libraries even if some of them are essentially no-ops or (security) exceptions at runtime.
So, you still can't touch the registry by default, but why would you want to? There are much better places to store stuff.
The UWP is meant to be a replacement for Win32, so it shouldn't be a shock that a lot of Win32 components aren't available by default.
However, you can use the Desktop Bridge and request permission in your app manifest for more privileges, including things like registry access. The Desktop Bridge has a lot of examples out there on things you can do. You can use the Desktop Bridge to transition a WPF app slowly to UWP over time. For instance, you could launch UWP screens from your WPF app, allowing you to move piece-at-a-time if you wanted. There are even samples on how to migrate settings currently stored in the registry (ugh, why) over to Local AppData storage like a proper application, to transition away from Win32 bad practices. (Of course, the parts of the application that need the Desktop Bridge will only work on Windows with a Win32 subsystem.)