Visual Studio 2013 - Open .aspx and .cs files from other project at the current project - visual-studio-2013

Probably it's a stupid question but i would like to open aspx and cs files from the windows explorer without opening a new instance of visual studio, is this possible?
Greets,
Firmino

There are several ways you can improve your experience opening files in VS.
You can use drag and drop
Troubleshooting: You can't drag and drop between apps in Windows if one of them is running with admin rights and another is not. Normally, you don't need either of Explorer or VS to run with admin privileges.
Visual studio running with no admin rights will most likely will be reused to open a file when you doubleclick in the Explorer (sometimes it still opens new instance with no sensible reason)
You can use File_Menu->Open->File (Ctrl+O). This will basically open an Explorer instance for you.
You can use File_Menu->Recent files if you have opened desired file recently
You can just add file to the project (and then get rid of it when it's no longer needed) (Shift+Alt+A)
You can use Show All Files feature (a toggle button in Solution Explorer) to view all the files under project folder (recursively), even if they are not included in the project. You cannot see folders higher in hierarchy, but you could make for example a symlink or just a dumb copy
You can file a feature request or a bug report (it can be done from VS itself) to make developers know about this situation
Hope any of those solutions will work for you.

Right Click On The File
Click Open With
And Select Notepad..
It Would Do The JOB

Related

How to duplicate a source file in visual studio

in visual studio 2019 on windows, if you right click on a .cs source file in the solution explorer, you have the option to copy. There is no duplicate option. If you copy, there is no paste option. There is no duplicate or paste in the file or edit menu either. There is no ctrl-v option either.
Any ideas?
I cant find any way to add a source file either. If I right click on the directory such as "blocks" where my current source files in my project are, then click "add", the menu which pops up "controller" is greyed out, as is "class".
There are no permissions issues - this is just a project I have been working on but is now "broken". If I go to the root of the project in solution explorer, it has the option to create controllers for example, but bazarely not folders or classes.
If I create a new .cs file in one of the source folders using windows file explorer, there seems to be no option to get this new file picked up by visual studio. The refresh icon at the top of the solution explorer is greyed out, and F5 does nothing.
Well, took me a while to figure this one out. Unlike every other IDE I have used for the last 20 years (eclipse, intellij etc), VS is for some reason making the entire project read only when its running locally. I have to stop it running to be able to add files etc.

Visual Studio 2013 : how to open multiple projects in different windows?

I'm trying to open two projects in two different windows but every time I double click an other solution, it closes the old project and then it opens the new project in that window. I mean I could do this with VS 2010 but with VS2013, I can't. How do you open multiple projects in different windows ?
EDITS: maybe I can't explain myself well. I want to open two different solutions in two different windows. this will make me able to work on many projects at the same time.
SOLVED:This issue disappeared as I reinstalled the OS!
If you have Windows 8, you just need to search for Visual Studio in the start menu, then right click and choose Open new window. It will open another instance of Visual Studio.
Start visual studio as many times as needed and open each project in each instance of visual studio (file -> Open -> Project/Solution )
in VS13, when you open source code, it opens it in tabs, you can see the name of the tabs right at the top of the window.(the name of the source code will be there) just drag it and move it off Visual studios, somewhere over your desktop and it will open in a new window. I believe that will work. Please let me know if this works, i know i have documentation on viewing tabs in VS, let me find it while you test this :)
if you want a way around opening another instance of VS, open the project by locating it For instance C:\Users\Jonathan\Documents\Visual Studio 2013\Projects thats my default location, open the project there, it opens VS as a new instance
Here is how the problem was solved!
I have created another user in Windows OS
Log on with the new user credentials
Open Visual Studio
The issue remains when I log with another user, that is why I would say it is due to current user settings.

MS Visual Studio.net - saved source files missing after reboot

