Visual Studio 2019 is not showing Device target option for UWP - visual-studio

I am following the Unity development tutorial for Hololens 2.
https://learn.microsoft.com/en-us/windows/mixed-reality/develop/unity/unity-development-overview?tabs=mrtk%2Carr%2Chl2
The Unity build generates visual studio files without issues.
When opening with Visual Studio 2019, I do not see a Device target option under targets drop down.
However when I open in Visual Studio 2017, I do see the Device target option.
The visual studio 2019 menu looks completely different from what is in tutorials:
Please see screenshot below:
Visual Studio 2017 is not supposed to work with hololens 2, and when I try to build in VS2017, it gives an error:
MSB8020 The build tools for v142 (Platform Toolset = 'v142') cannot be found.
I tried changing the build tools to 141 and 140 under project properties, but it strangely still gives the same error.
The tutorial states minimum version required is Visual Studio 2019, so it is not supposed to work with an older version.
This is what Visual Studio 2019 is supposed to look like according to tutorial above
I made sure device is connected and is in developer mode. This seems to be something missing in VS2019
Below are all the components I have installed based on the tutorial.
Can anyone help figure out why the Device or Remove Machine options are not showing up under Visual Studio 2019?

I has the same problem, my solution was install all C++ development libraries
and set the UWP project on Visual studio to "Set As Startup Project".

This is becasue the wrong project got set as Default Startup Project, must be changed by right clicking on the correct project and selecting Set as Default Startup Project

Just checked what is installed on my machine.
At the UWP development tab the option C++ (v142) Universal Windows Platform tools is checked. Try if that fixes it.
Are you working on the latest Version of Visual Studio?
Could you check if you can deploy to the HoloLens Emulator?
Are you working with Unity/Unreal or just testing with an example downloaded?

to see TARGET -> DEVICE
This is becasue the wrong project got set as Default Startup Project,
must be changed by right clicking on the correct project and selecting
.... Set as Default Startup Project
......OK !!!

Related

Selected Visual studio is missing required components and may be not be able to build generate project

Build a simple project of unity "hello world", Unity says me:
Selected Visual studio is missing required components and may be not be able to build generate project
¿Any idea why get this message?
Give this a try:
Open the Visual Studio 2017 Installer
Click "Modify"
Select and install the optional Package C++ Universal Windows Platform tools from Universal Windows Platform development
Hope this helps!

Install Xamarin on Visual Studio 2015 with Xamarin on Visual Studio 2013 already installed

