Microsoft has announced that Office 2019 preview is not available for commercial customers.Since I’ve recently started using Xamarin for cross platform development, I thought it would be nice to share with the community how I’ve got past some of the issues which tripped me up for a while when I was becoming familiar with it. This isn’t really a normal “getting started with Xamarin” tutorial – there’s lots of them already out there already, like this one – but hopefully anyone starting off with Xamarin will find it useful.Something you can do to make the 'start code from a VS Command prompt' a bit easier, is go in to. Download Visual Studio Community, Professional, and Enterprise. Visual Studio 2017 15.3 fails to detect changes or edit properties of a C++ project if it uses toolset from VS 2015 2 Solution MSB4057 The target 'ResolveComReferencesDesignTime' does not exist in the project.(MSB4057 ResolveComReferencesDesignTime)->MSB4057 The target 'ResolveComReferencesDesignTime' does not.You’ll know if you’re on the Creator’s Update version if your Windows build number is 1703. Open that new file and go to the end of the file.I use Windows 10 (and have installed the Creator’s Update) – this allows me to use Xamarin.Forms. Make a copy of the vsDevCmd.bat file and call it something like VsDevCmdCode.bat.
Here I share how I solve it.With Xamarin tools built into Visual Studio, developers can create native applications in C# for Windows, Mac and Linux devices. (every path and json settings are correct). Before we begin – what’s Xamarin and why should I use it?Answer: I got an error(see picture.1) when launch bash terminal inside Visual Studio Code. Visual Studio Community 2017 Launch: Program Does Not Exist Download And InstallI also chose to create a Shared Project because I only expect my code to be used in my application, rather than shared with other developers as a Portable Class Library (you can read more about the differences between Shared Projects and Portable Class Libraries here).When you click OK, the project and files will be created, and a window like the one below will appear with instructions for setting up the Mac Agent. I chose to use Xamarin.Forms (which allows developers to create cross platform user interfaces). Creating a project with the default Xamarin templateThis bit is straightforward to anyone who’s created a new project in Visual Studio 2017 before.Select File -> New Project to open the dialog below, and choose a name for the project:After clicking OK on the dialog above (which chooses a Cross Platform App project type), the dialog will close and open a new project. Installing Xamarin tools for Visual Studio 2017With Visual Studio 2017, it’s very easy just open up the setup wizard, select the Xamarin tools (as shown below) and just wait for it to install.It’s probably going to take a long time to install VS2017 with Xamarin – adding Xamarin to the base Visual Studio install makes it about 25GB bigger.Tip: If you leave your machine to download and install Xamarin, it’s worth adjusting your power settings to make sure an unattended machine doesn’t switch off in the middle of the download – like mine did the first time ( facepalm). Even though I have an error, the message in the status bar in the bottom left reports “Rebuild All succeeded” – both can’t be right surely? Getting rid of the error CS0103 – ‘InitializeComponent’ does not exist in the current contextThe error reports “ The name ‘InitializeComponent’ does not exist in the current context.”I eventually noticed a couple of things that seemed a bit bizarre: Compiling the solution led to multiple warnings and errorsTip: Prepare to wait a while when building the solution for the first time – it needs to download a lot of NuGet packages.Unfortunately my attempt to compile the project out of the box showed an error in the UWP project and a bunch of warning messages for the Android project. Run the application in an Android EmulatorI’ll run through some of the symptoms of problems I encountered trying the things above, and how I fixed them. Run the application in a Windows Phone Emulator Compile the application without error or warnings Run the Android SDK manager as administrator, and install/update the recommended packages. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled“.This usually happened just after I created a project, and I found that if I close VS2017, restart it, and re-open and rebuild the solution the warning disappears.So to summarise, in order to compile the default project without errors or warnings: Getting rid of warning IDE0006 – “Error encountered while loading the project”I sometimes found that I had a warning IDE0006 which advised “ Error encountered while loading the project. The phone emulator starts up after a couple of minutes, and I was easily able to see the Xamarin application in the list of apps installed to the phone emulator.And when I run the Xamarin app in the emulator, I see the correct result – a simple form with a message saying “Welcome to Xamarin Forms!”Running your application in the Android EmulatorVisual Studio 2017 comes packaged with several Android Emulators – you can see them if you change the target project to the Android one, and look at the dropdown list on its right.Tip: I never use either the two emulators which target ARM. Your machine will also need to be pretty powerful, or you might find running an emulator to be unbearably slow.I found this to be straightforward as soon as I installed a Windows Phone emulator.If you don’t have any Windows Phone emulators installed, you can grab some from here: I changed the start-up project to the UWP project, and changed the debugging target to be one of the Windows Phone Mobile emulators.After hitting play (or F5) to start running the Windows UWP application in a Windows Phone emulator, I was prompted to set my machine into Developer mode to allow me to load apps – I just had to select the third option (“Developer mode”) as shown in the image below (you can access this screen from Start -> Settings -> For developers).But after changing this setting, everything worked well – no gremlins here. Close all files from the shared project which have the type *.xaml.cs.Running in your application in the Windows Phone EmulatorTip: If you want to run your application in an emulator, you’ll definitely need a 64-bit machine which allows hardware virtualisation. Adobe livecycle designer download trialThe command to do this is very simple from a command prompt running as administrator: bcdedit /set hypervisorlaunchtype offReboot for this setting change to take effect. Use the Android x86 emulator – but you need to turn Hyper-V offYou don’t need to uninstall Hyper-V to run the Android x86 emulator on Windows 10 – you just need to turn it off.
0 Comments
Leave a Reply. |
AuthorCassandra ArchivesCategories |