SOLVED
Just to clarify this is about VS code not just VS
I've had the worst 3 hours looking for anything that could possibly fix my Visual studio code. I'm using the program to develop a game on unity but I can't seem to get the auto complete thing (I think its Intellisense) to auto complete my code causing spelling mistakes and making coding 10x longer than it needs to take.
Heres a list of things I have tried:
Install .Net Framework v4.7.1 (which is what the console says to do)
Fix the Assembly file made by unity multiple time
Reinstall Visual studio, C# plugin and .Netframework
Change the OmniSharp to the latest version
I will add that when ever I type anything it comes up with "[info]: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionService Could not find document for file c:\Users\Bruhman\Grinder\Assets\Scripts\PlayerMovement.cs"
and when I open visual studios and write anything in the script it'll come up with an error that states "Some Projects have trouble loading. "Source: C# (Extension)" "
Below is a screen shot of what comes up in the console (It's the same every time)
Console
Never Mind I found out the issue, apparently I need to install Visual Studios Community version and then the .Net developer packs from visual studios and not just online, I'm assuming that it doesn't get detected or something when installed through the exe file...
I don't really know much, but I use it every day : have you tried the unity tools extension ?
It features a lot and also the c# auto completion.
If it still bugs, have you installed the .Net for the EXACT version. I also struggled because I had the upper version and not the exact.
Finally is it linked with unity (I don't know if it could interfere if not done)
Sorry I don't know anything else if this don't work.
Related
I recently got a new computer, and finally got around to installing MonoGame, as I worked with it a few months back on my old computer, and primarily use Unity for my game development when not working on 2D games. Their website says they have CLI templates that work with Rider, but I figured it would be best to get it installed with Visual Studio first. Following the exact steps listed on the MonoGame website, I got everything installed that I needed, and started a project from one of the Visual Studio MonoGame templates. Upon opening the project, and everything finishing loading, I am greeted to this miserable sight. I also had an error in the console relating to MonoGame, with the error code MSB3073. From what research I did, I found that it either had to do with my username having a space in it (it clearly does not, so that was out of the picture), or it had to do with using the Visual Studio templates, and I would simply need to create the project from the CLI templates, as seen here. However, creating a new project from the CLI templates does not change anything. I have tried uninstalling and reinstalling dotnet, I have tried uninstalling and reinstalling Visual Studio. I have, of course, powered my computer off and back on multiple times. Even trying to open the project in Rider after installing the proper MonoGame packages in the program has the same exact errors. But when I zipped the project up and sent it to a friend who works with MonoGame, he was able to run the project with no issues, so clearly it has something to do with my setup.
I have also cleaned my nuget cache, cleared my project temp folders, and cleared the visual studio cache. Eventually, the Microsoft dependencies stop having issues when I simply close and open the project again, but every time I open the project in Visual Studio, I get the same error in the console, and it prevents me from running/building the project.
Hoping someone on here will know what to do with the info I've given, as I'm completely out of ideas!
So I figured it out. I'm not very experienced with the command line, but I managed to find a very nice tutorial by someone who wanted to make games with MonoGame using only the command line. In it, I was able to attempt to build the project from the CLI, and it gave me an error message unlike what was in Visual Studio. It said that MonoGame only works on a 64bit OS, but I'm on a 64bit OS. So I went to look at what version of dotnet was being used, and sure enough, it was the 32 bit version! It took a while to figure out how to uninstall it, and how to use the dotnet-core-uninstaller tool in the command line. Then all I had to do was remove the Environment Variable in the System category for the Path variable that referenced the Program Files (x86) directory of dotnet.
Hopefully if anybody else comes across this issue, they'll find this post, as none of the others seemed to fully explain how to do anything that needed to be done to fix the problem :)
I am a beginner when it comes to coding, and I have been struggling with a very annoying problem this entire day. I hope you can help me relieve this awful headache.
My idea is to create a very simple app for my Mac, so I downloaded Visual Studio and Xcode.
I followed this tutorial from Youtube to get started, but halfway in the film I see that I am not able to get the same "outputs" as this Youtuber gets ( https://youtu.be/rj_n4W_mDN0?t=340 ). In my case it doesn't automatically provide "NSTextField*LabelInfo", but I can attach the button and label to the script and make them show when I run Visual Studio.
I am not provided this autofill either ( https://youtu.be/rj_n4W_mDN0?t=420 ) or the option of calling the "HelloPressed" function in Visual Studio.
Then I discovered that I have an error message in Xcode when I try to build it: "undefined symbol _main" (which the Youtube person doesn't have).
It also reads:
"Undefined symbols for architecture x86_64:
"_main", referenced from: implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)"
I deleted my code and restarted the program, but the same message popped up. I deleted both Xcode and Visual Studio, and reinstalled it, but it still came up. This time I didn't add or do anything other than opening a new projects (in Cocoa app), and still I was greeted with this annoyance.
I see that my "Main.cs" in Visual Studio is not appearing in Xcode project (all the other ones are), but I don't know if this is relevant. I have tried to add different Frameworks to Xcode (AppKit), but I still receive this message. Maybe there is something I have to do in the Build section of Visual Studio, but I don't know what.
I have absolutely no clue what to do and how to proceed. I find it so strange and annoying that the Xcode gives me an Error without me doing anything else then starting up the program. My Macbook pro is very new so that cannot be the cause, the softwares are newly updated: Xcode 11.5 and Visual Studio 8.6.5 (build 23). I am programming in C sharp
I hope you are able to advice me in what to do. I am a beginner so I would appreciate easy-to-follow assistance or instructions.
Thank you very much,
August
Sorry I can't offer a definitive answer but hopefully the following will help you find your issue. I don't usually use VS for Mac and installed it just to see if I could figure out your issues. It is not as intuitive as one may like...
Visual Studio for Mac on both Mojave & Catalina does not work appear to work as the video you found seems to show.
Double-clicking on a .storyboard file generally seems to open the file in VS's XML editor rather than in Xcode. There might be a setting to control this somewhere. To open in Xcode right-click (or control-click) the file name and select Open With… -> Xcode Interface Builder in the menu that appears.
– Once over in Xcode you may find you have two open windows, one is just the .storyboard file and the other is a dummy Xcode project containing it. Close the first of these and just edit within the Xcode project window. If you don't do this you cannot create bindings between the controls and the source. If you look at the Xcode windows in the video you found you will see that when the bindings are being made it is in the project window, but there is nothing to show how/why that window opened up at the front.
Do not try to compile the "project" in Xcode. It is not meant to be compiled and appears to just be the bare minimum scaffolding required to enable VS to use Xcode for UI editing. All the errors you got are related to this.
Searching the internet for Visual Studio for Mac and storyboard files turns up plenty of hits and these files failing to open correctly seems a common problem from a scan of the titles. Do some research and you'll probably get it to work smoothly, but it does work as is albeit a little fiddly. HTH
I am having the exact same issue/error as this post from yesterday. Similar SO Post
SIDE NOTE...As you can see, I am new and therefore, only have 45 reputation. As such, I could not simply add a comment to the above existing post and had to create a whole new post even though they are the same issue....seems silly. But I digress....
I wanted to provide additional comments in the hopes to get an answer. My issue started suddenly the a few days ago. I made no major changes to references, VS updates, etc... However, when I right click my csproj in visual studio, I get the error and I have to click it five times before it goes away, at which point I finally get the menu.
Again, I have made no major changes BUT I went ahead and confirmed that:
My target version and Min version is Windows 10(10.0; Build 10586). That is the SDK version that I have installed and am using.
I verified that my NuGet updates are complete and that my Microsoft.NetCore.UniversalWindowsPlatform are installed and update to date (5.2.2 as of now).
I do have a reference also to "Universal Windows". This was created automatically when I created my project and I cannot remove this reference but it is there. When I select it, I do see that it is "UAP,Version=10.0.10586.0" so this should be good. I do notice a possible issue here. Again, this reference was created for me and I cannot remove or change it. However, it is pointed to a folder named
C:\Program Files(x86)\Windows Kits\10\References\Windows.ApplicationModel.Calls.CallsVoipContract\1.0.0.0\
Why did the Windows Universal reference default to that folder and only that folder? I am not using VoIP so I wonder why it chose this one? Also, what if I need some of the other references in the References folder?
I created a brand new Windows Universal project and the same error happens on a fresh project.
Please help, it is annoying. Project still seems to build and work fine though.
Thanks!
I found the issue in my case, it was an extension that I added on to Visual Studio provided by SyncFusion (which their installer actually creates 7 or se extensions in Visual Studio). After troubleshooting my issue and doing some of the same things to resolve (repairing .Net, SDK, Visual Studio) I then thought about the error a bit more. While it is cryptic (and has poor english "An Exception has been occured") these are all clues that it could be any of the frameworks that I have installed via extensions as well.
I also had another clue, the issue started happening a few weeks ago, around the time I updated my SyncFusion controls to the latest version.
So, I went to Tools > Extensions and Updates. I went to Installed > All and found all of the SyncFusion items (there are several) and disabled them all. After I disabled them, and restarted Visual Studio, the problem went away!!!
This is a workaround for now. In the meantime, I put in a support ticket with SyncFusion on the issue. I will certainly update this thread when I get a response from them. Also in the meantime, I then went back and re-enabled each of them again, one at a time, to see who the real culprit was. In my case it was the SyncFusion Web Conversion and Migration extension.
If any of you are not using SyncFusion but having odd Visual Studio issues such as this, I suggest doing something similar by going through your extensions and disable any that you added on, starting with the most recent add ons, especially if they were added around the same time you started having the problem until you find the culprit.
Hope this helps!
When I switched to VSCode as my source code editor for Unity some weeks ago, it suggested API completions both for C# and for Unity. It listed the number of references above each variable declaration. It detected typos such as using undefined variables etc...
It does not anymore, none of these nice functionalities work anymore. I beleive it was caused by an extension update, but I did not pay attention at the time. (Anyway, IIUC, extension updates can't be rolled back)
I am running VSCode version 1.7.1 on windows 10 with a.o. following extension: C# for Visual Studio Code (powered by OmniSharp) v1.4.1
At the Unity side, I use the latest (v2.70) version of the Unity plug-in maintained by #Reapazor as suggested in Unity Development with VS Code
I have setup Unity to use VSCode, and turned on integration with VSCode.
I have no idea why it does (no longer) provide API completion, code checking etc... it even no longer formats the code!
Please advise...
Solved by thoroughly removing vscode and than reinstalling it.
Sorry for the noise
Try this on the Unity menu
Assets > Open C# project In Code
To start things off i am an amateur programmer and have basically only used visual studios to make anything i have made in school. C# is what i am familiar with as far as game development goes, and at this point i am trying to develop a game using visual studios & cocos2ds. That i can somehow port over to the Apple App Store.(Stop me if any of this is completely impossible, like i said i am quite new to the whole app development thing)
So I have one Big question that kind of stems off into a few others. Most importantly I currently have Microsoft Visual Studios Community 2015 version, and I would like to use Cocos 2d-x in unison with VS to create an app. I have currently sifted through a lot of different websites and eventually stumbled upon this : https://www.youtube.com/watch?v=xqtT0E68TJM. This guy is the most informative resource i have found for installing Cocos with VS. I followed his entire tutorial to the very end. With a few minor changes.
At the very end of the tutorial you can see he opens the project.sln file in Visual Studios and runs it. This then brings up the little interface with some numbers across the bottom. When i open it in my Visual Studios it says :
"Unable to start program"
C:\Users\guy\Desktop\Personal\Projects\GameTest1\GameTest1\proj.win32\Debug.win32\GameTest1.exe
The system cannot find file specified."
I cant figure out What exactly is going wrong and why mine wont work. Like i said i only changed a few things from the tutorial but that was because it was from years ago, So i had VS 2015 instead of 13 etc. But my changes were as follows:
I updated my Java recently which was up to Java 8. I downloaded the Newest Eclipse from their website and ran it just like in the tutorial ^. But it didn't work so i had to figure out that in order to run .py files like in the tutorial you had to add "python " before the "cocos.py new ......" in order to create a new file. Then it told me that i had to be running Java 1.6 Whilst i was currently running 1.8. So i downloaded an earlier build of Java then used it as the path destination for eclipse. Then aside from that everything built and i ended up with the right files named correctly in the right spot and presumably in the right format. It just gave me that error ^ at the very last step of the tutorial :S.
Firstly - Cocos2d-x uses C++ or Js(i.e. Cocos2d-js) and not C#.
Secondly - Yes you can port your app to apple app store with Cocos2d-x but it can only be done by a mac but not a windows pc .So if you want to port your game to apple devices you must be having a mac.
Thirdly - It doesn't matter if you have installed java unless you are developing for android.If you want to port your game to android then you must have java installed(it doesn't matter if you have latest version or not but you should install greater than v1.5)
Now coming to your problem
Ensure that you have python version2.7 or greater is installed version 3. will not work.
Also ensure that you don't have any spaces in your file path as that may cause error sometimes.
Hope it helps
Lovekesh Garg provided me with a complete, if not incredibly extensive (abundantly helpful) explanation of basically everything i have asked.
I have been pursuing other interest after realizing the expense involved after some investigation so i apologize for the late answer posting :S.