Sample "Phoneword" project - Empty app view on deploy - c#

The title says it all, I was just beginning learning Xamarin and installed VS Community 2015 and Xamarin.Android. I was guided by this link.
I started the sample project, the Phoneword app flashed on my Android 5.1 Oppo but not with the elements (e.g. Text Field, Button, etc).
Any ideas?

It just happened that Visual Studio by default comments out the line of code that set the main layout as the current Activity layout. Its now working all fine except that I need to find another software for the emulator because its taking me forever to boot one. Thanks!

Related

WinUI 3 xaml ABI.Microsoft.UI vs Microsoft.UI

I'm trying to use WinUI (3) for the first time.
I've followed the instructions at https://learn.microsoft.com/en-us/windows/apps/winui/winui3/#install-winui-3-preview-4 so installed vs 2019 preview (Professional Version 16.9.0 Preview 4.0) and installed the "WinUI 3 Project Templates via the Manage Extensions option.
Created a new solution, added project type "Blank app, Packaged (WinUI in desktop)" (C#) and this is the result:
I can start debugging and the window opens and can click the example button without any issues.
But when I open the xaml I have this issue:
And the intellisense doesn't give options like for example grid.
The imported namespaces in the code behind:
So all the basics of a new WINUI project on a clean vs 2019 preview installation. I've only installed Resharper and imported my settings from my regular vs 2019 installation (which I reset but to no avail).
When I choose for Microsoft.UI.Xaml.Window he changes the xaml to
And gives following errors:
When choosing ABI.Microsoft.UI.Xaml.Window the xaml changes in the same way as before but also gives exceptions on other properties like "The property 'HorizontalAlignment' was not found in type 'StackPanel'".
No idea if this matters but as I've never worked with WPF I don't have experience with xaml (always worked with winforms as frontend). So I also added a WPF project to this solution and this worked without any issue.
I can't find anything regarding this so please help me set my first steps in WINUI.
I've notificed it worked for a few seconds after reopening my solution. So prime suspect was Resharper. Disabled it, and problem is solved. Re-enabled it, updated to 2020.3.2 and it worked.
So lesson here: It's not because you just installed Resharper, that it also downloads the latest version ...

'System.Exception' thrown in new Xamarin.Forms project

I've installed a fresh copy of Visual Studio 2017 Community Edition on Windows 10 Pro Fall Creators Update recently, and I'm unable to properly create a new ContentPage on Xamarin.Forms (see screenshots 1-3). At my first attempt of creating a new ContentPage in a new Xamarin.Forms project, I encountered the errors seen on screenshot 1 and 2.
Next, an automated error log was generated (as attached). If I don't create any new items and run as-is, I can successfully launch the app on my Android emulator with no issues.
Exception of type 'System.Exception' was thrown
The project system has encountered an error.
Did not find new element in the hierarchy for item "Page2.xaml". The
item would have been added with type "Page". The project item
schema service knows about this item type. The item does exist
in the project file.
A diagnostic log has been written to the following location: "C:\..." (see below link)
Automatically generated error log file - txt
The issues arise when I create a new ContentPage. The code-behind .cs file and .xaml file will not be immediately visible in the Solution Explorer. I need to manually click the Show All Files button to show the newly created files (as seen in screenshot 3). However, I couldn't include them into project despite multiple tries.
When I open a .xaml file (in this case Page2.xaml), errors mentioning missing references and assemblies are visible (see screenshot 4 below).
I've done the following thus far:
Removed mobile app development (Xamarin) in the Visual Studio
installer
Reinstalled Xamarin by including (checking) the mobile app
development (Xamarin) in the Visual Studio installer
Are there any known solutions to this issue? Any assistance is kindly appreciated. Thanks!
UPDATE (Feb 27): Attempted recommendation by Paul-Jan but the issues still persist. However, the newly created Page1.xaml was properly included and recognized by Solution Explorer (as shown below).
I've had this happen with fresh VS2017 Professional installs where Universal Windows Platform (UWP) support was not added during install. Of course you might have no desire at all to develop for UWP, but apparently there are bits and pieces of the Xamarin Forms toolchain missing when you don't install it.
Running the Visual Studio Installer again, adding UWP support, helps.

Xamarin for Windows Installation

I'd like to install the Xamarin Studio on Windows so I searched on google and it led me here https://store.xamarin.com/account/my/subscription/downloads. I clicked the download and the setup begins. I clicked CONTINUE and 'yes' to allow changes to my computer. And after that, nothing happened. I waited for a few minutes and still, nothing happens. I went back to that link and repeated all the steps but again, it didn't work. Help me pls I really need the XS :(
#Kristine
The best way to have Xamarin is installing the VS, since the 2015 version you can have Xamarin inside VS. BTW, you don't need to pay (but you can if you want to) because there is Community version of VS.
On Windows OS, you don't need to download Xamarin Studio for developing with Xamarin.
Use VS 2017 is better, you browse https://www.visualstudio.com/vs/community/ to download and install Visual Studio 2017 because it supports Xamarin now(https://blog.xamarin.com/better-apps-visual-studio-2017/)
After you started downloaded file, you will see some options that you can choose. You can choose Xamarin.
If you don't know which ones should be chosen, just choose all.
It works for me.

Visual Studio 2017 does not working - Always freezing and saying "it's busy"

Every time I trying to create some Xamarin project it freezees and when I try to click anyware in UI, pop ups a notification from Windows saying the the "VS 2017 it's busy" something like that. For task mananger still answers and runs normally. The same happens if go to Tools -> Options and try go to Xamrin category. I tried to explore other functions of the new IDE, same happens when I create a WPF project and try to access the toolbox with UI elements.
I created other kind of projects for test, and console projects and and the integration with Unity seems is working fine too.
I've tried repair the installation too but no success.
I tried to download the SDK and NDK through the VS Installer mentioned in other question but didn't fixed too. And what about the WPF toolbox, why is not working either?
UI is freeze
Try updating Visual studio 2017 from the installer,it worked for me. Thanks.

Visual Studio 2015 C# project icon options missing

Using MS Visual Studio Community 2015 (Update 2), I have started a C# Universal application and I want to set its icon. The information here states where it should be and indeed where I thought it would be, but its not.
Am I missing an intrinsic part of setting my application up?
This is what I see where I would expect to see icon options: -
(This is my first venture in C#!)
The process (and link) you describe is for a Windows application, not an UWP application.
See this post for the instructions on setting up the icon of an UWP app.

Categories