I am making a Unity project using visual studio, and anytime I open up VS via opening a script in Unity, the VS project connected opens multiple solutions and a warning window pops up saying: disc of error
This error does not keep me from using VS, but I think it is interfering with Intellisense, as I am only able to autocomplete some data. Also, I believe references from any "using" namespaces other than the 3 that automatically appear on scripts, show up as errors.
The problem is that visual studio needs to be updated. Open up the Unity installer, and proceed to the page that allows you to select optional components to install. There, select Visual Studio, and continue the installation. That will make sure that a proper version of visual studio is installed and that it is configured to interact properly with Unity.
Related
I wanted to continue coding where I left after sleeping, but suddenly as I open my Code in Visual Studio and tried to work on my code while having using UnityEngine.UI or using UnityEngine.EventSystems standing at the top, it just says that the type or namespace "UI" or "Eventsystems" doesn't exist in the namespace "UnityEngine". And I also can't use using TMPro. I don't know if thats all I can't use.
I've now just restarted my pc, reselected Visual Studio 2022 17.2.5 in Unitys external tools and uptaded Visual Studio and it sill doesn't work.
Maybe it's important to know that restarting my Unity project isn't working.
How to fix that and how to prevent it from happening again?
Open Unity and go to Window > Package Manager. In the Package Manager window, select In Project from the dropdown as shown below.
In the list of packages, find Visual Studio Editor and update it to the latest version.
Close all Visual Studio windows, go to Edit > Preferences > External Tools, and regenerate project files (In your case, the External Script Editor is Visual Studio).
Reopen any script in your project and the error should disappear.
I know this has already been addressed many times, but really I have tried everything that I found and I just can't get the autocomplete to work. I first tried VS Code but I could not get it to work, then I opened Visual Studio and tried everything I found in different forums but nothing.
I have already tried:
Downloading Unity tools for Visual Studio
Regenerating project files
Setting Visual Studio as preference in Unity.
Redownloading Visual Studio.
I think I may have missed something in the External tools window, but I am not sure about what.
External Tools Window
My editor with the file structure
Every time I try to open a C# Script inside Unity, it immediately hangs and doesn't even open Visual Studio, this started happening after I updated Visual Studio 2017 twice, the first one was an incomplete installation since my computer restarted then the second one was completed version.
Unity still works normally for all things except opening a C# script. I tried changing the External Tools Preferences in the Edit between Visual Studio 2017 and Visual Studio 2017 (Community) but both did nothing.
When Unity hangs, I can only use Task Manager to close it and MonoDevelop isn't one of the options in the External Tools Preferences
Can you open Visual Studio when Unity is not open? Which version of Unity are you using for your project? Are you using Unity Hub to manage your versions?
Steps to try:
Reinstall VS (update to 2019 optional)
Close all background services related to VS and Unity.
If all else fails, you can clean the registry before reinstalling.
Uninstall both Unity, VS and any dependency that you have installed. Then go to Hub and download your required version with all the required dependencies.
Doing this will remove any inconsistency and also you will not have to do the external tool reference yourself.
I would like to set Visual Studio for Mac 2017 to automatically open .axml files in the source editor mode without loading the Android designer.
Does anyone know how to accomplish this?
On top of that I would also like this to happen when I use the Go To File binding I have setup. Currently every time I open an .axml file through Go To File it takes about 10-50 seconds to load up (no exaggeration). If it takes longer than that it never opens and the entire IDE stops working.
I am currently right-clicking on the files and selecting open with -> Source Code Editor.
Any pointers would be appreciated.
Since Visual Studio for Mac does not currently support configuring the editor used to open a file I created an Open With addin that provides this feature.
It provides an Open With dialog that allows you to change the default editor or application used to open a file in a similar way to how this is done in Visual Studio on Windows.
After installing the Open With addin into Visual Studio for Mac 7.0 or above, you can right click a file in the Solution window, and select Open With - Preferences to display an Open With dialog. This dialog is based on Visual Studio's dialog. You can change the default application or editor used here or add a custom application.
So you should be able to configure Visual Studio to open .axml files into the text editor or Android Studio.
More details can be found in this blog post
I'm trying to create my own VSIX package using the Project template. But when I actually launch it, it doesn't appear to be loading anything. That is, when running the project, it opens up another copy of visual studio, but it doesn't actually load up my plugin. I've compared my plugin to the other sample templates, and I just don't see anything wrong. It seems like it should be pretty straightforward. Are there any other steps besides creating the project that I have to do?
Are you using the visual studio experimental instance for debugging? You can enable this in the Project properties (right click your project and choose properties). Go to the 'Debug' tab and add the following line to 'Command line arguments': /rootsuffix Exp
More information about the experimental instance can be found on msdn.
I spent an entire day trying to reset Visual Studio (2015 Community Edition) by unloading features, deleting the cache directory, using the install to repair -- all with no success.
I finally uninstalled Visual Studio with success. When I initially installed Visual Studio, I had packages errors, like Python, that failed to load, but my Test Explorer worked beautifully. The test Explorer package stopped working in time. After re-installation, everything worked without any package load errors. Also, pay attention to the xml error files, because mine produced exceptions thrown by the package. (The xml error file is reported in the error dialog when Visual Studio informs the package failed to load.