"Save Copy of Package as..." option missing - visual-studio-2005

In Visual Studio 2005 Professional, under Menu Bar "File", I do not have the option "Save Copy of Package AS..." which allows saving the package on the server. How do I get this option to display and be useful?

Do you mean "Save Project as..."?
If so, yeah it's kind of a pain moving a VS project. I usually just copy the directry tree using normal file copy commands, and fix up whatever problems crop up as a result manually. Usually it's not bad - most of the project information deals with relative file locations pretty well.
Kinook Software has a utility that's supposed to help with this. Try it if you think it has value:
http://www.kinook.com/CopyWiz/

You could activate it by customizing your menu. See http://asqlb.blogspot.com/2010/12/save-copy-as-is-not-option-visual.html
If grayed out, drag the selected option to the file menu and drop it under "save as".

Related

TFS2010: Fast way to determine user, who edited "this function" or "this line of code"?

we use TFS controlled source. Are there a fast way to determine the history of a function I'm currently in - like anwsering "who edited this function?" or "who edited this line of code?".
I know, that I can open source control for the current file and browse the history to find a changeset, where the lines of code / the function I'm interested in were edited.
But I'm looking for an easier way ... may be any addons for Visual Studio 2010?
Thanks, Konrad
You can use the annotate option.
This is available from most of the Source Control options in TFS. I normally invoke it from the Source Code context menu of the Code Editor windows, but it's also in:
Source Control Explorer context menu for Files.
"Source Control - Team Foundation Server" toobar.
"File" -> "Source Control" menu.
The Annotation will show which changeset is responsible for each line/block of code. You can see which user checked in a changeset. Sometimes you have to filter the changeset range if the file has been merged by an innocent person.
Annotated File
As DaveShaw says. Right-click on the line you're interested in, select the last option 'Source Control' and choose 'Annotate'.
This will give you a list of who made edits and when in the file, down the left-hand side of the code-editor pane.

No option to open the Build process Workflow Designer

I have a build process in TFS and I'm using Visual Studio 2010. I can view the build process in the default xml editor, but I want to open it in the Workflow Designer.
Mostly there will be an option to open the build process in the Workflow Designer or you can press Shift-F7 and it'll open it when viewing the xaml.
For some reason that has disappeared, any ideas why?
Is there any way to force VS2010 to open a xaml (or xoml) file in the Workflow Designer and / or are there any good Windows Workflow editors out there like Kaxaml for WPF / Silverlight?
I have the same condition.
I have set my default editor for .xaml to the XML editor. This speeds up the load time of the file because it does not have to load the designer, but prevents me from seeing the workflow view of a build process. There is no option in TFS to allow you to view the build in a different editor, there is only a 'View' option.
So here is my workaround:
Find a .xaml form in your solution (not a build process .xaml)
Right click the file and choose 'Open with...'
Choose 'Workflow Designer' and click 'Set as Default'
Click 'Cancel' because clicking OK will try and open the file, fail, and set the setting back.
Now go open your build process .xaml. If it was already opened, nothing will change, so close the tab and try again.
Don't forget to default your setting back.
It's not a great solution, but it works for what I'm doing.
Did you try right clicking the template file and using "Open With" and selecting Workflow Designer?

Easier way to copy the path to a file or directory to the clipboard in visual studio?

