How do I add folders into the Solution Explorer for Visual Studio Express 2012 for Web? - web

I am very new to Visual studio, so I am trying to learn the basics.
I have read so many articles but some are for 2012, some are for the non-web version, etc, but I seriously can't find a solution to such a simple task as this.
I am using Visual Studio Express 2012 for Web, and have created a "Blank Solution".
I end up with this view:
Now my goal is to add all my existing files and folders and have it shown in Visual Studio.
So, I have located my solution file on disk and copied all my files into the same folder:
Now, I know its possible to add single items into the view by right clicking and picking add item:
But I cant include folders here. I have tried to drag and drop, I have read guides about using the "Show all files" button, but apparently that does not exist for the Web version of Visual Studio 2012.
Could anyone please tell me what the proper way is to include all my files into the solution explorer?

I just had this same problem in Visual Studio 2012 Ultimate. I know your question is about Web but maybe this will work for you too.
Assuming the files/folders you want to include are in your solution folder, from the Project menu toggle on "Show All Files", then you should see the files/folders in Solution Explorer. Select those you want to include, right click and choose "Include in Project".

A solution contains one or several projects and no solution-wide files (normally). Create a project, and then follow How do I add an existing directory tree to a project in Visual Studio? to add the files.
(It was a long time ago I did it this way, and with an earlier version of Visual Studio, so YMMV.)

I think that the best way to do it is to simply drag&drop desired folders with files between file explorer and solution explorer in VS. I've just tested it and that works the best for me.

You can place your files in the Solution folder and refresh the solution explorer :) It'll automatically add your files, I do it for 2010 and think it'll work for 2012 as well

In solution Explorer top toggle,You can find few icons, Find Show all files and click on it.Navigate to the folder exactly matching the same address in your visual studio and you can see a folder which is newly added into your project,Which is displayed as a dotted folder and right click on it and include it into project.
Don't forget to convert the project into Web-Application.
Thanks.

I actually found the solution.
So in solution explorer there is a button "Solutions and Folders" screenshot
When you pressed it your project folder would be opened. You find the folder that you need to add, copy it (screenshot), return to project solution and past it

Related

How do I download the content of a project in Visual Studio TFS?

How do I download the content of a project in Visual Studio TFS? I clicked around and I did not find an easy or intuitive way to do it. It is an old project that I thought had been lost until I reinstalled the latest version of Visual Studio.
You can get the TFS project from Visual Studio. First, you have to connect the project via Team Explorer in Visual Studio then add a server and click 'select team project' and you're done. It is downloaded to your PC.
You can find a documentation here.
EDIT:
Also, if you want to download your code as a zip:
You can click on any ellipsis to find the menu which contains Download as Zip option.
If you merely want an archive of the contents of a folder, you can right-click on the folder in the tree view on the left hand side of the page (in this case, on $/gelsana) and select the option "Download as Zip".
This is suitable for archival purposes. You cannot check-in changes made using this option.

Importing an existing source file in Visual Studio 2012

