How do I get the UWP back into Xamarin.Forms Cross-Platform creation to have the templates ready to roll?
After picking through the release notes, playing with VS2019's UI and a few hours of web searching, I have only found others posting about the problem in the preview versions. Some say UWP is gone forever, some say it just isn't included by default (so Microsoft can brag about how the install went from 23GB to 8GB or something like that) - but no help on HOW TO re-enable it, or add it to the project creation wizard (apart from adding a blank UWP project sans all code that is in the iOS/Android projects).
<Project Sdk="Microsoft.NET.Sdk">
// the code is not the problem here,
// getting TO the code is the problem
</Project>
EXPECTED:
In VS2017, Xamarin.Forms Cross-Platform supplied iOS + Android + UWP templates by default.
ACTUAL:
Visual Studio 2019 seems to have removed the UWP template from Xamarin.Forms Cross-Platform project creation.
Update 9 apr.: a new version of 2019 was released which reinstates the UWP templates again
It is correct that the UWP template is removed from VS2019, I don't know the reason behind it, but we'll have to deal with it. There is however a page that runs you through the process step by step. It has been there for a while for the projects that were created in Visual Studio for Mac, which don't include the UWP template as well. The full description can be found here: https://learn.microsoft.com/en-us/xamarin/xamarin-forms/platform/windows/installation/ taken from this page:
First, right-click on the solution and select Add > New Project... and add a Blank App (Universal Windows) project:
Then, select the minimum and targeted UWP versions.
Right-click on the UWP project and select Manage NuGet Packages... and add the Xamarin.Forms package. Ensure the other projects in the solution are also updated to the same version of the Xamarin.Forms package.
Also, make sure the new UWP project will be built in the Build > Configuration Manager window (this probably won't have happened by default). Tick the Build and Deploy boxes for the Universal project:
Right-click on the UWP project and select Add > Reference and create a reference to the Xamarin.Forms application project (.NET Standard or Shared Project).
In the UWP project, edit App.xaml.cs to include the Init method call inside the OnLaunched method around line 52:
// under this line
rootFrame.NavigationFailed += OnNavigationFailed;
// add this line
Xamarin.Forms.Forms.Init (e); // requires the `e` parameter
In the UWP project, edit MainPage.xaml by removing the Grid contained within the Page element. Then in MainPage.xaml, add a new xmlns entry for Xamarin.Forms.Platform.UWP, like this: xmlns:forms="using:Xamarin.Forms.Platform.UWP".
In MainPage.xaml, change the root <Page element to <forms:WindowsPage, like this:
<forms:WindowsPage
...
xmlns:forms="using:Xamarin.Forms.Platform.UWP"
...
</forms:WindowsPage>
In the UWP project, edit MainPage.xaml.cs to remove the: Page inheritance specifier for the class name (since it will now inherit from WindowsPage due to the change made in the previous step)
public sealed partial class MainPage // REMOVE ": Page"
In MainPage.xaml.cs, add the LoadApplication call in the MainPage constructor to start the Xamarin.Forms app:
// below this existing line
this.InitializeComponent();
// add this line
LoadApplication(new YOUR_NAMESPACE.App());
Add any local resources (eg. image files) from the existing platform projects that are required.
And now it should work as before. I know, it's a hassle to go through it for something that just worked before. Sorry about that, but this should get you there as well.
With the Update 16.0.1, Microsoft restored the UWP creation on new Xamarin.Forms applications
except when you try to use Shell, which is not available for UWP:
Issues fixed in Visual Studio 2019 version 16.0.1
Add option for Windows (UWP) platform when creating new Xamarin.Forms project from 'Mobile App (Xamarin.Forms)' project
template.
EDIT (7/17/2021): i have started a new xamarin forms solution and it seems all 3 platforms are available again in VS2019 on all prebuilt templates (blank, master-detail, tabbed layout).
thank you, everyone, for your input.
great information!
it helped me steel myself to face the fact:
UWP is gone (for now) from Xamarin.Forms new project scaffolding.
but, the (simplest) solution to the question asked that i have found is:
open VS2017. create new Xamarin.Forms cross-platform project.
once it is open, save-all.
then close VS2017 and open in VS2019 if so desired.
I've created an application using Microsoft Foundation Class library (MFC) using the project creation wizard. I created a multiple-document interface (MDI) application. The wizard creates dummy toolbars and menus that you can work with. I extended the default toolbar with no issue however now when I try to edit it through the resource view, I get "Unknown Bitmap Format" and the toolbar doesn't open. I haven't changed the file outside of Visual Studio therefore I'm unsure as to what causing this. The toolbar still opens and works fine when the application is running, its just now I can't edit it. The Error Message
I can't seem to find a solution anywhere. The only other similar post I can find is here http://www.databaseforum.info/2/8/1e1b848b13ed1254.html however no solution has been found for them.
I've had the same error, using bitmaps exported from GIMP - and I found this post (which I haven't still tried):
https://www.curlybrace.com/words/2013/08/30/exporting-visual-studio-compatible-bitmaps-from-gimp/
When exporting bitmaps from GIMP, two options must be selected in order for the bitmaps to be compatible with Visual Studio:
Under Compatibility Options, check “Do not write color space information”.
Under Advanced Options, select “R8 G8 B8” under 24 bits.
I'm trying to create this application on Visual Studio 2010 using Forms with ComboBox
http://pastebin.com/bV7SF3ni
How you can see in this code all forms is fine but i'm don't know how put option in code
I don't have idea how make this , i maked another project using forms to but with button instead comboBox.
http://pastebin.com/rk61drrY
This is working but i want in combobox and i want too when click on option open vnc and close this software.
For some reason, I can't seem to find a way to do this: changing the start up form for C++ Windows Application under Visual Studio Professional 2010. As many websites have suggested that go into Project\properties\Application\startup from etc. My problem was that I could not find the "Application" or Startup Form anywhere under Project\Properties.
What did I miss?
Thank you.
First, you check the Startup objects setting in your project's properties:
Than, you go to Program.cs and change the default here:
Replace Form1 with any other form you need.
Hope this helps.
You are using the C++ IDE, it doesn't have these kind of goodies. You are supposed to change the code yourself. Double-click the .cpp file that has the same name as your project in the Solution Explorer window. Locate the main() function and change the Application.Run() call:
// Create the main window and run it
Application::Run(gcnew Form1()); // Change "Form1" here
I managed to create the menubar in the menu editor by clicking and writing text to each menu item i wanted.
I cant see any button to get the code to include the menu in my program.
How i can get this menu working?
C++
depends on whether you are using pure win32 api or MFC. But being a newbie i will first assume that you are using win32 api. do a simple google search for forgers win32 tutorials.
just to satisify you, edit the main.cpp file and change the WNDCLASSEX structure, under the lpszMenuName part.
See, you just cant keep using visual studio's code generation features. You have to understand the code behind the menu, and it is not hard. other wise you will never understand the more advanced features. No offence but these things are covered all over the internet.