Visual Studio 2017 add item cross-platform missing - xamarin

I have installed Visual Studio 2017 to follow along with online training for Xamarin created in May. They instructed us to add a new item and then selected Cross-Platform.
I did not have Cross-Platform as an option. I found a post for an older version of Visual Studio where they showed how to add it manually. I did this and it created the Cross-Platform item but this only contained four options instead of the ten in the video.
Has this been taken away in a newer release or do I need to do something to add all the items?
Many thanks

I have finally found a solution. I used the Visual Studio uninstaller to uninstall Mobile Development with .Net, rebooted and then installed it again. Works like a charm. There must have been old versions that were not getting updated or something was corrupt. Hope this helps someone.

Related

Target Framework not installed when opening a Unity project with Visual Studio 2022

I am trying to open a C# solution that has been generated from a Unity v2020.3.19f project with Visual Studio 2022. Opening it with Visual Studio 2019 works just fine, but there are reasons I'd like to be able to open it with v2022 (such as GitHub Copilot). I did not have issues with this on my previous install of Windows 10.
Upon opening the solution in VS2022, I get the following pop-up prompt for every project in the solution:
Choosing the first option updates the target project to .NET Framework 4.8 and loads the project, but the whole file appears with red lines. When hovering over an underlined bool Property, the error shows as: `CS0518: Predefined type 'System.Boolean' is not defined or imported.
Choosing the second option opens this URL in my browser, prompting me to install .NET Framework 4.7.1 targeting pack (which was already installed via the Visual Studio Installer). When I try to install the .NET Framework 4.7.1 runtime, the installer responds with .NET Framework 4.7.1 or a later update is already installed on this computer. When I try to install the .NET Framework 4.7.1 Developer Pack, the installer allows me to choose from "Repair", "Uninstall", or "Cancel". Repairing has no effect.
I installed both versions of Visual Studio (2019 & 2022) the usual way through the Visual Studio Installer, along with the "Game Development with Unity" workload, which tells me it's installed all dependencies just fine:
Here's what I've tried so far:
Uninstall & reinstall all versions of Visual Studio through the Visual Studio Installer
Uninstall & reinstall Unity, with the Visual Studio module installed through Unity Hub (which just opens the Visual Studio Installer for me to choose which version I want to install)
Regenerate project files through the Unity Editor
Uninstall any references to .NET Framework through the Control Panel
Try reinstalling .NET Framework targeting pack 4.7.1 either from the Visual Studio Installer or manually through the Microsoft SDK website from the prompt
Nothing works for me. Any help on how to make VS2022 stop complaining is greatly appreciated.
Update 1: I found a couple of threads where people suggested simply pressing the Regenerate project files button in "Edit -> Preferences -> External Tools`. This has not helped me.
Update 2: I've tried everything I can possibly imagine, in different orders and different combinations. I even reinstalled Windows 10 to no avail. It's like Visual Studio just doesn't want to accept that the .NET Framework 4.7.1 targeting pack is installed. Please help :(
check this
https://learn.microsoft.com/en-us/answers/questions/733018/visual-studio-2022-cannot-locate-installed-net-fra.html
If you modified the value of ProgramFilesDir(x86), just to modify it back to C:\ProgramFiles(x86) can solve the problem
That is a very interesting problem, my main solution for you to first try is to make sure you are even targeting the correct .net framework in UNITY before you even build the solution. You are using the .NET 4.x, you need to go into your configuration settings and player settings in unity and ensure its not on a different version, for me, unity still defaults to .net standard 2.0. Follow the steps located here. To do so.
Another solution is to see if that first option actually gives you errors that prevent you from using unity, because I know that Visual Studio Code has problems occasionally where it tells me im wrong, my program is wrong, every life choice I have made was poor and I am poor, yet in unity, there are no errors showing in the console and I can hit play no problem. In that case I just had to rebuild a few times and fiddle with vs code until omnisharp stopped yelling at me.
Apperently I have been in a similar situation as when you were getting the error "Predefined type 'System.Object' is not defined or imported" because looking into it, I already have clicked on some of the links, try this one if that error persists. If you cannot prevent the errors to begin with, I would recommend you trying to fix the upgraded version from option one as that is more than likely going to get you the closest to a solution.

Xamarin - The name 'Resource' does not exist in the current context

I've googled till I'm blue in the fingers trying to find a resolution to this issue. I've tried several things but nothing helps. I've got Xamarin and Visual Studio 2015 Enterprise. I had everything working on a previous PC a few months back. Now I have a new one and am just now getting Xamarin set up. I have a few demo and self hacked solutions I was working with. Now all of them give me the above error message. I've made sure the namespace is correct in all modules. The solutions are really small. Nothing fancy at all. Basically Hello World stuff so I'm at a failure to figure out why it fails now. Case in Point: The Hello World that is failing is one HelloWorld.cs file and a few PNGs in the Resources tree along with a main.xml.
If anyone could shed some light I would be most grateful.
I just updated (through VS) Xamarin. Now the older solutions I had won't load. If I create a new solution, I've got the same Resource does not exist error. Xamarin appears to be broken. I've worked with it in the past and had no problems like these.
I resolved it. My Xamarin version was not updated. I updated it by going to
Programs & Features => Microsoft Visual Studio Enterprise 2015, click on change/modify. Now in Visual Studio Popup under Cross Platform Mobile Developement update the C#/.NET (Xamarin v__). After updating this error gets resolved.
For me I didn't required to install Visual Studio 2017.
Also Thanks Martin for your suggestion, your answer can also workaround but it is not necessary to install 2017 just need to upgrade Xamarin version to work with VS 2015.
This bug currently arises with Visual Studio 2015. See this thread and this thread on the Xamarin Forums. Apparently the only workarounds now is to install Visual Studio 2017 or downgrade to older version of Xamarin. There is also an opened bug report for this, so it hopefully should get resolved soon.

