Running my app on different platforms - visual-studio

I installed Multi-Device Hybrid Apps for Visual Studio but can’t for the life of me figure out how to run my app on different platforms.
What am I missing?

This information can be found on the FAQ page:
To switch between target device platforms, you will need to use the “Solution Platforms” dropdown present in the VS toolbar. If you have installed a fresh copy of Visual Studio 2013 Update 2, it will be there by default, but it may not be present if you upgraded from a previous version.
Explained in detail: http://support.microsoft.com/kb/2954109

Related

VisualStudio XAML designer tell me i need build 19041 but it's already installed

I'm creating a windows desktop universal app (UWP) using Windows Template Studio on Visual Studio 2019 Community, on a Windows 10 Family Edition.
Windows and VS2019 were updated today (before creating this app).
After the project was created using WTS i have an error telling me (mine is in french so i'll try my best to translate) that : I need to upgrade to "windows 10, version 2004 (10.0.19041.0)" in order to display this content (aka : the XAML UI designer). However, the 19041 sdk is already installed. I can build and run the application just fine. It only a problem with the designer.
If i change the application property target to from 19041 to version 1903 (10.0 ; Build 18362) and reload the project, it works just fine.
I don't think i really need this 19041 (i hope so) but : what's happening and how to fix it ?
If you set the target version at 19041 (2004), this requires your development environment to be at least 19041. The SDK installed through Visual Studio contains some development tools corresponding to the platform, but UWP development usually requires some native resources (such as colors, control styles, etc.), and these resources will follow the system update.
So when you set the target version of the project to 19041, the target of some local resources referenced by the project is 19041. If your development environment is lower than this version, the designer will not be able to display.

The C# project is targeting ".NeETFramework, Version=v4.0", which is not installed on this machine

Trying to run an old project in Visual Studio 2015. It was created in 2012 or 2013, I cannot remember which. I have uninstalled both programs as I was running out of space, and i think that is what caused this. I get the following options:
And I do not want to change the target, so clicking on the second option brings me to https://www.microsoft.com/net/targeting which I can't seem to find anything there that remedies the situation. Is there a way around this without reinstalling the old version of Visual Studio again? Will that even fix my problem? Thank you.
Just Reinstall Visual Studio. When you uninstalled previous version it caused this problem.
You could try doing a repair reinstall of Visual Studio 2015.
Another point to consider is that Windows 7 (the oldest version of Windows still supported by Microsoft) includes a Windows Update for the .NET Framework v4.6.1 categorized as an "Important" update. I have not confirmed with Windows 8, but I suspect it, too, includes a similar update. Windows 10 comes with .NET 4.6 to start with. That means that any up-to-date supported machine today will be able to run apps targeting any .NET version up to and including 4.6. I recognize that there may be other reasons to continue targeting an older .NET version, but I bring this up just in case the concern is support on client workstations.

How to install Xamarin.Android for Visual Studio Enterprise 2015 offline

I want to install Xamarin for Android Development in Visual Studio 2015 Enterprise.
While installing, Xamarin told me that I was missing a lot of features, so it would download and install them for me. The download size was around 2GB, and I have a really slow internet.
I wanted to know if there is a way to download Xamarin and all required components separately, using some download manager like IDM, and then be able to use it later to re-install/install on another PC.
Also, I was able to find offline setups for JRE and JDK, and also Android Studio and Android SDK/NDK, but still, the download size is around 1.5GB, which I presume is for the required Android SDK libraries, APIs and tools.
So, I am just asking for a guide on downloading all the components and store them for installing later.
According to the official docs (whose pictures are outdated, by the way) you should login to your account and then head to the download page where you could find links to different versions of Xamarin.
I did so, but all that's available there are older versions of Xamarin Studio and the universal installer. Similar searches on the Xamarin Forums yielded no results as well.
There's a way to find the direct URL for each installer by checking the XML used by the Platform Installer (located at \AppData\Local\Temp\Xamarin\downloads\InstallationManifest.xml). I haven't tested whether installing them separately will work or not, but it probably will. Just make sure to install them in the right order (and to install the Android SDK/NDK after installing Xamarin.Android)
Here are the links to the latest versions, as of today:
Xamarin.Android
Android SDK
Android NDK (x64)
GTK#
Xamarin Studio
Xamarin for Visual Studio
It'd be good if someone with a Mac could help me find the URL for Xamarin.iOS, but that's a start :P
You can download this XML file and find the link of latest version of all required components.I did this and the latest links are :
Java JDK 1.7
Android SDK 24.4.1
NDK 10 (32) or NDK 10 (64)
Xamarin for Visual Studio 2015 4.1.2.18
Intel HAXM 6.0.1
Microsoft MSBuild Tools 2015.0
You don't even need to login for download them.
After 1st web install, backup %tmp%\Xamarin\downloads\ , then on a new Windows:
Uninstall Java 1.8 if exists.
Manually install Java JDK 1.7u71 + GTK# + Android SDK (Install for anyone).
Extract NDK to "C:\Program Files (x86)\Android\android-ndk-r10e", or make NTFS junction to it (not to run out of C: space later).
Run XamarinInstaller having just *.zip files in %tmp%\Xamarin\downloads\, when you see that current download is "XamarinStudio", disconnect Internet (you can delete the NDK now).
When you see above the progress bar: "Downloading Xamarin Studio", you can close the web installer.
Manually install Xamarin.VisualStudio, and if you want, XamarinStudio.
Step 4 require Internet, but noting to download.
To make NTFS junction, from "C:\Program Files (x86)\Android" prompt:
mklink /j android-ndk-r10e T:\android-ndk-r10e
where T: can be USB drive, but not Network drive.
I know it's a link only answer (copyright!), but there are step-by-step instructions including screenshots of how to do that:
Installing Xamarin Made Easy with Offline Installation
I've not tried it, but it should help you.
Found this:
http://ionemind.com/content/get-direct-download-links-xamarin
Links to XML files with direct links to necessary components for Xamarin, including Xamarin for Visual Studio (version 4.5, for VS 2013 and 2015).
Another link I found:
https://dl.xamarin.com/XamarinforVisualStudio/Windows/Xamarin.VisualStudio_4.8.0.1289738.msi
I had installed Xamarin Studio 5 and then it autoupdated its components (to Xamarin Studio 6.3 and the mentioned VisualStudio Tools 4.8).
Then in the "AppData/Roaming/Xamarin X.X" I found a folder for temp downloads. There was the MSI file.
Then I just searched for this exact MSI name to get a direct link.
(on this site https://itblogdsi.blog.fc2.com/blog-entry-23.html)
There's actually some info about releases and MSI names and it has Xamarin.VisualStudio_4.9.0.1538920.msi so replace this part in the MSI link above.
It's for VS 2015 only.

Can't create a UWP app

I recently, upgraded to Windows 10 and got Visual Studio 2015 Community hoping to build UWP apps and ASP.Net 5 apps. At first, I installed everything, but ended up skipping / canceling the Windows 8.1 / 10 mobile emulators (my PC can't even run them). After everything was installed, I went to create a new UWP app (C#), and got this error:
Next, I try the same thing, but with JavaScript. It works perfectly! on the same UAP 10.0.0.0 that is supposedly missing. The link it provides is completely useless (it sends me to http:/microsoft.com/en-us) -_-. Oddly, this only happens when I try to use C# or VB.Net, JavaScript UWP apps seem to work fine. What is going on here? Where can I find the real link to the SDK I need?
UPDATE
JavaScript UWP apps will be create just fine, but when I attempt to build, I get:
Error "10.0.0.0" is not a supported value forTargetPlatformVersion.
Please change it on the Project Property page. Test
C:\Program Files (x86) \MSBuild\Microsoft\VisualStudio\v14.\JavaScript\Microsoft.VisualStudio.JavaScript.UAP.targets
This is the download link for the standalone SDK, maybe reinstalling the sdk will fix the problem.
https://dev.windows.com/en-us/downloads/windows-10-sdk
Normally you don't always have to reinstall visual studio when something goes wrong because it takes a lot of time to reinstall again. From your question you skipped/cancel that feature, the first thing to do is go to the control panel and double click on visual studio under programs to Modify the software and enable those features.
In the case, visual studio was working properly before but due to some updates it stopped, go to control panel right click the visual studio version you have under programs to repair.
If the above doesn't work try to reinstall it again. I hope this helps.

Cannot load shared 'project' in Windows Universal app after upgrading to Azure SDK 2.6

I've just installed the April 2015 release of the Azure SDK. It is version 2.6 and previously I was on 2.5. Now one of my projects will not load. It is the shared project in a Windows Universal application.
When I right-click the project and choose 'reload' I get the pop-up error
The method or operation is not implemented
The output window gives more detail:
Things.Shared.shproj : error : The composition produced a single
composition error. The root cause is provided below. Review the
CompositionException.Errors property for more detailed information.
1) No exports were found that match the constraint:
ContractName Microsoft.VisualStudio.ProjectSystem.References.IBuildDependencyProjectReferencesService
RequiredTypeIdentity Microsoft.VisualStudio.ProjectSystem.References.IBuildDependencyProjectReferencesService
Resulting in: Cannot set import
'Microsoft.VisualStudio.Azure.Deployment.ProjectReferenceMaintenanceService.ProjectReferencesService
(ContractName="Microsoft.VisualStudio.ProjectSystem.References.IBuildDependencyProjectReferencesService")'
on part
'Microsoft.VisualStudio.Azure.Deployment.ProjectReferenceMaintenanceService'.
Element:
Microsoft.VisualStudio.Azure.Deployment.ProjectReferenceMaintenanceService.ProjectReferencesService
(ContractName="Microsoft.VisualStudio.ProjectSystem.References.IBuildDependencyProjectReferencesService")
--> Microsoft.VisualStudio.Azure.Deployment.ProjectReferenceMaintenanceService
Resulting in: Cannot get export
'Microsoft.VisualStudio.Azure.Deployment.ProjectReferenceMaintenanceService.WireUp
(ContractName="Microsoft.VisualStudio.ProjectSystem.ConfiguredProject.AutoLoad")'
from part
'Microsoft.VisualStudio.Azure.Deployment.ProjectReferenceMaintenanceService'.
Element:
Microsoft.VisualStudio.Azure.Deployment.ProjectReferenceMaintenanceService.WireUp
(ContractName="Microsoft.VisualStudio.ProjectSystem.ConfiguredProject.AutoLoad")
--> Microsoft.VisualStudio.Azure.Deployment.ProjectReferenceMaintenanceService
The other parts to the Windows Universal app (the Windows 8.1 project and the Windows Phone 8.1 project) have two Azure NuGet packages installed: Windows Azure Mobile Services 1.3.2 and Windows Azure Storage 4.3.0. (N.B. Those two projects load without issue.)
This is not a show stopper for me since uninstalling the Azure SDK 2.6 removes the load failure. To uninstall I go via the Control Panel to 'uninstall or change a program' and then uninstall Microsoft Azure Tools for Microsoft Visual Studio 2013 - v2.6
I would like to know how to fix this without uninstalling the Azure SDK 4.6.
Over on the Azure Mobile Services forum Chuck Weininger has posted the following answer:
The [fixed] build of Azure SDK 2.6 is now available, but it may not have
propagated to all download servers yet.
You can run the Web Platform Installer and if you don’t have the new
build installed, it should allow you to install 2.6 again. But it
might not if you are accessing a download server that doesn’t have the
new bits yet. If WebPI doesn't allow you to install 2.6 again, then
wait a few hours and try again.
The build number for the version with the fixes is build
2.6.30508.1601. You can identify the build of the SDK from Control Panel -> Programs and Features -> Microsoft Azure Tools for Microsoft
Visual Studio 2013 – v 2.6. The Version column will display the build
number
I have followed Chuck's instructions and have the new build and the shared project now loads without issue.
We have been able to reproduce the issue, but don't have a workaround at this time. If you want to use the Universal App projects with VS 2013, you will have to uninstall Azure SDK for VS 2.6. The issue does not happen on VS 2015 RC if you would like to give that a try. We hope to have news soon about how we can get a fix for this issue on VS 2013.
Chuck Weininger, Dev Lead, Microsoft
https://social.msdn.microsoft.com/Forums/en-US/e8123821-dcb1-477f-a746-f6f016a724ea/cannot-load-shared-project-in-windows-universal-app-after-upgrading-to-azure-sdk-26?forum=azuremobile&prof=required#de621720-3afc-458c-ba85-f691be9e74c1

Resources