Visual Studio 2017 XAML designer for UWP is always loading - c#

I have just started working with Universal Windows Platform. I have upgraded to Win10 recently from Win7. I re-installed VS17 IDE and started working with UWP platform. However, when I try to open MainPage.xaml, the designer is always loading. The app builds correctly, though. In contrast, things go well with WPF and WinForms app designers.
I ran "ngen update /NoDependencies" ("ngen update" failed due to missing System.Web references) but that did not change anything.
My OS is brand new Windows 10 Fall Creators Upgrade (10.0.16299), so my UWP target version is the only possible one in the list. I can only change the Min Version.
Any advice would be grateful.

Partial success.
The XAML works with Windows 10 Creators Upgrade (10.0.16299) SDK which I managed to install as an additional package.

Related

Running Mono C# projects on Mac ... and Winforms

For the first time I am trying Visual Studio for Mac and I located a tutorial for writing a exe that shows a window with a simple menu.
My two questions are:
How does a user of a Mac get the Mono platform? I can't find instructions for deploying Mono. When I look in my exe folder there is no other files. Just the exe.
Maybe this should be a different question but I could not find any "WinForms" version in Visual Studio for mac. I had to use Gtk2 (I think).
If there is a better place to ask these questions please direct me. Thanks.
I know understand that the best course of action was:
Create a Xamarin.Forms multi-platform project.
Create a Cocoa Mac OS project.
Add a reference to project 1 into project 2.
Using Nuget Package Manager download Xamarin.Forms into each project.
Now it is easy to create an application with XAML (similar to WPF).
Visual Studio for Mac creates the multi-platform project (step 1 above) automatically with the Android and iOS platform builds, but not the macOS.
I also see that I don't really need to download Mono as it is all dealt with automatically.
.NET Core does support Mac and Linux. And even though .NET Core now supports Windows Forms. Windows Forms is only supported on Windows. It's unlikely this will ever change due to Windows Forms dependency on the Windows APIs.

Setting UWP Target System

I'm building an UWP application using Visual Studio 2017 Community Edition.
Everytime I create a new UWP project, I cannot select Target version lower than version 1809. See below pic.
My problem is, my current windows 10 version is 1803, and when I want to update my windows 10 to 1809, I found that 1809 is somehow not available according to this post in windows forum below:
Link to forum
What happen then, when ever I want to design and preview my UWP app, I cannot render all controllers within the page. Like below pic.
My question are:
How can I resolve this besides waiting for update 1809 avail?
Is there anyway I can change the TARGET VERSION of my app? so I can have better experience in coding my app?
Thanks
If I understand correctly, you have to install older SDK for Min version before you start work.
You can find all versions of it on this page and download them Windows SDK and emulator archive .
for example If you want it to be at least compatible with the Windows 10 Anniversary Update then you should download and install SDK (ver. 10.0.14393.795)

Xamarin.Forms Previewer is not working

I Install Visual Studio 2017 version 15.1 (26403.7) Release.
also install Xamarin workload, when I create new Xamarin Cross Platform App and open Xamarin.Forms Previewer for render view, Get this error:
mono.android.DesignerException: md5e940e1e778de0f856e343395a2f338c5.XFPageRendererView.n_onMeasure(II)V
at mono.android.DesignerException.fromThrowable(DesignerException.java:43)
at mono.android.DesignerSession.checkRenderResultForError(DesignerSession.java:177)
at mono.android.DesignerSession.load(DesignerSession.java:228)
at mono.android.DesignerSession.processMessage(DesignerSession.java:693)
at mono.android.MessageListener.executeMessage(MessageListener.java:88)
at mono.android.MessageListener$Runner.run(MessageListener.java:44)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.UnsatisfiedLinkError: md5e940e1e778de0f856e343395a2f338c5.XFPageRendererView.n_onMeasure(II)V
at md5e940e1e778de0f856e343395a2f338c5.XFPageRendererView.n_onMeasure(Native Method)
at md5e940e1e778de0f856e343395a2f338c5.XFPageRendererView.onMeasure(XFPageRendererView.java:54)
at android.view.View.measure(View.java:19731)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6120)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:19731)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461)
at android.view.View.measure(View.java:19731)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.measureView(RenderSessionImpl.java:545)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:342)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:429)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:389)
at mono.android.DesignerSession.load(DesignerSession.java:222)
... 4 more
JDK Version: 1.8.0_121
Right click in your application project xamarin.android. Go to properties and select in using the most recent platform.
Most often its due to the Java Development Kit version that needs to be on 1.8 AND make sure its the 64-bit version. Then update the JDK location in VS in the options, for me the current location is:
C:\Program Files\Java\jdk1.8.0_121
Had the same problem, updated the Minimum Android target to 19, rebuilt and restarted VS to resolve the problem.
For fix this issue I update Android SDK API 24, more information