I have Xamarin installed on the Visual Studio 2013 on Windows Operating System. It works fine.
There is Xamarin tools in VS2013 as follows:
My problem is as follows:
I have recently installed Visual Studio 2015 on my desktop on Windows operating system. I thought when I opened the VS2015, I expected to see the Xamarin in it, but it does not. Then I installed the Xamarin again, and again and again, but still Xamarin does not show up in VS2015.
I wonder what is wrong? What am I missing?
By the way, I still have VS2013 on my desktop.
No Xamarin tools in VS 2015 as follows:
I even tried the following approach, still no luck.
Control Panel -> Programs -> Programs and Features Choose Xamarin
Click Change -> Next -> Click the desired drop down for each items in the tree view and select "Will be installed on local hard drive."
Click Next
I am even getting the following screen when installation is completed, but still I could not able to see Xamarin in VS2015.
I have installed Xamarin in my Visual Studio 2015 two days ago and it showing Xamarin under Tools. Below I have described the approach which I have followed to install Xamarin in Visual Studio 2015.
Go to Contol Panel >> Program Features >> Visual Studio
2015 >> Change>> Modify
1. Select C#/.Net(Xamarin) under Cross Platform Mobile Development
2. Check if these three red marked items are checked or not.
3. And then press update.It will download all the required packages to run Xamarin on VS 2015.Hope it helps you!!
I recently had horrendous problems trying to install Xamarin on VS2015 + Win10. (I don't have any other VS versions installed.) Even a full install and reinstall left huge holes in the installation. I tried repeatedly and each time the whole dev environment seemed to get itself in a different unusable state.
The fix for me, which is probably hitting a nut with a sledgehammer, was to:
Uninstall Xamarin (via Control Panel|Uninstall).
Uninstall Visual Studio (via Control Panel|Uninstall).
Follow Xamarin's manual uninstallation procedures Full Xamarin Uninstall.
Perform full reinstall of Visual Studio, being sure to tick the boxes shown in the answer by Parth Patel above.
This resulted in a faultless, fully functioning Xamarin environment for me. Overkill, maybe, but worth a go if all else fails.
Here is the solution:
I have deleted all the existing versions of visual studio ( 2010, 2012, 2013) except Visual Studio 2015 and then installed the Xamarin, and then I could able to see Xamarin on Visual Studio 2015.
It is not required to delete previous versions of VS. I have Xamarin Studio, VS 2013 and now VS 2015 and working perfectly. I moved to VS 2015 due to recent purchase of Xamarin by MS and that VS 2015 has Xamarin included.
I believe the issue with this question is was that your VS 2015 install did not include the add ins as pointed out in another answer in this question.
After the VS 2015 install -the only caveat was projects created initially in Xaramin Studio and then Opened in VS 2015 to needed to have the build configuration in the project tweaked. If not you could not get the project to build and then be deployed to an emulator or device for debug testing.
We have a few troubleshooting steps on our Knowledge Base that you can find here:
https://kb.xamarin.com/customer/en/portal/articles/1643349-missing-visual-studio-extensions-after-installation
Note: Some of these steps have older versions listed in the respective paths. You should use the latest version number available.
Before any install or uninstall actions. Try open some sample Xamarin project, in most cases during opening project in VS 15, it will show you, what needs to be installed or what is missing / corrupted.
Xamarin samples
I had some problems with my emulator best way to fix the problems is to uninstall everything (emulators, android sdk, vs, xamarin) and reinstall it.
It is also important to delete other or older versions of visual studio. Then you should probably see you options.
First try to uninstall all the other versions of Visual Studio (VS) 2013 in this case. Then try to reinstall Xamarin.
Visual Studio 2015 is little bit different from 2013 version, I am also using xamarin on visual studio 2015. But that is not listed under tools menu like 2013.
Maybe developers had changed that, you can go to "start a new project"(just like you start new app development), there you can find xamarin/android projects list, there you can start new android projects.
This is strange, I did not have any problem with Xamarin & VS 2015 (community).
You said,
I will see the Xamarin in it
Did you try to create a project or/and add your account in the new VS Installation ?

Visual Studio crashes when trying to associate Cordova app with store

I'm on the latest version of Visual Studio 2015 Community (14.0.24720.00 Update 1) on Windows 10. I'm currently developing a Cordova App for Windows 10, iOS and Android using the Visual Studio Tools.
When I right click on the Project, then go Store > Associate App with the Store, I can successfully log in, see my existing apps and select the one I want, but when I try to actually associate that app with my VS project, VS just crashes.
I've already tried repairing Visual Studio through Add or Remove Programs and also cleaning out my project/solution, but none of this worked.
Any advice?
Thanks!
I had the same issue. Apparently, this is a known problem with VS2015 Update 1 (with the latest Cordova tools support).
The current workaround is to choose "Create App Packages" instead of "Associate App with the store." When you do this, the proper association will be generated and you can test as usual. I was successful using this approach.
The fix in Visual Studio 2015 for this crash is now available in Visual Studio 2015 Update 2. Here's a link to the installer: http://go.microsoft.com/fwlink/?LinkId=691129

.csproj file unsupported in Visual Studio 2013

So I'm trying to do what I think is a very simple thing: generate a Windows Phone app with PhoneGap and open it in Visual Studio. On a totally fresh Windows installation (via Bootcamp), I've:
Downloaded Visual Studio Express 2013 for Windows (the very first download button: http://developer.windowsphone.com/en-us/downloadsdk)
Created a PhoneGap Windows Phone app per the Getting Started guide.
However, every time I try to open the csproj file, I keep getting this error:
Unsupported
This version of Visual Studio is unable to open the following projects. The project types may not be installed or this version of Visual Studio may not support them.
For more information on enabling these project types or otherwise migrating your assets, please see the details in the "Migration Report" displayed after clicking OK.
- HelloWorld, "C:\BodBot\BodBot-PG\BodBot\platforms\wp8\HelloWorld.csproj"
No changes required
These projects can be opened in Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1 without changing them.
- HelloWorld, "C:\BodBot\BodBot-PG\BodBot\platforms\wp8\HelloWorld.sln"
No matter what I do. It works totally fine on Visual Studio 2012 for Windows Phone. I've tried it on VS 2013 for Desktop, and that doesn't work either. No clue what is happening here, and don't know even where to start to figure out what's wrong. I've Googled extensively to no avail; basically all instances of this error seem to have to do with previous version of VS. Pointing in any direction would be very much appreciated.
Turns out Update 2 wasn't getting installed correctly. I ended up installing Visual Studio and the Update 2 separately and Update 2 got installed successfully. Everything works now.
To build Multi device hybrid (Cordova tooling) apps with Visual Studio, you need to have Visual Studio 2013 Update 2 - Professional, Ultimate, or Premium.
Visual Studio 2013 Update 2: Global Apps e Android/iOS App

The builds tools for v120 (Platform Toolset = 'v120') cannot be found

Using visual studio 2012 on windows 8 x64
aparantly this is caused by msbuild being moved into .net but I havn't seen how to fix it yet.
4>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(44,5): error MSB8020: The builds tools for v120 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install v120 to build using the v120 build tools.
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(44,5):
error MSB8020: The builds tools for v120 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install v120 to build using the v120 build tools.
5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(44,5): error MSB8020: The builds tools for v120 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install v120 to build using the v120 build tools.
If you have VS2013 installed and are getting this error, you may be invoking the wrong MSBuild. With VS2013, Microsoft now includes MSBuild as part of Visual Studio. See this Visual Studio blog posting for details.
In particular, note the new location of the binaries:
On 32-bit machines they can be found in: C:\Program
Files\MSBuild\12.0\bin
On 64-bit machines the 32-bit tools will be under: C:\Program Files
(x86)\MSBuild\12.0\bin
and the 64-bit tools under: C:\Program Files
(x86)\MSBuild\12.0\bin\amd64
The MSBuild in %WINDIR%\Microsoft.NET\Framework\ doesn't seem to recognize the VS2013 (v120) platform toolset.
http://en.wikipedia.org/wiki/Visual_C++
You are using Visual C++ 2012 which is v110. v120 means Visual C++ 2013.
So either you change the project settings to use toolset v110, or you install Visual Studio 2013 on this machine and use VS2013 to compile it.
if you are using visual 2012
right-click on project name -> properties -> configuration properties -> general -> platform toolset -> Visual Studio 2012 (v110)
Download and setup Microsoft Build Tools 2013 from
http://www.microsoft.com/en-US/download/details.aspx?id=40760
To add up to Kevin and Lex's answers:
We had a similar situation at work where both the developers and the build server had Visual Studio 2013. Our solution had a VS 2013 C++ project and compiled fine when built on developer's machine or on the build server within the IDE.
The issue was when triggering builds using TFS build definitions. We were still using an old build template (version 11.1) instead of 12.0. Fortunately, a simple attribute addition to the template xaml file solved the issue.
In the Sequence portion "Compile the Project", there is a xaml node that starts with
mtbwa:MSBuild CommandLineArgument=....
You can add a "ToolPath" attribute and point it to the right path of the MSBuild.exe you wish to invoke, based on Kevin's answer. For instance:
ToolPath="C:\Program Files (x86)\MSBuild\12.0\Bin"
Wasted 4+ hours on this.
I have Visual Studio 2017 Enterprise, one of the projects has below error:
The builds tools for v120 (Platform Toolset = 'v120') cannot be found
To resolve above error, I tried to install all below:
Microsoft Build Tools 2013 (v120
tools) https://www.microsoft.com/en-US/download/details.aspx?id=40760
Microsoft Build Tools
2015 https://www.microsoft.com/en-in/download/details.aspx?id=48159
Build Tools for Visual Studio
2017 https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017
However, none of the above worked.
Later, installed Visual Studio 2013 Ultimate, then all worked fine.
Looks like, the older Visual studio is a must to resolve this.
Hope it helps.
To add up to Louis answer:
Alternatively you can use the attribute ToolVersion="12.0" if you are using Visual Studio 2013 instead of using the ToolPath Attribute. Details visit http://msdn.microsoft.com/en-us/library/dd647548.aspx
So you are not forced to use absolute path.
When a VS2013 C++ project is opened in VS2015, and there are warnings about "The build tools for v120... cannot be found", I simply need to edit the .vcxproj file and change <PlatformToolset>v120</PlatformToolset> to <PlatformToolset>v140</PlatformToolset>, and close and re-open the solution.
In VS 2012, I was getting "SMB2 will not build: Error 1 error MSB8020: The builds tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install Visual Studio 2010 to build using the Visual Studio 2010 build tools."
Throwing caution to the wind, I tried the suggestion: Selected the Solution in Solution Explorer, then clicked in the "Update VC++" menu item. This did some updateing and then started a build which succeeded.
The "Update VC++" menu item no longer appears in the solution menu.
i had a similar problem when i removed VS 2013 community Update 5 and switched over to VS 2015 community edition
and the problem acquired in windows phone 8.1 projects where it complained about not having the right msbuild toolset and about the emulators not installed even if they are.
i know that the source of the problem was the VS 2013 community settings that has been left by that last uninstall which messed everything for me even though the uninstall process went smooth with no problems from the control panel.
i did my best to remove any files left but there was always some thing left.
and what only fixed it for me is a fresh windows 10 x64 installation then after it i installed VS 2015 community edition and that's it!! no more errors for me and the wp8.1 emulator worked fine too!!
in my case now am completely sure that the previous visual studio install settings has messed everything for me and because there wasn't any way i found and tried to completely erase VS 2013 community files and settings i had to pay the price for it and reinstall my OS.
you might be able to avoid OS reinstall if you can find a way to completely erase last visual studio install files.
P.S:only attempt this solution(OS reinstall) after you tried every possible way first then if nothing works and only then ... make this solution as a last resort.
In VS2013 to set up all projects to correct build tools, you can do a right click on the solution in solution explorer and choose "Retarget solution". It will change all progects (all you check with the checkbox in opened dialog), so the error will be gone.
In my case, I have double-clicked a Visual 2013 sln file and Visual 2012 opened (instead of Visual 2013). Trying to compile with Visual 2012, a project that has the Platform Toolset set to "v120" showed the error above mentioned. However, reopening the sln with Visual 2013, the Platform Toolset was set to "Visual Studio 2013 (v120)" - please note the complete name this time -, actually did the job for me. The project compiles well now.
I was getting the same error with building USBView project in VS2015. I removed this error by selecting 'Platform Toolset' settings to to "Visual Studio 2015 (v140)" and than right click on solution (in VS2015) and select 'Retarget Solution' and selected 10.0.10240.0 on that dialog.
It seems like there is also ProjectUpgradeTool from microsoft which is suppose to convert older projects to upgrade to post VS2012 VS but I couldn't locate that tool on my machine.
I still have to fix some new linker error with help of this.
I had a similar problem. VS 2015 Community (MSBuild 14) building a c++ app, wanted to use VS 2010 (v100) tools. It all came down giving msbuild an invalid configuration option. Strange.
So, recheck all those options and parameters.
If you use make generators like cmake, JUCE, etc. try to set a correct VS version target (2013, 2015, 2017) and regenerate the solution again.
I was facing same issue while building some of project.
I used Visual Studio 2015 IDE, there it was working fine but while giving build from PowerShell script, it was giving toolset related "The builds tools for v140 (Platform Toolset = 'v140') cannot be found." error
So eventually it was issue of pointing to incorrect MSBUILD exe for the respective project.
Earlier I was pointing to
$MSBUILD="C:\windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
And build was successful when I updated script to point to
$MSBUILD="C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe"
Hence to resolve the issue, please make sure to use correct MSBUILD.

Resources