Cannot add the existing Solution file or New solution file in Vs Code. Using Solution Explorer Extension.
I have tried reinstalling Vs Code / Solution Explorer
When I first tried it with the help of README File, I got same issue you have. Here is what I do to make it running:
First make sure you have already installed the .NET SDK and C# extension.
Open the project file in the VS Code's Explorer:
Now you can open the solution in the Solution Explorer:
Related
Basically, after installing visual studio on my second computer I went to make a simple console application. Instead of saying start or letting me run the program it would just say attach. It works perfectly fine on my other computer and I downloaded vs the exact same way on both.
I also tried doing "dotnet --version" in the command prompt on both computers and the computer that works is able to find a .NET version on my computer but the one with the issue cant, it says I haven't downloaded it... when I go to download .NET separately it still doesn't work.
In my solution explorer it says "0 projects" even though I clearly have a project file in the folder along with the solution. When I try to add an existing project it simply doesn't let and says "The project file cannot be opened. Unable to locate the .NET SDK. Check that it is installed and that the version specified in global.json (if any) matches the installed version".
I also tried the solution from this thread: Microsoft Visual Studio 2019: The project file cannot be opened. Unable to locate the .NET SDK
and it didn't change anything.
I've tried reinstalling and repairing visual studio and even that didn't help at all.
If any of you have any idea what I could do to fix this that'd be great!
That usually happens when you open the project from the project file, from the folder that contains it, instead of opening it from VS. Try open VS first, and then browse to open your project and should work. Another way to solve it is clicking on "reload" once the project is open.
Some other times it happens when you open the (.cs) file instead of the project file. Attach - start issue
I am not so into .NET (I came from Java) and I have the following problem. I started a .NET project in Visual Studio 2017 Community Edition.
Then I uninstalled Visual Studio (because I obtained the exception messages in Italian language, so reading here I found that maybe uninstalling VS and installing it again with only the English language avoiding the Italian one it can solve the problem).
Ok, I reinstalled it selecting only the English language pack.
The problem is that now I can't open again my project in fact doing:
File --> Open --> Project/Solution
then I select the folder of my project then I select the .sln file of this project.
The problem is that the project is not loaded and into the Solution Explorer; I get the following error message:
Unavailable, the project file was unloaded
Here is what I see:
Why is this? What could be the problem? How can I try to fix and correctly load my solution?
"Unavailable" like that usually means it literally cannot find the project file.
Make sure the csproj is on disk, and at the locations specified in the .sln file.
Try running VS19 as an admin. It worked for me.
A project may be unloaded from Visual Studio to allow you to edit the project file, or to allow something else to modify it (as I suspect is the case here). You can do this by right-clicking on the project and selecting 'Unload Project'
To re-load the project, right-click on it and select 'Reload Project'.
Of course, if the project file is missing or damaged (as mentioned in the other answer) this may not work. If this is the case, try and find the .csproj file or edit it manually to see if you can fix what's broken.
Running as an Admin worked for me. I get this issue everytime I update my Visual Studio.
It's late but I faced this and i had to load all projects(option from context menu on solution)
Try opening the project only from the folder. This is: (Menu) File → Open → Folder. And not directly from the solution, which is: (Menu) File → Open → Project/Solution.
I'm a beginner at asp.net. I've downloaded a few projects of asp.net but several of them don't contain the .sln file or the .csproj file to run them on MS Visual Studio 13.
Question is how can I open/load downloaded projects on Visual studio 2013 and modify to my own needs. I've tried but couldn't find anything relevant. Any youtube link/step by step guide will be appreciated. Thanks.
The .sln and .csproj files are necessary for VS to perform many actions because they specify important configuration info like compilation instructions, debug settings, etc.
If you need to build the projects using Visual Studio, then you're going to need those files. Since you don't have those presently, it stands to reason that you could create new ones. Create a new ASP.Net project in Visual Studio, select the options that best fit what you're trying to do, and then add the downloaded files to your new solution/projects.
EDIT: or, if you're opening a website, do as SouXin recommended in his answer.
If they don't. It's most probably means that they are web-site. To open them: In VS File->Open->Web Site (OR Shift-Alt-O)
BTW when you open as Web Site solution file will be created automatically.
I've been trying to load a project from a SourceGear Vault Client that has a plug-in for Visual Studio 2010. After selecting the solution file, the solution explorer populates with the associated projects but appends (unavailable) to the end of each project name.
The usual remedy is to reload each unavailable project but in doing so briefly reveals all files within each project but then VS quickly hides them and makes the project unavailable again.
So far, I have tried opening the code in VS2015, removing all related source control information from the .csproj and .sln files, and deleting the associated .suo file. Nothing has worked yet and I have exhausted all the known fixes.
Thanks for your help.
For clarity, I'm copying #PeterRitchie solution that worked for me, below.
You could try running Visual Studio in safe mode to see if a 3rd party plugin is to blame: devenv.exe /SafeMode – Peter Ritchie
The problem that i have is that when i open the solution that i am working on, in some files it will not recognize a namespace even thought that namespace is part of the same project and the solution builds fine. I could get rid of this problem by deleting my .suo file in the solution root folder but it is getting annoying to delete the .suo file every time i load the solution, plus i like the options that visual studio remembers the documents that i had opened when i closed the solution. I have heard that this may be caused by an extension but i disabled all the extensions and it still happens.
I am using visual studio ultimate 2013. I am working on a big solution that is connected with tfs and many peoples are working on it.
Does anybody have any idea why this is happening?
This question is old and I'm on a newer version of Visual Studio (2017), but having the same problem and my Google search led me to this question.
The solution to this in VS 2017 seems to be to delete the .vs folder that's in the same folder as the solution file. It's hidden, so you'll have to either show hidden files to see it or open a command prompt in that location and run the command
attrib -h .vs
Sometimes, if you have this problem and need a quick workaround, you can build .dll and reference that in project.