Broken Reference in WDK 8.1 Printer Extension Sample

I've installed Visual Studio 2013 Premium and the WDK 8.1 Update, unfortunately though, when I open the Printer Extension Sample ([https://code.msdn.microsoft.com/windowshardware/Printer-extension-sample-0e3e1562][1]) from the WDK samples pack, the reference to PrinterExtensionLib is broken.
I'm sure there must be a prerequisite I'm missing somewhere, but I've got the latest .Net, latest updates to Visual Studio and the latest WDK 8.1, so I'm not sure what I'm missing.
I've placed the sample project in c:\apps as the sample tells you to do, but still not joy.
Does any body know what I'm missing / haven't installed?
Well, I've just spun up a Windows 8 VM and the reference seems to be satisfied, so I guess you can only build some of these samples on a Windows 8 Machine. The sample states that it should be run on Windows 8, but I didn't see build machine requirements.
So, I guess the answer is, I was missing Windows 8 (Yuk).

How to use SQLite on new Windows 8.1 Store app (Visual Studio 2013)

So, I installed Visual Studio 2013 on my Windows 8.1 box. I want to experiment with it and created a new Windows Store Grid App. I want to persist data on a SQLite database, apparently the database of choice for WinRT apps.
Quickly found links to the vsix needed in order to be able to use the SDK: SQLite download page, and downloaded sqlite-winrt81-3080002.vsix.
Installed it, then in my project, added the reference to the newly installed SDK (right click references, add reference, navigate to Windows, select extensions and tick SQLite for Windows Runtime (Windows 8.1) checkbox.
Also quickly found that it won't compile on Any CPU. On Configuration Manager, selected Debug, x64 active platform, that made me able to compile the application.
Finally, while attempting to use the namespace SQLite I noticed VS 2013 isn't recognizing it. Attempted many things like adding reference to the .dll directly, exploring the component to see which namespaces were available (which doesn't show anything), and I'm quickly running out of ideas. Because it's kinda new thing, and with limited interest, google, the saviour, doesn't want to save me today.
So, how one would be able to use the SQLite SDK in their Visual Studio 2013 projects, targeting Windows Runtime 8.1?
These are the contents of my csproj file
UPDATE
Stupid me, thought there was no managed land (.net) in Metro style land. Sorry for causing any confusion.
I installed the VSIX for SQLite and noticed that it is a native DLL to be used in Windows Store 8.1 C++ apps. It is not for managed C# projects.
The current NuGet package for SQLite from what seems to be the 'official' SQLite team is only working for .NET 4.5, if you try to install it, it will error saying it does not support .NET 4.51.
There is also the NuGet package SQLite-net, which works for .NET Windows Store apps. All you need to add is the SQLite using statement.
You will need this NuGet package as it is the managed wrapper for the SQLite, without you will not be able to properly reference the right DLL for SQLite.
Here is the link to the project information from that NuGet package. SQLite Runtime Support
Here is an article on how to use SQLite with Windows Store apps in VS2012 but it should still all apply:
SQLite and Windows Store Apps

Categories

Resources