Since updating to the most recent version of Unity 5.4.0f3, whenever I doubleclick on a script, it launches both Visual Studio and Monodevelop, but I get an error saying that the this version of VS (Community 2015) is unable to open my project. Monodevelop displays it's own, somewhat less clear error message. Please see the screen shots below.
I can still manually open my script using Visual Studio's file menu, but the intellisense code completion no longer works. Anyone know how to fix this? I have Visual Studio's Tools for Unity installed.
I was having similar issues when doing a clean download of an existing Unity project onto a fresh install of Visual Studio Community 2019.
In the end the issue for me was that, although the correct version of VS Tools for Unity was installed, it was 'Disabled' by default in VS's Manage Extensions dialog (Extensions -> Manage Extensions). Just had to click 'Enable', restart Visual Studio, and all worked as expected again.
Turns out it was an issue with my existing install of Visual Studio Tools for Unity (VSTU).
I found a thread where users had experienced similar problems due to an unsupported version of VSTU running on Unity5.2 and beyond. Unity 5.2+ requires VSTU 2.1 or later for VS to work correctly with Unity, more information for anyone interested is available in the documentation here.
I had VSTU 2.3 installed, but removing and reinstalling VSTU resolved the issue, so there must have been a problem with my install. If anyone else has this or a similar issue you can download the latest installer for VSTU here. Thanks to all who chimed in your responses helped me look in the right place!
Please try following steps:
Delete old *.csproj and *.sln files on project's root folder
Check "Edit > Preferences > External Tools" and make sure you've selected "Visual Studio"
Re-open solution by "Assets > Open C# Project" menu
For me it was enough to right click the solution in Solution Explorer and run "Resolve errors".
I will complete what is said above. I experienced this issue today and it took me a while. In my case it was relative to a new install of the Unity Editor.
For some unknown reason the unity tool used on VS (intellisense) was uninstalled. I had to reinstall this : open Visual Studio Installer, select your project and reach the Gaming section where reside the tool for Unity.
The extension "Visual Studio 2019 Tools for Unity" seems no longer available for download via the extension manager. Luckily I recalled that I saw some game development features in the Visual Studio installer, so I picked that one:
It works for VS 2019 (16.11.11) and VS 2022 (17.2.0 Preview 1).
Related
The question is as title says.
My settings:
Unity version: 2020.3.24f1 (it's the LTS)
VSCode version: 1.63.0
I got some extensions for VS Code: C#, VS IntelliCode (don't think this matters)
Things that I've done:
https://forum.unity.com/threads/cant-get-vscode-to-work-properly-with-unity.538224/
https://forum.unity.com/threads/intellisense-not-working-for-visual-studio-code.812040/
Unity VSCode autocomplete Intellisense not working
Installation issue with Visual Studio using Unity
How to get Visual Studio to recommend unity codes
Unity Scripts edited in Visual studio don't provide autocomplete
VSCode with unity c# autocomplete problem
Unity VSCode Intellisense not working in 2020 version
TL;DR -
I've set Visual Studio Code as my external script editor, tried downloading mono editor + gtk thing, snippet tool is NOT what I want, restarted my computer, and few more that I can't even remember.
Please don't recommend other editors than VS Code because I see so many thread pointing to VS Community 2019 and I just can't see how VS Community solution is relevant to VS Code.
I had the same issue and I solved it randomly so I will tell you the things I tried:
uncheck all options in unity>edit>preferences>external editor>generate .csharp. I checked all of them because a youtuber told me but then I saw that input system and cinemachine namespaces won't work so I unchecked them, now it works, it also helped on autocomplete.
download unitydev extension package from VS Code extensions, this package has all the needed documents and snippets and autocomplete assets.
try to regenerate files and reset argument, change editor to something else and see if it won't work there too!
most important: downgrade vscodes pakcage in unity package manager. I think I used 1.2.0 and it worked.
I've used the Nuget Package Manager in Visual Studio 2017 to install StyleCop.Analyzers, which I'm very happy with. However, every time I close and re-open Visual Studio, StyleCop is no longer listed in the analyzers.
The only way I can get it back to analyzing my code is to uninstall it from Nuget, then reinstall it, and go through the process of enabling/disabling rules per that project. After that, it will work properly. How do I keep StyleCop.Analyzers working when I restart Visual Studio?
It looks like the issue was Unity, so this is a very niche problem. There are a couple attempts at solving it listed here:
https://forum.unity.com/threads/unity-and-stylecop-analyzers.639784/
I just got Visual Studio for my Mac. Although in Beta, it seems nice. Unfortunately, I can't seem to figure out where VIM could be. I've searched the marketplace, but cannot load any file or extension into the IDE to enable VIM. I've checked the preferences in keyboard behavior, but nothing.
Does this IDE really not have one of the most essential tools?
Use VsVim with Visual Studio for Mac 8.4 or newer.
Original Answer
Shameless plug - Use my plugin :) https://github.com/nosami/XSVim/releases
It's now available in the Visual Studio for Mac extension gallery (under IDE extensions)
You can usually find a more recent version on the github releases page than in the VS for Mac addin gallery.
Visual Studio for Mac is not a direct port of Visual Studio for Windows. It's essentially an alpha-level rebranding (with a lot of work put into it but still) of another IDE called Xamarin Studio, itself essentially a rebranding of MonoDevelop.
As such, you shouldn't expect any compatibility with other tools in the Visual Studio ecosystem for the time being.
However, you can set up MacVim as an external tool if you really want, but you won't get any kind of integration per se:
What worked for me was downloading VsVim addin as *.mpack file from this page: https://addins.monodevelop.com/Project/Index/403. In my case the file was named Vim.Mac.VsVim-2.8.0.7.mpack.
After downloading the file, I opened Visual Studio for Mac, selected Visual Studio - Extensions from the menu to open the Extension Manager pop-up window, clicked Install from file... button and selected the downloaded *.mpack file.
Needed to restart Visual Studio to get the extension to work.
This was done in Visual Studio for Mac 8.7.8.
After last VisualStudio update (8.1.3 - a new Editor is in place) Vim doesn't work anymore.
At least for now, you need to mark a setting in Visual Studio that forces use of the old editor, as described in the extension's README here.
From that page:
You need to use VsVim. Also, for those who find this via google, the workaround steps are:
Uninstall the broken VsVim extension and restart Visual Studio for Mac.
[Download](https://addins.monodevelop.com/Stable/Mac/8.5/Vim.Mac.VsVim-2.8.0.5.mpack via your browser)
In VsMac, go to the Extensions pane and click Install From File. Navigate to your Downloads folder and select the .mpack file you downloaded.
For some reason the extension doesn't work right away. You need to restart Visual Studio for Mac.
Reference: link
This is my first time of using Visual Studio 2015 Community with Xamarin, and in using them to create Tizen apps.
In Visual Studio 2015, I chose File - New Project - Blank Tizen App (Tizen Xamarin.Forms Single). The files were generated, but virtually every keyword was not recognized i.e. red underline on them.
What configuration is wrong is my system, and how to fix them?
OK, so I did the following and it fixed this problem (somehow):
1. Uninstalled VS2015.
2. Reinstalled VS2015. I encountered installation failure on Roslyn and NDK-R11C.
3. I Ran VS2015 installer again in elevated mode (Run as Admin) and chose Repair. Roslyn was successfully installed but NDK-R11C was still failed, with the same error as before: Cannot extract the zip file to the target location.
4. Manually I ran the extraction of NDK using windows' default unzipper. I got unclear error message stating that NDK cannot be expanded.
5. Using Norton Commander, Extracted the zip file to the same target location. Success.
6. Ran VS2015, created the blank project. Now NuGet could get the updates, and after that the keywords were properly recognized.
I don't know, though, what was the connection between NDK and Tizen Extension. Maybe the act of reinstalling VS2015 just fixed the problem. At least now I got it now. Thanks all!.
I think it's bug of VS plugin. (it's preview version.)
Project - Unload project and Project - Reload project
I think this should solve your problem.
When I create a Xamarin.Forms application using Visual Studio Community 2015 Community on Windows 8.1 it shows me this error on load:
A problem was encountered creating the sub project 'App1.WinPhone'. This project requires a Visual Studio update to load. Right-click on the project and choose 'Download Update'
I've installed all updates available and trying on a newly installed Windows.
Note: I had this error in Forms.
How can I fix this error?
Note: There isn't a Download Update option in Solution Explorer.
Navigate to where you saved the project files that you created in Visual Studio. Default location is C:\Users\PSDan\Documents\Visual Studio 2015\Projects.
Open the project folder that you are experiencing problems with and navigate to C:\Users\PSDan\Documents\Visual Studio 2015\Projects\test\test\test.Windows folder. Inside this folder is a file called test.Windows.csproj.
Right click on that file and open with... using Visual Studio, by doing this it should detect the missing package and in my case automatically prompted to install the missing package.
I've been seeing similar errors for .Window or .WindowPhone and what I've observed is that it is due to missing SDK. Same might be the case with you.
Do you see App1.Droid appearing in the solution? (I guess NO)
Go to file explorer and locate App1.Droid.csproj (..\App1\App1.Droid\App1.Droid.csproj) and open this in a new instance. There it will pop up "Install Missing Feature" dialog and you can follow the steps to install missing components.
If your issue is the same as here:
Project required a Visual Studio update
then you may try and see if this solution works:
[Cause is] a mismatch of the target framework version and profile in the .csproj file. Despite the target framework being correct in the project Properties, they were not being correctly saved for whatever reason. Thus, when trying to install a utility library from nuGet, it left my project in the state you described.
The solution was to go by this site:
Framework Profiles in .NET
and find the correct combination, then manually edit the .csproj file to adjust <TargetFrameworkProfile> and <TargetFrameworkVersion>.
Installing Visual Studio Update 3 with selected features "Windows 8.1 and Windows Phone 8.0/8.1" and "Cross Platform Mobile Development" solved the problem for me.
Uninstall Xamarin completely, and reinstall it. That happened to me as well. I would uninstall Visual studio too. Install that first, then install Xamarin.
Edit: I know this sucks to do, but it was what the Xamarin team had me do to resolve it. As far as I know this is the official fix as of last week.