Folder view doesn't work? - visual-studio

So I am trying to get into C# as it is used for a lot of things.
I want folder view so that I can click on a folder and put a file in there without having to go to file explorer. The problem is, when I go to Solution explorer, click on my project, click on folder view, It does nothing. I actually don't know if it is worth it to go through all this trouble but I thought I might give it a shot.

I think you can only enter folder view from the solution level (rather than project). In Solution Explorer, single click on the solution you have open. Then, click the folder view icon at the top of the Solution Explorer. This will toggle the view to folder view mode.

Related

Solution Explorer opens in Folders view

Visual Studio 2017.
I have a project that have been working on for some months. Now all of a sudden whenever I open the solution, Solution Explorer will show it in Folders view. I have to click the following button and select the other option to show it in Solution view:
How do I restore it to the usual situation?
In My case,
I opened the folder where the actual files of the project are placed in file explorer.
And double click on the solution file(file with extention .sln).
It will be opened in the usual view(Solution View)
If you've copied a repo from github and created a solution, make sure you save once before switching to folder view. I forgot to save the newly created solution once, switched to folder view and as a result, could not get back to solution view. Very strange that my solution was somewhere in the void. I restarted VS 2017, recreated the solution and saved it.
By clicking on the same icon has worked for me though i found my whole solution got check out.So before clicking make a note which files are actually for checkout in TFs .
This was happening on one of my projects. I would change to Solution view, save/commit, but the next time I opened it, it was in Folder view again.
I don't know where the "last view" is stored, but apparently it's not in the .sln file.
I right-clicked on the solution and used Open in File Explorer, and opened the .sln file with VS Code and added a blank line at the bottom to "touch" the file. Then I reloaded and checked it in and it stuck.

How to move GlobalSuppressions.cs (Suppress Code Analysis) from project root in special folder?

I would like to move GlobalSuppressions.cs (Suppress Code Analysis) from project root in special folder.
Example
I would like to use one GlobalSuppressions.cs file in several projects of one solutions.
I don't think it is possible to move it. If you do, it simple recreates the file in the root folder. If you wanted to share the file, then you could:
Right-click on the other project
Click Add Existing Item
Locate the GlobalSuppressions.cs file and select it (single-click only)
Click the down-arrow just to the right of the Add button
Select Add As Link
This will basically add a shortcut to the file in your other project. You can tell if it has worked because the file icon in Solution Explorer will have a little blue arrow and square.

Issues opening project file in tfs?

I am trying to open a project/website for edit in TFS and I'm having a lot of issues. TFS is proving a learning curve for me...
I'm trying to access files in the 'forms' root...
These are the steps I’m taking…
Right-click on ‘forms’ and click on “Get Latest Version”
Then this screen pops up…
When I hit OK, then I right click again, and click “Check Out for Edit”
I hit “Check Out”
Then to open the site, I go to File > Open > Web Site…
Then the File System comes up… I selected ‘forms’, as you suggested…
Once it opens, I see this…
I double-click on ‘Default.aspx’, and this comes up…
When I view in Browser, this is the screen I get…
Where am I going wrong?
Here's the best way to accomplish what I was trying to do. This was after several hours of trial/error...
Open a Web Site…
Select Source Control Project…
Choose the site root.
It may prompt you to receive a local copy. Do this.
If it asks you to change frameworks, say no.
In the Solution Explorer, a new .sln file should be generated, with properly bound files:

Moving files from one Visual Studio solution to another

What I usually do is create a new file in the solution where I want to use it (same name), copy & paste the contents of a class from the source solution to the target, fix the namespace & imports as needed.
The only other way I know to do it is open the source file in the target solution and then just save a copy into that folder, which can get confusing with two files open with the same name in one solution.
Does anyone have an easier way to do this?
You can just copy and paste the files themselves.
When you have your solution open, look at the top of the solution explorer and you'll see an icon that looks like a page with a page outline behind it and a yellow page (not a very intuitive icon). This is the "show all files" button. Click that and you'll see all the files in your currently selected project (it is project-specific). Highlight any files that you want to include, right-click, and select "Include in Project."
You could just copy the file with Explorer. Or better yet, start refactoring your projects so that you'll create assemblies that are usable by multiple client projects.

Explore containing folder instead of open containing folder

I use Visual Studio to do a lot of my coding. I find the open containing folder feature quite helpful. But I don't want the folder to be "opened" by the windows explorer, instead I want to "explore" the folder -- you know, get the nice little frame showing me all the other folders on the left hand side. Does anyone know how to do this?
Thank you,
Rohit
When invoking ShellExecute(), use the explore verb instead of the open verb: http://msdn.microsoft.com/en-us/library/bb762153%28VS.85%29.aspx.
Edit: If you don't mean programmatically, open Windows Explorer, go to Tools -> Folder Options, select the File Types tab, locate the Folder entry in the list (not File Folder!), click Advanced, and set "explore" as default instead of "open".
There really isn't much difference anymore between 'explore' and 'open' if you're talking about a folder. They both open the same window, just with different options active. When you 'open' the folder, you're only one click away (on my system at least) from seeing the folder tree as well- just click the "Folders" button in the toolbar.

Resources