I am working on vs code. When I open any folder the IntelliSense is not working when I hover the mouse over any text. It was working before but now I don't know why it's not working. Kindly help...
Solution 1 :
Ctrl+Shift+P
Write "OmniSharp: Select Project" and press Enter.
Choose the solution workspace entry.
Then enable the C# extension for "OmniSharp : Project"
Solution 2 :
Selecting a project.json-file is opening a DNX-project and VSCode will load that project plus the referenced projects.
Selecting a *.sln-file is opening a MSBuild-project. It will load the referenced *.csproj-projects and sibling or descendant project.json-files but no other project files that are referenced from the solution file.
Selecting a folder will make VSCode scan for *.sln and project.json files and VSCode will attempt to load them all.
More info see: https://github.com/OmniSharp/omnisharp-vscode/issues/1889
Solution 3:
Download C# v1.24.0 extension can fix the IntelliSense for you
Solution 4:
For bootstrap and HTML IntelliSense, add the following extensions:
HTML HTML CSS Support
IntelliSense for CSS class names in HTML
NOTE :
All solutions need to close your VS and reopen it again.
For me solution 2 worked.
C# IntelliSense did not work with C# Extension v1.25.0.
Solution involved:
Download the old version of C# Extension 1.24.4 vsix
Install vsix manually to VS Code:
Open VS Code.
Open the “Extensions” sidebar (you can use
“Ctrl+Shift+X”).
Click on the ellipsis icon in the top right corner
of the menu.
Select “Install from VSIX…” VS Code will open a
document browser.
VS Code will now begin the installation
process of the extension.
This happened to me on 2 separate machines
Related
VS 2013. Following on from my previous Q of not being able to edit a file without causing a crash Edit a cs file and the project wont build seems to be a csproj issue.
I have followed the instructions I found:
To edit a .csproj (or any other project file) directly from Visual Studio, do the following:
Right click the project in Solution Explorer
Select "Unload project"
Project is now unloaded
Right click the project again and select "Edit blah.csproj"
Make your changes and save them
Right click the project and select "Reload project" to apply the changes
However unload project is not available (please see image)
why is this?
I Have done a complete search of the folder and .csproj does not exist? How is this possible
Potential answer, at least for VS2022
Here's the Solution Explorer view of my current project (super-retro RogueLike console game in C#)
If I click on the top level of the solution explorer ("Solution 'RogueLike Tutorial' (1 of 1 project)"), I get the menu like you showed, with no Unload Project option:
But if I go one item lower in the menu, to "RogueLikeTutorial" (with the C# badge), I get the following menu, which is the one you were looking for:
No idea if that was the case almost 5 years ago in VS 2013, but finding your question and the comments helped me when I just ran into this issue in VS 2022. I hope this helps any future time travelers!
I have a Strange issue that I can't seem to fix, my Intellisense for XAML is no longer showing up and the code behind is only showing the premade Members. The Classes and Methods I have made are not showing up. Also Visual Studios is not recognizing other pages and wont recognize Navigation either.
I have tried going to Tools>Text Editor>C#>Intellisense -Statement completion and checking the boxes Auto list members and Parameter information. I also tried to clear out the cache.
From what I have researched it seems nobody else is having the same problems.
Close all open tabs in the project and quit VS, reopen the solution in VS and right click the XAML file in the Solution Explorer and then select Open With….> Source Code (Text) Editor.
Delete obj folder and clean project
Right click the XAML page>Properties>Build Action>change it to something else and back
Add a new content page under this specific project and check it works or not.
I would like to add that this worked for my .cs files only.
To get the XAML files Intellisense to work try to repeat the above steps on your .cs files or wait for the XAML files to gain Intellisense.
For ReSharper users: I found that having ReSharper's IntelliSense enabled for all languages can break Intellisense unexpectedly (especially for XAML files). Here's how I was able to fix the same problem that the asker had in Visual Studio 2017 with ReSharper installed:
In Visual Studio, go to the ReSharper menu and click on Options.
On the left side go to Environment > IntelliSense > General.
Select the Custom IntelliSense radio button.
Change any languages that have broken IntelliSense to Visual Studio (like XAML).
Click the Save button.
Just Exclude and Include Xaml Pages and It works again.
I solve that by changing the default editor in visual studio :
In Visual : File > Open
In the open file box : Select a .xaml file (don't open it)
Select "Open with" in the button arrow
Select "Source Code (Text) Editor and Set as Default
Click OK
I tried most of the above without much luck, but noticed if I created a new page, then intellisense worked as expected. For the properties section of the xaml file I noticed that the new page had a Custom Tool assigned (MSBuild:UpdateDesignTimeXaml) do I tried to cut-and-paste this into the existing forms without luck.
Looking at the .cs page for the new page that worked I notice that there is some extra info above the partial class [XamlCompilation(XamlCompilationOptions.Compile)] so I added this along with a using Xamarin.Forms.Xaml statement.
Finally I went back to the xaml properties page and selected Reset to Default for the Custom tool. Voila, for me everything started behaving itself.
Please add the following Nuget Package from Nuget Console.
Install-Package MobileEssentials.FormsIntellisense -Version 0.1.1-pre
You can download the latest update from the following link.
https://www.nuget.org/packages/MobileEssentials.FormsIntellisense/0.1.1-pre
After installing the package please restart the project and wait for sometime and check it.
Just delete .vs directory. this directory is hidden. so
Just Exclude and Include Xaml Pages worked for me too. The difference in .csproj file was:
MSBuild:Compile
now:
XamlIntelliSenseFileGenerator
I could fix the issue in VS2019 by launching the VS installer to modify it, un-check and check the workload ‘.NET desktop development’ to re-install it.
I created a web application project and it's working fine. Now I copy this project and create the new project with the same source. This is also working fine. Now I'll try to publish the second project now I get the error:
Copying file obj\Debug\Package\PackageTmp\Site.Master to obj\Debug\Package\PackageTmp\obj\Debug\Package\PackageTmp\Site.Master failed. Could not find file 'obj\Debug\Package\PackageTmp\Site.Master'
I tried many way, but not resolved my problem. Please help me to solve this.
It looks like VS is telling you it can't find the file Site.Master. Check that it (and any others) is included in the project by:
Click the "Show all files" icon in the Solution Explorer. This will show if any files are not included in the project;
The right click on the files/folders that are greyed out (not included)
Select "Include in project".
i got a problem with my site with my app_code files and a lot of question ive read people say you need to change the proprties of the .cs files to Build Action.
by right clicking the .cs files and press proprties.
but...
when i right clicking the files i cant see any option called proprties so i press F4 and it open a proprties window and i just click on the .cs file and still cant see any option i can change somthing to Build Action.
any idea why i cant see this options?
EDIT:
my problem is that when i get in the file proprties i have only 2 options...
thay are called:
1.Full Name
2.Full Path
EDIT2:
here what i see in visual studio 2010 when i try access the protrtie menu/window
http://img338.imageshack.us/img338/2359/blac.png
As Microsoft points out in the article "Web Application Projects versus Web Site Projects":
Web application projects use Visual Studio project files (.csproj or
.vbproj) to keep track of information about the project. Among other
tasks, this makes it possible to specify which files are included in
or excluded from the project, and therefore which files are compiled
during a build.
An answer to a similiar question at CodeProject's forums reveals a hint. Abstract:
[...] Looks like you are working on a web application that is actually a
Website as per Visual Studio. You would need to create a new Web Application
and probably copy over the source files there. [...]
http://www.codeproject.com/Questions/173637/Setting-Build-Action-for-Files-in-App_Data
Have you tried this:
You say you haven't got the option being suggested by other posters.
If this is the case, than it is quite possible that your Visual Studio settings are corrupt; this can give rise to all sorts of odd behaviour.
I would suggest you reset your settings, but please be aware you will lose any custom IDE settings that you've previously applied.
Try this:
In Visual Studio, go to Tools->Import and Export Settings
Choose "Reset All Settings" and click Next
Choose to save your current settings if you wish, or select "no" and then click next.
Choose the collection of settings( he IDE preset) you want, probably "Visual C# Development Settings"
Visual Studio will now revert all settings. Hopefully this will make the Build Action reappear.
[EDIT]
It might be worth trying safe mode too.
To do this, start up a "Visual Studio Command Prompt" from your start menu/programs list in Windows, and start Visual Studio with
devenv.exe /SafeMode
Does this make the options appear?
You can copy the file from Windows Explorer and paste it in the Solution Explorer. It will replace (or do nothing but incorporating it in the proj file) the file and recognize it as C#.
Normally you should see a Property named "Build Action" in the first line of the Property Window. This property should be set to "Compile".
Please select file and right click on it so that you will get following screen
Than click on the Properties you will get following screen
You can find build option in as a first option.
My project has some references. One of them has no path. I can't view it in object browser. When i want to remove it, my project closed.
I can't remove or change this reference. What can i do?
Thanks in advance.
Edit your project file with notepad and check the problem. (.csproj in case of C# project)
Visual Studio has a specific editor for project files, if you can open the solution which contains your project then if the project icon is grayed out just right click on it and select edit, you will have the project file opened in the text editor with xml schema validation and intellisense.