I want to add the source-code of a tutorial into an existing project, and I want the file to be copied to the project folder from the temporary file on the desktop I downloaded it to. Context clicking on the "Source Files" Folder in the Solution Explorer leads me the Add->Existing Item... menu, and I can then add the source file. However, it is NOT copied into the project folder, but stays in its original location. The project just knows about it, displays it in the Solution Explorer, and considers it part of the project.
This help page on MSDN tells me that in Visual Studio 2010, default behaviour used to consist in copying the file into the project folder, and that one could choose to Add a link instead of physically importing the file into the project directory by choosing "Add Link". However, now I always only get a link, and real physical import into the project folder seems impossible.
I could go through the File Explorer to physically import, but the Solution Explorer doesn't update the new files on the fly, and I would like to do this from within VS.
Is there a way? Is this a bug in VS 2012?
Copy in the files using Explorer, then in the solution explorer tick the Show All files option in the button bar of the solution explorer (you might need to select a Project first).
You can now right-click any files not part of the projects and choose Include in Project.
Or use the Add Existing File option.
The reason files are not added automatically to your solution when pasted into the folder using Explorer is because you might not want to have them added.
A neat little trick is to use the "Open In explorer" option:
(though it might be added by the Productivity Power Tools).
Plus, you can Drag&Drop files directly from explorer to the Visual Studio (when they're both running in the same elevation level if you have User Account Control enabled). To fix the UAC issues, you can either run Explorer as administrator too or install the VSCommands extension.
And you can Copy&Paste a file or set of files into the solution explorer by right-clicking a project or project folder and picking Paste on the context menu.

How to change working directory in Visual Studio

How can I change the working director of Visual Studio C++ 2012. The default working directory is $(ProjectDir), every file I create in my codes are created in the project directory. What I want is that every file is created in the source code's directory, is that possible?
There is no convenient way to do it, but there are some workarounds.
One solution is to move project file to source directory.
Another solution is to add whole source directory to project (just drag'n'drop directory from windows explorer to project in solution explorer). Now, you can add items by right-clicking at source directory in solution explorer. They'll go to physical source folder. This surely works on Visual Studio 2013 RC, but I'm not quite sure about Visual Studio 2012.
One more solution, is to create Project Wizard or even Plugin. It's along story. Maybe, someone already done this, but I was unable to find.

How do I create a physical folder in Visual Studio Express 2012 for Web?

Is it possible to create an actual physical folder via Visual Studio 2012?
When right-clicking on the Solution only gives me the option to create a Solution Folder, which are really "virtual folders".
You first need to create a project in that solution. Then you can add as many folders as you like.
A solution is a way to group a set of projects that can / need to be built together etc.

Visual Studio 2012 Windows service .vdproj project migration

I'm trying to move a solution I have over to Visual Studio 2012 and one of the project types is .vdproj.
According to this link this project type is not supported in Visual Studio 2012:
MSDN says they recommend that you use InstallShield Limited Edition for Visual Studio.
The problem is, when I open up my solution in VS2012 and try to add a new "Enable InstallShield Limited Edition" project to my solution, I get an error message saying:
Creating project 'test'...project creation failed.
Why might I not be able to add a project of this type to my solution?
If I make a new empty solution I can't make an InstallShield project it in either.
I'm going to try to download InstallShield limited edition and see if it does anything.
I tried out that InstallShield download, and it added two extra project types, but I'm unable to create either of them. I'm able to add normal website projects to my solutions just fine, but not deployment projects.
The installer was named the same, but this one prompted me to re-start. After re-starting I was able to add an InstallShield project, but it gets created in its own solution. So, it looks like now I have to figure out how to use it, and I'll be good to go.
It's looking like the limited edition doesn't have support to install Windows services.
This will probably be long and boring because there's lots of steps, but I'd like to write up how to move from a Windows service installer .vdproj to the new InstallShield LE that's available in Visual Studio 2012.
Step 1: Create a merge module (.msm)
Follow the steps of this guide.
Notes:
You will need to install WiX 3.6 and isWiX
The latest release of IsWiX doesn't enable the Tools menu item in Visual Studio 2012. Edit the file: C:\ProgramData\Microsoft\MSEnvShared\AddIns\IsWiXAddin.Addin (XML) and clone the HostApplication element and update 10.0 to 11.0.
In step #8 of the guide, it references a code tab. This has been moved to the XML Editor item in the bottom of the left menu
I left the MergeRedirectFolder empty for my installation
Here is my isWix files view:
After you're done with the guide you should have an empty .wxs file that looks something like this:
Using the Component XML element pulled from here you should end up with a .wxs file that looks like this:
Hit build and you should now have a .msm file.
Step 2: Adding merge module to InstallShield
Go though the wizard to setup the basic install information like company and version information.
Find the redistributables view in ISLE. Right click the list and select browse for module. After your module is found and added, right click the modules and select properties. Set the destination folder drop down to INSTALLDIR. I had to set mine to the lowest level folder I created for my install path, so you might have to experiment a bit.
Build Project, and test on virtual machine
Redistributables Screen
If you're getting errors about the path being too long you might need to change the release location to something close to the root.
Here's a list of all the build errors for reference.
Now you should be able to run your installer and have it install/start a Windows service. A lot more work than .MSI files, we got it to generate in Visual Studio 2010, but overall it was not too bad.
While there is no easy or truly supported solution for Visual Studio 2012, Visual Studio 2013 users can get an extension from Microsoft in the Visual Studio Gallery.
I found this post which says you must download InstallShield first. It's a very confusing way to work. I suggest to vote up the post on the connect site and give them comments letting know how poor that is. They could at least give a more descriptive error http://connect.microsoft.com/VisualStudio/feedback/details/732196/project-creation-failed-for-installshield-limited-edition#tabs

Resources