I am using Visual Studio 2013 Ultimate Update 5
I was using successfully vsDiffMerge.exe as the diff and merge tool both in Sourcetree as well as from command line (using the /t and the /m options)
All of a sudden (only thing I can note is Windows update "KB4015217") the vsDiffMerge stopped working in case of merge (the /m option) and instead it started behaving as if it is an automated merge followed by a diff !!
The command line syntax
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\vsDiffMerge.exe" "$fremote" "$flocal" "$fbase" "$fmerge" /m /t
would generate a strange window such as this
Output of the vsDiffMerge.exe with the /m /t option, same if we use only /m
We have tried all the tricks in the book: devenv /resetuserdata , reset all settings from import/export, reset Window layout, and doing a complete VS Repair
Any suggestion how to go about solving this problem ?
We ended moving to P4Merge to get a working tool for this.
I will close this thread.
Related
I am getting weird behavior of "Developer Command Prompt for VS 2017" command line tool. Normally in previous versions of visual studio this script (VsDevCmd.bat) was not messing current directory from where you run it. Now it seems to change it. One simple workflow would be just to start the shortcut "Developer Command Prompt for VS 2017" and it doesn't honor the "Start in" directory:
By any chance anyone seen this issue? It really bugs me because I used to have a shortcut with it and start CMD in my source directory, use TFS/msbuild commands afterwards.
You can set the VSCMD_START_DIR environment variable to have vsdevcmd.bat change to that directory when it finishes. Otherwise it will check if you have a %USERPROFILE%\source directory and change to that (which is what you see).
You can change the "Target" for the "Developer Command Prompt for VS 2017" to something like the following to have change to a particular directory:
%comspec% /k "set VSCMD_START_DIR=C:\temp && "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsDevCmd.bat""
Note that the path to vsdevcmd.bat needs to be put in an additional set of double quotes.
Alternatively, rename or remove the %USERPROFILE%\source directory (Note that this seems to be some kind of new "standard" directory for sources), that will make vsdevcmd.bat honor the "Start In"-value (i.e. "current directory").
:: Some rocket scientist in Redmond made the VS15 VsDevCmd.bat change the cwd; the pushd/popd fixes that.
pushd %CD%
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsDevCmd.bat"
popd
"C:\Program Files (x86)\CruiseControl.NET\server\ccnet.exe" %*
vsdevcmd_end.bat, REM out the line:
cd /d "%USERPROFILE%\Source"
#REM Set the current directory that users will be set after the script completes
#REM in the following order:
#REM 1. [VSCMD_START_DIR] will be used if specified in the user environment
#REM 2. [USERPROFILE]\source if it exists
#REM 3. current directory
if "%VSCMD_START_DIR%" NEQ "" (
cd /d "%VSCMD_START_DIR%"
) else (
if EXIST "%USERPROFILE%\Source" (
cd /d "%USERPROFILE%\Source"
)
)
If I see your quastion in right way that I'm used to work with EntityFramework Core with the help of CMD or PowerShell. For this you should right-click In the Solution Explorer panel then in the context menu, click Open Folder in File Explorer. In the address bar of the file explorer type cmd or powershell, you will start the command line from the project folder.
As much as this topic has been talked about, I would think that someone else has run into the same issue as me and found a solution.
This XCOPY Script works in another environment using VS 2012 (with macros) and the same environment using the command line.
XCOPY "C:\Web.Forms\bin\Web.Forms.dll" "C:\inetpub\WebSite\bin" /Y /R
XCOPY "C:\Web.Forms\UserControls\*.ascx" "C:\inetpub\WebSite\usercontrols" /Y /R
It keeps throwing an error of 4 and does not copy within VS 2013. If I change it to "COPY" I get an error of 1. For the purpose of testing and to use it in the command line I stripped it of all Macro's. Actually, I used the [macro] generated directory strings from the error message successfully in the command line.
So why doesn't this work in Visual Studio 2013? VS is running as Administrator.
I am using Windows 7 and I want to set up an environment variable and use it in the same command.
Specifically, I want to execute the following 2 commands simultaneously as a single command-:
set MYPATH="C:\Program Files (x86)\Microsoft Visual Studio 11.0"
%MYPATH%\VC\vcvarsall.bat
In other words, I want the Windows version of this.
This is what I've tried so far -:
set MYPATH="C:\Program Files (x86)\Microsoft Visual Studio 11.0" && cmd.exe /C "%MYPATH%\VC\vcvarsall.bat"
But it isn't working.
So, Is there any way of doing this in Windows ?
This can be done by writing -:
cmd.exe /X /V:ON /C "set MYPATH="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\varsall.bat" && !MYPATH!"
Source
I am trying to add a merge tool in VS (Tools -> Options, Select Source Control -> Visual Studio Team Foundation, Click Configure User Tools), so that I can run the diff and merge correctly from the command line. The default tool works great from the VS editor, but not the command line, unless we add these settings.
I have read a lot of good things about the new merge tool provided by VS 2012. The tool is located at:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\vsDiffMerge.exe
But I can't seem to get the command line arguments right.
As per the links provided by Jehan LINK1 and the information LINK2, the command line should be this:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\vsDiffMerge.exe
%1 %2 %3 %4 /m /t
However in the link above I noticed a comment mentioning that for VS2012, the person had to use the below command line to get it working:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\vsDiffMerge.exe
/t /m %1 %2 %3 %3 %3 %4
%1 = original
%2 = modified
%3 = base
%4 = merged
P.S: I dont have VS2012 and have not tested this. So cannot vouch for the answer, please test and let me know if it doesnt work so that it will help other people looking for the answer.
Please check below post which explains about vsDiffMerge.exe commands.
http://roadtoalm.com/2013/10/22/use-visual-studio-as-your-diff-and-merging-tool-for-local-files/
I have next pre build event:
cmd /C mklink /D /J "$(ProjectDir)SomeDir" "$(ProjectDir)"
This is expanded in(copied from MSBuild output):
cmd /C mklink /D /J "C:\Dir-1\Dir-2\other-dirs-here\SomeDir" "C:\Dir-1\Dir-2\other-dirs-here\"
When running the build with this build event the symbolic link is not created, but when I copy exactly the expanded output of Visual Studio in command line the link is created.
Do you know why?
EDIT: I have administrator rights on the computer. Both Visual Studio and Command Prompt have "Administrator" on top
Found the problem - the previous command in the build event was:
$(ANDROID_HOME)/tools/android.bat update project my-project-settings
and for some weird reasons prevented all commands after it to run...