How can I compare .dsql (Azure SQL DW and PDW) files in Visual Studio 2015? - visual-studio

If I invoke the file diff tool in Visual Studio 2015 on a text file with extension .dsql (Azure SQL DW and PDW SQL script) I get the error:
Error occurred during difference operation: Cannot execute the configured tool
Diff works as expected for other text file extensions.
Visual Studio Professional 14.0.25431.01 Update 3 using VSTS source control.

You can compare text files by using the default file-comparison tool integrated with Visual Studio, the Diff window.
However, you can associate a file type with a third-party compare tool using these configuration steps.
Updated:
Alternatively, you can give a try to WinMerge tool for comparing the files, it's easy and open source:
Open Source Control > Visual Studio Team Foundation under the Tools > Options menu in Visual Studio.
Click on Configure User Tools … and the Configure User Tools dialog will become available.
Add the WinMerge details for the Compare Tool. Click on the Add … button on the Configure User Tools dialog and configure as per the screenshot below. The arrow button next to the arguments text box exposes details about the information that Visual Studio can provide the tool being configured.
The configured arguments are:
/e /u /wl /wr /dl %6 /dr %7 %1 %2
WinMerge Command Line Options
/e Enables WinMerge to be closed with a single Esc key press.
/u Prevents WinMerge from adding either the left or right hand side
file path to the Most Recently Used (MRU) list.
/wl Opens left hand side as read-only.
/wr Opens right hand side as read-only.
/dl Description for left hand side title bar.
/dr Description for right hand side title bar.

Related

Can I use WinMerge as my merge/diff tool within Visual Studio?

I need to compare two files in my project, which is written in C#. Can I integrate WinMerge (or any other diff tool) with Visual Studio and use it easily from within?
There is a more detailed answer on paulbouwer.com life and technology
Replace diff/merge tool in Visual Studio Team System with WinMerge article, having also what arguments you need to pass.
I will reproduce it wholly, because I could not explain it better than him:
Replace diff/merge tool in Visual Studio Team System with WinMerge
JANUARY 31, 2010
I have been using Visual Studio Team System 2008 for a while now and am really starting to like the tightly integrated source control and work item functionality. One thing I cannot get used to is the basic diff/merge tool.
Where is the detail ?
The screenshot below demonstrates the basic nature of the diff tool built into Visual Studio Team System. There is no indication of the number of differences between the files being diff’ed or even the actual differences on a particular line …
WinMerge
There is an alternative and it is both open source and free ! From the WinMerge site:
WinMerge is an Open Source differencing and merging tool for Windows. WinMerge can compare both folders and files, presenting differences in a visual text format that is easy to understand and handle.
Download WinMerge and install it.
Configure Visual Studio
Open Source Control > Visual Studio Team Foundation under the Tools > Options menu in Visual Studio.
Click on Configure User Tools … and the Configure User Tools dialog
will become available.
Add the WinMerge details for the Compare Tool. Click on the Add … button on the Configure User Tools dialog and configure as per the screenshot below. The arrow button next to the arguments text box exposes details about the information that Visual Studio can provide the tool being configured.
The configured arguments below are: /e /u /wl /wr /dl %6 /dr %7 %1 %2
Add the WinMerge details for the Merge Tool. Click on the Add … button on the Configure User Tools dialog and configure as per the screenshot below. The arrow button next to the arguments text box exposes details about the information that Visual Studio can provide the tool being configured.
The configured arguments below are: /e /u /wl /dl %6 /dr %7 %1 %2 %4
The Compare and Merge Operations should now be configured to use WinMerge.
WinMerge Command Line Options
WinMerge contains a number of command line options. The following are the ones used in the configuration above.
/e Enables WinMerge to be closed with a single Esc key press.
/u Prevents WinMerge from adding either the left or right hand side
file path to the Most Recently Used (MRU) list.
/wl Opens left hand side as read-only.
/wr Opens right hand side as read-only.
/dl Description for left hand side title bar.
/dr Description for right hand side title bar.
Finally a decent diff !
Now a Compare in Visual Studio is more meaningful, It shows the number of differences, their positions within the compared files and actual differences per line. WinMerge supports custom syntax colouring and diff colouring.
PERSONAL NOTE:
I tested it, and I couldn't make changes go to to my local file, so I followed the Youen's advice on that page of removing the /wr parameter for Compare operation and now it works nice!
I use WinMerge for comparing files and I integrated winmerge with visual studio. for this follow this instruction :
in visual studio select : Tools > Options
from this dialog select : Source Control > Visual Studio Team Foundation Server
here you must select Configure User Tools and then select Add. after that, from opened dialog box enter .* in Extension field and set Operation to Compare and into Command field enter WinMerge executable path and select OK.
that's all ;)

Disable ALL CAPS menu items in Visual Studio 2013

