I'm translating a large application (solution with several projects containing about 100 forms) in Visual Studio 2012. I created a tool to export RESX files to XLS and create RESX from translated XLS. This app generates a RESX file and places it in the right place in the project folder tree. This is working as expected.
The problem I'm facing is I have to manually right-click every new RESX file and click "Include in project" ("Incluir en el proyecto", sorry I have VS in Spanish).
Is there any automated process that can do this?
In the interest of full disclosure, I'm the author of TranSolution, a commercial localization tool for Visual Studio (which does what you're asking and much more). It's not clear exactly how you want to do this, but maybe this is what you're after: https://msdn.microsoft.com/en-us/library/envdte.projectitems.aspx. See the "AddFromFile()" member for instance which my own product relies on but it's not trivial to set all this up though. Moreover, you need to consider updates as well (not just adds), and when doing so, other issues come into play, such as what happens if the ".resx" file is currently loaded in Visual Studio (if you're doing this in an active Visual Studio session you need to refresh it), what happens if it's currently checked out (in a source control package), etc.
Related
Hi I'm trying to teach myself c++ but I can't even get the most important feature to work. The build/compile button won't show. Its grayed out. I only want to use visual studios because its what all the devs use in my friends company where I want to work. So, any way to get this thing working? This is Visual Studios 2013, I've tried the profile changing feature in attempt to fix it but it still shows up as grayed out and I can't use it. I have made no other changes since installing it.
Also to start my code I did file> new> file> C++ file
Thanks for any help.
Visual Studio relies on projects, so you need for your source file to be part of a project - this would also hold all the configuration for compilation and linker settings, analogous to a *nix style Makefile.
To create a new project, Do File > New > Project... And choose a suitable template from under the Visual C++ section. Typically, if you're just starting out, and only want to work with the console, then you'll probably want to choose "Win32 Console Application" as the project type.
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.
When working with Classic ASP, Sublime is AWESOME, but what has been stopping me so far is the fact that at work we use Visual Studio Team Services (previously Team Foundation Service) to Check-out / Check-in files we edit and work on and that goes rather well with Visual Studio 2012 that we use. But VS is so slow compared to Sublime especially when all I care about is editing text.
Today I found out that Sublime Text (I use Version 3) has a plugin for TFS! So I installed it (also installed the TFS Power Tools 2012). But now I'm confused as I can not see any visual clues to my files like I do with Visual Studio 2012, so I don't know what files are up to date, and what files need checking in ... etc.
After reading the official page of the Sublime TFS plugin. I understand that I need to set tf_path somewhere! The page though doesn't say where and in what format :( I am lost.
Where do I set the tf_path and in what format?
Any help would be great, Thank You.
Navigate to Preferences -> Package Settings -> Sublime TFS and open both Settings - Default and Settings - User (which will be an empty file). Copy the entire contents of the default settings file to the user file, then change any paths to reflect your personal setup. Save the user file (you are not allowed to modify the default file, just close it), restart Sublime for good luck, and you should be all set.
If you want your Sublime Text changes to be seen in Visual Studio Team Explorer, then you can change your Workspace to a local one.
For more information: https://www.visualstudio.com/en-us/docs/tfvc/decide-between-using-local-server-workspace
Like this, you can use Sublime Text for editing and have as much ST windows as you want. And you can do the check-in of files using the Team Explorer. This is how I work. One Visual Studio with one or more Sublime Text windows. Very light-weight, efficient and productive.
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.
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