Windows 10 uwp scenario c# - windows

I have currently a WP8.1 and a Win8.1 pair of apps laying in a solution.
I am trying to create a best-possible scenario in which:
I can keep the 8.1 and wp8.1 projects still buildable
I can add a uwp project(to the old solution) that uses the (linked?) files from the above projects
Is this even possible, or should I branch from the 8.1, create the uwp, create new UI, copy/paste the code?

Just add a new project to the old solution and reference the 8.1 Universal App project. If you factored out enough code into the Shared project, you should be in for an easy migration.

Related

Visual Studio App Center Android Build Project not finding Solution Files

I am trying out the new Visual Studio App Center for a mobile app I am writing.
I have three solutions checked into VSTS Git. The first solution named App.sln is a master solution that has 2 solution folders, Apps and Services. The Apps folder has 3 projects App.csproj which is a .NET Standard 2.0 library containing the Xamarin Forms shared code. App.iOS.csproj is the Xamarin Forms iOS project. Finally, App.Droid.csproj is the Xamarin Forms Android project. The Services folder contains project files written in ASP.NET Core 2. The second solution is a solution named App.iOS.sln containing just the iOS and App library projects. The last is a solution named App.Droid.sln containing just the Android and App library projects.
In App Center I have 2 Apps configured per the instructions for Xamarin Forms apps. The first is an App configured as iOS Xamarin app. The second App is configured as Android Xamarin app.
I configured the analytics and crash reporting which works. I then configured the builds and this is where I have run into an issue. Specifically the Android build configuration project drop down only sees the App.Droid project. The iOS App build configuration project drop down sees all three solutions but only the App.iOS project. I selected the App.Droid and App.iOS projects. It seems to work. However I'm concerned that in the future things might break. I rather select the App.iOS and App.Droid solutions. That way I know that the correct projects are compiled and nothing not need is compiled. This is especially true since I am trying to stay within the free compile time budget until the MVP is done. Any ideas how to accomplish ensuring only the right projects are compiled?
According to App Center team (on Jan 30, 2018):
Unfortunately we do not support the selection of sln's with Android
Xamarin, currently solution file is only supported for iOS.

Xamarin or Xamarin.Forms for Android and classic Windows?

Is there a way to create a Xamarin or Xamarin.Forms solution that targets Android and classic Windows to produce a Windows 7,8,8.1,10 executable (exe)?
I am not interested in UWP.
Xamarin.Forms will support WPF in the future so you will be able to deploy an EXE file to those platforms. Read more about it here on the blog.
Also, you can always share the business logic, data and other layers with any other .NET application so having an Android app, Windows app and a core project that doesn't depend on Xamarin is perfectly fine.
You can already take a look at the WPF branch of the Xamarin.Forms project on GitHub.

Can Visual studio 2013 run WP7 project

I had developed one application for WP8 devices(Target OS is WP8) in VS 2013 with WP8.1 SDK.Now I need to give support to WP7 also.Can I use WP7 SDK on VS2013 and develop app for WP7.So, I will create 2 apps for WP7 and WP8 and upload both on store.
What should be better solution?
Thanks.
I've encountered this problem several times, unfortunaly VS13 does not cooperate if you want to work with WP7 projects.
So if you really want WP7 apps, which I would reconsider since the marketshare is relatively small and I'd guess that people who download apps already have newer versions. Don't forget that lot of features may not be suported and you'd have to come up with new solutions..
Anyway, in case you decide to create WP7, dowload VS12 Express for example, create WP7 project and then copy files from your WP8 and see what works and what not.
You can open an existed project of WP7 using VS2013, but can't create new project by it.
When you create a new project in VS2013, it can only be WP8.0 or 8.1.

Error when upgrade WP7 project to WP8 using VS2012

When I try to upgrade my current WP7 project to a WP8 version using VS2012 built-in feature "Upgrade to Windows Phone 8.0"
I received an error message:
Upgrade to the project could not be completed.
Object reference not set to an instance object.
This error has little useful information to work with, how to solve it?
If you want run app in WP 8 devices, perhaps you'll have a problem with the screen resolution on devices HTC. The best way is create new WP 8 project and share (add as link) most of the .cs and .xaml files of your WP7 project. I did it guided by the article http://www.developer.nokia.com/Community/Wiki/Maintaining_a_WP7_and_WP8_version_of_a_same_Silverlight_application
Good luck!

Common library for Windows Phone and Android App projects

I am developing a windows phone app and an android app. Both the apps are under one visual studio 2010 solution.
I wanted to include a third project under the same solution which contains common functionality that both windows and android app uses. So, for this when I use plain 'Class Library' and when I try to reference that in windows phone app project, it says "Unable to add the selected project reference. The project reference must be another Silverlight for Windows Phone project that is same or lower version".
Which type of project do you suggest, so that I can use it windows phone and android projects?
You will have to use two different csproj files - because the build targets and other pieces will be different for the two platforms. Use this recursive include in each csproj to add the sources from a common location.
You can also try to use the Portable class library extension but I'm not sure if it will help.

Resources