The other day I created a MS visual studio 2010 C# project and started coding. I saved the source frequently, but I did not select a destination to save to (just pressed ctrl+s and assumed the source was being saved). However I had to run and threw my laptop in my backpack on sleep. Unfortunately this laptop (acer aspire 5252 fyi) battery drains extremely quickly when on sleep, and eventually my computer shut off. Now I can't find my source files anywhere and I'm going crazy because I know I saved it and it's several days worth of work.
I tried doing a windows search but couldn't find the project files. I also did a little experiment - I created a new project and without saving the entire solution, I pressed ctrl+s on the source files. Save was successful, but I cannot even find the file that's open in the IDE. Even the "open containing folder option" is grayed out (see screen shot).
I really need these source files back. Obviously it's because I didn't save the solution that the source got wiped out, but where do the source files get saved temporarily before the solution is saved?
Thanks.
You are using Visual Studio's support for temporary projects. Nice feature for quicky test projects (and SO answers) but not a great way to ensure that your projects are still there after VS quits. Programming without source control is similarly inadvisable.
Tools + Options, Projects and Solutions, General. Ensure that the "Save new projects when created" option is ticked to minimize the odds that you'll forget to pick a solution folder. Triple-check that creating a new project now gives you a "Location" property in the dialog.
There is a default location for projects to be saved. That is probably where your files went.
In Visual Studio, on the menu, click Tools > Options > Projects and Solutions > General. There is a "Visual Studio projects location".
On my Windows 7 machine, the folder for Visual Studio 2010 is
C:\Users\<username>\Documents\Visual Studio 2010\Projects
Your unnamed project is probably saved with a default name like WebSite1.
If you would like to change that default location, here is some information on how to do that.
Visual Studio temporary projects are normally found in *C:\Users\"User Name"\AppData\Local\Temporary Projects* . It is a temporary folder that is deleted as soon as Visual Studio starts up.
How to save a Temporay Project from above link:
To save a temporary project
In Solution Explorer, choose the solution or project that you want to save.
On the menu bar, choose File, Save or Save As.
The Save Project dialog box opens.
In the , Name box, specify a name for the project.
In the Location box, specify where you want to save the project.
Select the Create directory for Solution check box.
Note: This check box is not available for Visual Basic web projects, Visual C# web projects, or other directory-based projects.
In the New Solution Name box, specify a name that differs from the project name.
Select the Add to Source Control check box if you want to add the solution to a version-control database or repository.
Choose the OK button.

Visual Studio 2010 - How to enable prompt to delete file from disk when removed from project?

In Visual Studio 2005, when you remove a file from a C++ project (by right-clicking in the Solution Explorer and selecting "Remove"), it asks you whether you just want to delete the reference, or also delete the file itself from disk.
In Visual Studio 2010, this prompt seems to have disappeared (or I have accidentally turned it off). This means that every time I delete a file in the Solution Explorer, I have to immediately hunt it down and delete it with Windows Explorer (otherwise I'll forget and it will stay around forever). How do I get the prompt back?
I found some documentation (http://msdn.microsoft.com/en-us/library/0ebzhwsk%28v=vs.100%29.aspx) explaining the difference between "Remove" and "Delete", and that "Delete" doesn't exist for C++ projects (but no reason is given). Maybe it's really just not possible? If so, what an annoying regression.
You get the remove or delete file dialog only if the selected file is stored in the project folder. If the file is stored outside of the project folder the file reference is removed without dialog.
This behaviour is still the same for e.g. VS2013. I created a user voice request to change this behaviour here. IMHO your file hierarchy should not make any difference.
You can vote for the change here:
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/9146353-remove-delete-dialog-should-show-up-when-deleting
Assuming one is using Sourcegear Vault as the source control system, you can enable the prompt by going to Tools -> Options -> Source Control -> Integration Options -> and check on "Show warning before deleting items from source control"

Can you add documents and spreadsheets to a Visual Studio Project?

In Eclipse, I often include all project-related material (including documents in PDF, Microsoft, and OpenDocument formats) in the project. Is this possible with Visual Studio, especially to the point where if I attempt to open the file from inside Visual Studio, it will open in the external application?
Yes, just right-click your project in the solution explorer and goto Add > Existing Item...
Though -- I'd recommend making a new folder to keep this in.
Yes, you can make sure that when you open it it opens with the correct application. Just right-click the file once it's added into the solution explorer and select Open With... and make sure you set the default application that way from that point forward you can just double-click your files.
If you have access to use Sharepoint Services with your source control than that would also make life much easier, thanks for reminding me Chris!
I don't want to take away from Chad's answer. However, I will add that TFS has specific areas for project documentation to be stored in sharepoint.

Resources