In Visual Studio 2013, Microsoft again presents the menu in UPPERCASE as the default.
Can these be modified to be Sentence Case?
Yes - in the new Visual Studio 2013 (as in VS 2012), MS reinforced their design decision to make ALL CAPS MENU ITEMS the default. The methods for reverting the menu style are almost the same methods used for Visual Studio 2012, which has been discussed before.
Update (after Visual Studio 2013 Update 4)
As of Visual Studio 2013 Update 4 you can go into Tools > Options > Environment
and uncheck Turn off upper case in the menu bar
Before Visual Studio 2013 Update 4:
You need to create a specific registry key if you want "old-style" menus back.
First Variant: Since Package Manager Console is Powershell, select menu options TOOLS / Library Package Manager / Package Manager Console and enter and run
Set-ItemProperty -Path HKCU:\Software\Microsoft\VisualStudio\12.0\General -Name SuppressUppercaseConversion -Type DWord -Value 1
(as a single line).
Second Variant: Open up a Command Prompt (win+r, cmd, enter) and enter and run
REG ADD HKCU\Software\Microsoft\VisualStudio\12.0\General /v SuppressUppercaseConversion /t REG_DWORD /d 1
(as a single line).
Third Variant:
Change registry values by hand, open regedit and navigate to
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\General
then, create (right click):
DWORD value
with the content of
SuppressUppercaseConversion
and set it to
1
Close regedit.exe and you're done.
Fourth Variant: At least one VS Extension (VSCommands for Visual Studio 2013) has been published that enables you (among other things) to switch menu style via config menu from within VS 2013.
You may also set it to all-lower-case items (which is, imho, nice):
switch to Sentence Case (subtly different from what you get with SuppressUppercaseConversion: the SQL menu gets renamed to Sql)
or hide it completely (and have it appear on ALT key press or mouse over)
After years Microsoft has changed their mind on this feature. As of Visual Studio 2013 Update 3 RC, an option has been added in Tools -> Options to change to Mixed Case for Menu titles. Obviously this is not for VS 2012 but going forward this option will be there.
Here is the notification from Brian Harry of Microsoft....
Mixed Case Menus – I know I’m going to get some feedback on this one :) This is a long standing request by a vocal portion of the VS user base since VS 2012 to change the “ALL CAPS” menus. In VS 2013 Update 3, we have added a Tools –> Options setting to control whether you see ALL CAPS or Mixed Case. The default is still ALL CAPS but, if you change it, it will persist across upgrades and will roam across your IDE instances using the VS Online roaming settings feature (if you log into VS so it knows who you are).
http://blogs.msdn.com/b/bharry/archive/2014/07/02/vs-tfs-2013-3-update-3-rc.aspx
I have been using the following reg files to enable/disable the lowercasing in Visual Studio 2013:
http://erwinmayer.com/dl/VS2013_ALLCAPS_Toggle.zip
Just double click on VS2013_ALLCAPS_Disable.reg inside the archive to disable all caps menu titles, and VS2013_ALLCAPS_Enable.reg to re-enable them.
You can easily edit the reg files before with a text editor to see what they contain.
If you're using the "Visual Studio Express 2013 for Windows Desktop" version the registry key should be added in:
HKEY_CURRENT_USER\Software\Microsoft\WDExpress\12.0\General
So simple! You can go to Tools -> Options -> Environment -> General tab and check the Turn off uppercase checkbox from the right side and click ok. Visual studio 2013 will automatically turn off uppercasing of the menubar.
VS 2013:
Tools→Extensions and Updates→Online,
Type "VSCommands" in search textbox,
Click Download
Tools→Options→VSCommands→General,
Click Open-Configuration button
IDEEnhancements→Main Menu→Change Main Menu Letter Case,
click Sentence-Case

VS2010 uses WinMerge but TFS2010's Pending Changes tab uses DiffMerge

from VS2010, if I select compare from the context menu, WinMerge is used, but when doing a merge with TFS2010 tools in VS (Pending Changes tab), it insists on using the defautl diffmerge tool that sucks.
Where do I configure TFS to use my own diff/merge tool?
http://blog.paulbouwer.com/2010/01/31/replace-diffmerge-tool-in-visual-studio-team-system-with-winmerge/
Configure Visual Studio
Open Source Control > Visual Studio Team Foundation under the Tools > Options menu in Visual Studio.
Click on Configure User Tools … and the Configure User Tools dialog will become available.
Do not forget to restart Visual studio to load configuration.
Download the reg file, import into regedit.exe and you're done! Or if you want to do it manually in Visual Studio do the following:
Click on Tools menu
Click on Options menu item
Expand Source Control tree item
Select Visual Studio Team Foundation Server tree item
Click on Configure User Tools... button
Comparing
To use WinMerge as the Compare/Diff tool:
Click the Add... button
For Extension, type *
For Operation, select Compare
For Command, browse for C:\Program Files\WinMerge\WinMerge.exe
For Arguments, type /x /e /ub /wl /dl %6 /dr %7 %1 %2
Click OK to accept
Merging
To use WinMerge as the Merge tool:
Click the Add... button
For Extension, type *
For Operation, select Merge
For Command, browse for C:\Program Files\WinMerge\WinMerge.exe
For Arguments, type /x /e /ub /wl /dl %6 /dr %7 %1 %2 %4
Click OK to accept
Note: You need to click on the Save button on the tool bar within WinMerge merge to commit a merge before exiting the screen