To accomplish this I've been right-clicking the file or directory and then selecting Show in Windows Explorer, and then copying the path out of the address bar.
Is there an add-on or macro that can make this task easier?
I'm aware that you can drag a file from Solution Explorer into the editor and it will write out the path, but when doing web development I don't always want the server path, sometimes I want the local path.
Look at PowerCommands extension
http://visualstudiogallery.msdn.microsoft.com/e5f41ad9-4edc-4912-bca3-91147db95b99?SRC=Home
Among others, it contains "Copy Path" command for files and folders
UPD: Also, another option: right-click the tab of open document and there will be "Copy Full Path" command. It's built-in, no extensions needed
You can just select the file in the 'Solution Explorer' file list and hit CTRL+C. It automatically copies the file path to your clipboard.
I've found one more option of how to solve it without plugins (for VS 2015 and above; not certain about previous versions)
Go to "Tools" -> "Customize..." -> "Commands" tab.
Choose "Context menu:" and "Project and Solution Context Menus | Item" and you can add any existing Command.
In order to copy path, choose Category "File" and "Copy Full Path" command. Will add button only for files in Solution Explorer.
This works for projects as well but you should choose "Project and Solution Context Menus | Project" (copy path of .vcxproj file).
It doesn't work for solutions and I don't understand actually why.
Tools > Options > Environment > Keyboard
You can set your own shortcut keys for anything. The two that are most relevant to this post are "File.CopyFullPath" and "File.CopyRelativePath".
I created my shortcut to just be used in "Text Editor" and it has worked great.
This was asked for VS2010 and I'm using VS2019, so it is an old question, but still relevant. I knew about the file header right click menu, but for some reason I didn't think about the shortcut keys until I read this question. Posting in case this results in a quicker fix for anyone else.
The CTRL+C doesn't work for me on MSVS 2017.
Use the copy as path extension here.
Then right click on file in solution explorer -> Copy as path (or assign a shortcut).
I find that it works very well.

Visual Studio 2005: Please stop opening my CS files in "Design Mode"!

I think it's associating my Web Service's CS files with the related ASMX files. But whatever's happening, I can't double-click to open the CS files - I have to "view Code" or it opens in the designer.
Anyone know how to turn off this automatic behavior? I just want to edit the code!
Try right-clicking, select "Open with...", mark "CSharp Editor" and select "Set as Default".
That works for avoiding the WinForms Designer.
I found this question when trying to deal with a similar problem. I had a C# class in a file and whenever I double clicked on the file it would try to open in design mode but design mode was meaningless for this class. I just want to see the code.
I found that adding the [System.ComponentModel.DesignerCategory("")] attribute to my class fixed this.
In the Solution Explorer view, click the "Show All Files" icon. This will put "+" symbol next to each of your files. Click the + and it will expand to show the .CS file which holds the ASMX's code. At this point, double click that file instead.
For some reason VS2005 seems to have this a bit backwards when it comes to webservices. To open a webservice in code view, double-click the .asmx file, not the .asmx.cs file.
I guess it makes a bit of sense, as there's nothing to "design" when it comes to a webservice, but it's counterintuitive if you've been working with .aspx files.
In my experience, if you find that the wrote editor, that is the non-default editor, is opening when double-clicking on a file within the Solution Explorer then something is wrong with the underlying project's User Options file (.user) or the solution's User Options file (.suo). (I am not sure which, but I suspect the settings are stored in the .suo file.) Deleting the the .suo and all project .user files solved the problem.
I personally, set the Form Editor as my default editor for forms at the beginning of a project. After the forms are stable and require less user-interface design changes, I switch the default editor.

How do I edit work items in the Visual Studio 2008 xml editor?

I'm trying to customize some TFS work items via the VS2008 xml editor, but every time I open a work item xml file it jumps to the graphical designer. All that gives me is a "View XML" button that doesn't let you edit the xml directly.
I don't have TFS but I know in regular VS there is an Open With... option in most items' contextual menu that even let you change the default editor. Very useful when you are tired of the Designer opening instead of the Code file on Windows forms.
Ah, looks like you have to go to File->Open and click the down arrow next to the Open button to "Open With" the xml editor. If someone wants to copy and paste this, free accepted answer :P
As per Coincoin's answer, this feature is also great for setting the default editor for ASPX. If you want to go to the Code Editor most often, then this is a default you'd want to change.
Reading this - I think perhaps you don't realize - that there is no need to edit the XML - in fact it is very difficult to do so. The graphical designer will actually let you change the Work Item type, adding new fields, changing workflow, rules etc.
The only reason to change the XML is if there's a bug in the Process Editor (the tool that gives the graphic designer). I have done extensive modifications of Work Item types and only had one instance where I had to change the XML.

Resources