Visual Studio 2015 "...has stopped working" when trying to install

Trying to install 'Visual Studio 2015 with Update 3' using the .exe installer provided for the visualstudio.com website. I also tried the standard version (without the update).
The black/grey installer opens, the green bar moves along the progress bar once and it crashes. I get a white pop-up window saying 'Microsoft Visual Studio Community with Updates has stopped working'.
I can't seem to find any other situations like mine on Google or StackOverflow.
I have Visual Studio 2017 also installed. Why do I need 2015 too? I'm helping (trying) another student who is using VS2015 and has problems - however, I can't even get it downloaded!
Thanks in advance for any help.
One possible solution is to not worry about 2015 and just help him by using 2017. It's hard to tell for sure if this will resolve your issue, as there is not info on exactly what you are trying to help him with.
If you go this route, I would save out the solution file just after loading it with _vs2017 tacked on the end, or something similar, so that you do not overwrite the info in his solution file. (Edit: The purpose of this is just in case it breaks something for him - it may not be a problem, he may be able to load your 2017 solution file fine). I've moved fluidly between 2017 Community and 2015 Express or Community with some solutions without a problem.
I do realize there are some issues that this may not be a solution for, but it should be an option, especially for those that are more language-based. The main problems with this solution would be if other student is using features or libraries that are deprecated in 2017, or directly struggling with getting VS 2015 features to work.
Go to control Panel -> Programs and features -> turn on windows features ,
Disable .net 3.5
check for windows update,
Then restart the system. Now it will work . 100% working .
Have fun.

Any quick ways to downgrade Visual Studio Ultimate/Enterprise edition to Professional?

I have Visual Studio Ultimate/Enterprise installed from a previous engagement. I've now started at a new place who only have licenses form VS Professional. So I need to downgrade but the supported route involves full uninstall and full reinstall which is obviously rather time consuming.
Are there any "clever" (probably unsupported) ways to do the downgrade?
It is not possible to downgrade an installation, as they are different products and can exist side by side. The components downloaded and installed for each product are different.
If you had previously installed VS Pro, as I had, you might be able to go to "Add/Remove Programs" and select "Microsoft Visual Studio Enterprise with Updates." Modify->Uninstall worked perfectly for me. Be sure to backup any settings, as some of mine got reset. My extensions stayed the same, though. To be clear, I had VS Pro first, and I installed Enterprise Evaluation side-by-side with it.
I'm in a similar situation, unfortunately there's no supported option besides the uninstall/reinstall route you've already mentioned. You could probably save some time by backing up all your extensions and settings etc. The processes outlined below might be different for more recent versions but I think the process would be similar
Backup and restore settings
Backup and restore extensions
Edit:
This is pretty weird, I'm starting to think that perhaps Drunken Code Monkey's solution is more accurate than I initially thought. I was expecting to have to follow the same process as Schneider described (uninstall / full reinstall), but as soon as the uninstall of VS Enterprise finished, I was able to open VS Pro as normal.
Edit 2:
Turns out it was not as normal, a bunch of things didn't work (creating ASP.NET MVC projects) and I had to do a repair. Not quite as bad as a full reinstall, fortunately.
Just had to do this. You must first uninstall the enterprise edition. Visual Stuido Installer will complete the uninstall and when it's finished will prompt if you'd like to install a different version, such as Community.
Down Grade visual studio from enterprise to Professional
we can download separate professional version of Visual studio EXE.
Professional and enterprise run side by side in our machine but need separate 2 license for those 2.
if you want to downgrade you visual studio from Enterprise to professional just need to install EXe using below link
https://my.visualstudio.com/downloads?pid=2234.

Visual Studio 2010 with phone tools - Any advanced/configurable settings?

In Visual Studio 2008, there was the device manager for setting up additional templates and options for the emulator. None of these options are available with Visual Studio 2010 which I understand as the features were removed.
When the Phone Tools are installed, the device target box comes back but there are no options at all.
Basically, I was just wondering where this list gets its options from and if there is any way at all to configure it?
The closest I got to was find the %LocalAppData%\microsoft\phone tools folder, but not sure this is correct as it appears to be more related to the emulator itself (e.g. if deleted, it gets recreated when you run.).
(Link to something a post that helped me years ago)
It took me a while, but it looks like I have found it.
I was on to the correct path with %LocalAppData%\microsoft\phone tools. All the targets are in the conman_ds_platform.xslt file.
I have no idea why they no longer provide an interface for customising - but it looks to me that despite MS taking the feature out of Visual Studio, it is still possible to customise this and add your own devices just fine.
... Next, depending on time, I will try to convert the Windows Mobile/CE project templates to VS 2010 and see if it is possible to do full development on Visual Studio 2010.

Resources