Is there a Visual Studio option or add-on to add an "Open Explorer Here" when I right click on a project in the solution folder?

When I right click on a project in the solution explorer I'd like to be able to select an option that would open a new windows "Explorer" that lists the contents of the build directory. I'd settle for the project directory... but getting me into /bin/x86/Debug vs /bin/x86/Release based on the active build configuration would be major bonus.
I find myself manually navigating to that folder fairly often for various reasons - usually on Utility applications which don't have installers / cmd line build scripts etc
I currently use 2005 express. But, am open to upgrading.
A couple things that might be close enough:
add an "external tool" to the Tools menu. In the "Tools | External Tools..." dialog:
Click "Add" and give the new tool whatever name you want
Command: %systemroot%\system32\cmd.exe
Argument: /k "c:\Program Files (x86)\Microsoft Visual Studio 8\VC\vcvarsall.bat" x86
Initial directory: $(TargetDir) // (or whatever appropriate macro)
Right click on a open document's tab and select "Open containing folder"
My VS 2005 Standard IDE already had a "Visual Studio 2005 Command Prompt" tool, but it landed the command window in the VC installation directory. Changing the "Argument" and "Initial directory" fields as above made it land in the project's target directory.
The drawbacks are they don't show up in the right menu for the project and they might not land you exactly where you want, but they should land you pretty close.
No sure this is what you want but the "Open file" icon will pop up a FileOpen dialog in the project folder. From there you can right click the Release or Debug folders to open them in an Explorer (and Cancel the dialog).

Is it possible to use WinMerge inside Visual Studio 2008 and Visual Source Safe 6.0?

I would like to use WinMerge as the default diff tool inside VS2008 from the solutions explorer in place of the "Compare..." context menu item. Is this possible? I'm looking for a quick replacement of the current bland diff tool an I just like WinMerge better. I'm not interested in going to the folder explorer and doing the comparison there.
I'm using Visual Source Safe 6.0 not TFS
Yep, it's possible!
See this link: http://whyiamright.wordpress.com/2008/01/18/changing-the-diffmerge-program-used-by-visual-studio/
Tools-> Options. In the tree, choose Source Control, then the plugin of your choice (VS team Foundation, Source Safe, etc).
Click the "Configure User Tools" button, click add, then specify the appropriate extension, operation, EXE, and arguments list.
This site: has the settings for many, including winmerge: http://blogs.msdn.com/jmanning/articles/535573.aspx
EDIT:
You mentioned VSS: Check out the Winmerge manual here: http://winmerge.org/docs/manual/VersionControl.html. It says how to do it about 1/5th the way down the page.
I think I have this working at a serviceable level if not optimal.
in visual studio go to tools > options > source control > plug-in settings
click the "advanced" button
in the sourcesafe options dialog, switch to the "custom editors" tab
for operation, select file difference
for file extension enter .*
for command line enter
"C:\Program Files\WinMerge\WinMergeU.exe" /x /e /ub /wl /dl %6 /dr %7 %1 %2
click the "add" button then the "ok" button.
using "compare" from a file's context menu or viewing history and selecting "diff" should bring up winmerge with the file comparison. the original is on the left and the modified file is on the right (is that the right placement? should they be swapped?). if you selected a highlighted difference, you can actually sync that area at this time as well. visual studio will just recognize the file has changed and ask you to reload. I haven't gotten to the situation where I'm in an actual "merge" situation so I'm not sure what happens there. I'll update this post if I ever have more info to add.
I'm using VS2008, sourcesafe 2005, and winmerge 2.12.4 installed to the default directory. I copied the settings from this post: http://weblogs.asp.net/garrypilkington/archive/2009/12/16/winmerge-as-a-comparison-tool-in-visual-studio-2008.aspx
I have been wondering about this as well and have not found anything to make it possible in VSS 6.0.
For now, it looks like the answer to our question is "No".
As I stated previously, I don't think we can integrate WinMerge with Visual Studio 2008 and VSS 6.0.
However, I did find that VSS 2005 is backward compatible with VSS 6.0 databases. So, if your server can't change from VSS 6.0, at least perhaps you can change your client to VSS 2005, and then follow the other instructions from the answers here.

Resources