Visual Studio 2012 doesn't have allow the 'compare' command when merging changes from one branch to another.

Here is the uservoice request to add the feature to VS 2012.  If you know me please vote for it.  :)
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2947191-always-allow-compare-in-pending-changes-for-br


It does allow it when VS is configured to use an external compare tool.  My favorite is SourceGear DiffMerge (free).

Merge
/m /r=%4 /t1=%7 /t2=%8 /t3=%6 /c=%9 %2 %3 %1

Compare
/t1=%6 /t2=%7 %1 %2

Best feature: this tool also makes is brain-dead simple to move chunks of code (if you change your mind about checking in that web.config change at the last minute).  I'm really surprised VS didn't copy this feature from all the OSS merge tools.  They did all the work to have VS keyboard shortcuts and syntax highlighting, but didn't add 'move this block from 'Server' version to 'Local'.  This is now (finally) possible, but involves copy/paste and disrupts flow when reviewing large merges and large check-ins.



1

View comments


  1. 'Better together' VS + Windows is over

    • VS can't run 64-bit web apps, and can't open IIS projects when not elevated.
    • File links can't run an app elevated, and an EXE can't be marked to always run elevated ... so My_IIS_App.sln is always broken.
    • With VS elevated you have to turn UAC off to drag-drop files from OS folders to VS IDE b/c Win8 explorer.exe cannot run elevated.
    • "This app can't be activated when UAC is disabled." when clicking .PDF on #Win8 w/ UAC off. I switched PDF to open in Chrome.
    • No VS IDE support for new powerfull OS shell script, Powershell 3.0.  Powershell_ISE doesn't understand VS TFS.
    Is seems very apparent to me that MS refused to accept that desktop Windows is now a 'truck OS', so the OOB dev experience is crap.
    0

    Add a comment

  2. In Windows 8 the 'default browser' is more complicated. I like IE10 in Metro mode (Chrome just doesn't seem to fit here). But all other times I like chrome.

    At the end of the day while watching Comedy Central (via a Win8 app) or NBC News (via a Win8 app) I find myself browsing in Metro IE with way too many keystrokes to get the same page in Chrome, which has my password manager extension, Google auto-signin, mobile tab sync to iOS Chrome, etc..

    So I wrote a bridge. GIST - bookmarklet to open current IE page in Chrome using protocol handler, chrome2:// It comes in two parts: a bookmarklet, and a registry hack (.REG file) to launch Chrome. It uses powershell to remove the extra chrome2:// protocol, leaving just http:// or https://. I'm using chrome2:// as the (fake) protocol to launch chrome. The first time you use the bookmarklet you'll be asked if the page can open "chrome2://" links in a local application, but you can disable further notifications.

    WARNING: This can probably be easily hacked - it opens URLS from a powershell command line. I did my best to limit abuse, but this code is by no means guaranteed. All I can say is that I've been using it for two weeks and haven't been hacked yet.

    GIST - IE bookmarklet to open currnent page in Chrome
    0

    Add a comment

  3. Lately I post most of my tech thoughts to Google Plus.
    0

    Add a comment

  4. I'm running Windows 8 on a laptop and Windows Server on my desktop/workstation.  I'm using Input Director to share Mouse & Keyboard with desktop and laptop.

    Why Server?  I use Hyper-V, so same HW can run multiple DEV servers through MSDN license.

    OK, background info done.  This post is about Input Director.  I wasted an hour trying to figure out why Input Director wasn't working.  Windows Firewall was blocking it on the Server side.

    I found this powershell commands for Windows 8 and Server 2012 that you can use to check (and disable) firewall:

    Get-NetFirewallProfile | ft Name,Enabled -Auto


    Remember to run Powershell elevated (as Admin) if you want to use it to change any OS settings.

    This might have gotten reset when I renamed the server.  I removed it from the domain and re-added it with a different name, which might have removed the 'Domain' profile from firewall.  When it rejoined the domain the firewall profile for 'Domain' defaulted to 'Enabled: True'.  ... Maybe.
    0

    Add a comment

  5. We're looking at a custom server build for work. I did some research last night and wanted to record some finding regarding RAID.

    • Windows SW RAID has come a long way since the Windows 2000 days (when I last tried it).
    • Stripped (RAID0) SSDs are easy, but to get performance benefit from Mirrored (RAID1/10/6) requires a 'good' RAID controller.
    • LSI seems to dominate the performance-conscious market with their MegaRaid controllers.  servethehome.com has some good info on controllers (I think the 2208 is best-of-breed with dual-core controller chip).
    • The Adaptec 'Hybrid' to always read from SSD, but pair writes (writes to both the SSD and conventional HDD) sounds really good.  Adaptec 6405 should handle 2 SSDs and isn't expensive (under $400).   But can't find a good review of it.
    For now I think I'm going to recommend conventional disks for the server.  The consumer SSDs are getting cheaper but the server-grade (um, enterprise) SSDs are still very expensive.  It looks like there aren't good options for pairing consumer (fail at any moment) SSDs with conventional HW Raid, unless Windows 2012 Server Storage Spaces fill the gap.  Not sure if we can wait for RTM and system builder distribution of Windows Server 2012.
    0

    Add a comment

  6. My Google Apps...

    0

    Add a comment

  7. I just ran a little experiment and ran an HTA app under debugger (by adding //X as the arguments to MSHTA.exe). In the app version string it reports Trident 6.0 (a.k.a. IE 10) as the rendering engine. This is interesting, because I think they could have chosen to run HTA apps in compatibility mode with IE 8 (which shipped with the last OS) but they continued to move MSHTA to use the latest IE engine, like they alway have. This means local HTA apps have CSS3 and other HTML5 enhancements.

    I'd like to see if MSHTA.exe ships on Windows RT (WOA / Windows on ARM). If it does this might help fill the gap between native desktop apps for power users that can't run as metro apps, like tabbed file explorer (i.e. Directory Opus / Cubic Explorer). Instead of native code Windows RT might run 'script apps' like PowerShell and HTA.

    1. I used an ancient train simulator utility as my sample (after you click the initial error it shows the current folder and a file list, and it is blazing fast).
    2. Create a .cmd script that contains 'mshta.exe sra.htm //X' and it will launch the app and immediately prompt to attach a javascript debugger. (Thanks for this tip.)

    The next step is to try to combine this with modern Metro-ish CSS template (thanks code 52).

    I'd like to see if a few js libraries work in a Windows 8 HTA. Rx.js, jQuery (or alternate DOM selection and ajax wrapper), and a modern js templating library like JSRender.

    0

    Add a comment

  8. I'm not sure how to approach the following technology migrations my team needs to tackle, especially planning, story weights, and customer benefit language.

    SQL 2008 R2 -> SQL 2012
    Geometry/Geography improvements
    VS 2010 -> VS 2012
    IDE Performance, integrated SL tools, improved HTML/js tools
    production .NET 4.0 -> .NET 4.5
    Hoping to see better startup performance, and use new APIs.

    The following are also changes I think are needed but which I haven't sold the team on yet.

    MSTest -> xUnit
    It seems MSTest integration (like test lists) are being retired by Microsft in favor of OSS tools. A big plus (use best of breed OSS where possible) but painful in short run, as we have everything in MSTest and test lists.
    SSIS -> SQLCMD or .NET Console (FileHelper OSS DLL)
    Migrate data import/export away from SSIS (for files under 100MB).

    Update 7/5/2012 5:10 PM

    Eliminate GUID PKs
    Eliminate GUID primary keys (uniqueidentifier) on all tables
    0

    Add a comment

  9. I have VS 2012 running on my main 2 solutions and things are running smoothly. I recently hit a significant problem.

    Platform / Tools info:
    1. I'm running Windows 8 Pro x64 Release Preview (as a VM, in Hyper-V)
    2. I'm running Visual Studio 2012 RC

    I also have Visual Studio 2010 SP1 installed, and I do swap back to that IDE 10% or less(for SQL Management Studio and SSIS tooling support) and we plan to have both IDEs installed for all top devs in the company for some time (until SQL tools and SSIS are moved completely to VS 12).

    Here's my problem: Publish to file system seems to be broken. I have a simple web services project (ASP.NET project hosted in IIS) that we've always used 'publish to file system' in VS 2010 to deploy. We're using config transformations, so the publish button makes managing and copying the transformations easy.

    I just tried it in VS 2012, and it says it deployed successfully, but nothing. It deleted all the files from the (remote) service folder, but it didn't deploy anything.

    I have a question: besides opening a web browser after the deployment, what does the new 'URL' setting on the publish profile do? Just used to open a browser, or does it 'do' anything else?
    1

    View comments

  10. Visual Studio 2012 doesn't have allow the 'compare' command when merging changes from one branch to another.

    Here is the uservoice request to add the feature to VS 2012.  If you know me please vote for it.  :)
    http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2947191-always-allow-compare-in-pending-changes-for-br


    It does allow it when VS is configured to use an external compare tool.  My favorite is SourceGear DiffMerge (free).

    Merge
    /m /r=%4 /t1=%7 /t2=%8 /t3=%6 /c=%9 %2 %3 %1

    Compare
    /t1=%6 /t2=%7 %1 %2

    Best feature: this tool also makes is brain-dead simple to move chunks of code (if you change your mind about checking in that web.config change at the last minute).  I'm really surprised VS didn't copy this feature from all the OSS merge tools.  They did all the work to have VS keyboard shortcuts and syntax highlighting, but didn't add 'move this block from 'Server' version to 'Local'.  This is now (finally) possible, but involves copy/paste and disrupts flow when reviewing large merges and large check-ins.



    1

    View comments

    1. SourceGear DiffMerge has an updated UI and updated web help. See http://www.sourcegear.com/diffmerge/webhelp/sec__microsoft__tfs.html

      ReplyDelete

  11. The Chromium 14 release will come with an inverse flag: --allow-running-insecure-content, as a convenience for users and admins who have internal applications without immediate fixes for these errors.
    0

    Add a comment

  12. I wanted the angle of the first side of a polygon in SQL Server 2008+.  Our code for entering the shapes evolved over time, specifically which direction drew the shapes.

    For example: starting with the NW point drawing clockwise (the anglican way) or drawing counter-clockwise (the way SQL draws Geography).

    I have to convert to geography on the fly because the geometry in the DB is combined with other shapes, hence the 2-level CTE.


    WITH PolygonGeo (Id, Polygon)
    AS (
    SELECT
     [MyIDColumn] AS [id]
     ,geometry::STGeomFromText(GeometryText, 4326) as [Polygon]
    FROM [MyDatabase].[dbo].[MyTable]
    WHERE GeometryText LIKE 'POLYGON%'
    ),
    Points ([Id], Pt0, Pt1)
    AS (
    SELECT Id
    , [Polygon].STPointN(1) AS Pt0
    , [Polygon].STPointN(2) AS Pt1
    FROM PolygonGeo
    )
    SELECT [Id]
    , ATN2(Pt1.STX - Pt0.STX, Pt1.STY - Pt0.STY) / PI() * 180  AS Angle
    FROM Points

    Results:

    Id_8Angle
    33BAA7F180
    167AAEA176.395579460831
    F6469B3180
    33BAA7F180
    167AAEA177.137594773874
    0D34759154.490530508003
    33BAA7F165.499833233449
    CB398C0180
    CB398C0143.383248480932
    F6469B3179.283840054506
    33BAA7F-175.114797431858




    0

    Add a comment

  13. This is my second attempt at writing up my DOS tricks. I changed jobs, just like the original post said, but found the original tricks were woefully inadequate in real world use. Consider this as my first attempt at 'pro' tricks. I'll start with the basics from the command-line.
     
    C:\Users\YzOrg>echo %date:~10,4% %date:~4,2%
    2010 11

    C:\Users\YzOrg>echo hi >  %date:~10,4%%date:~4,2%.txt

    C:\Users\YzOrg>dir *.txt
    Volume in drive C has no label.
    Volume Serial Number is B8EE-D08D

    Directory of C:\Users\YzOrg

    11/24/2010  09:32 AM                 5 201011.txt
    10/01/2010  10:40 AM               210 SDK.txt
                   2 File(s)            215 bytes
                   0 Dir(s)  199,100,514,304 bytes free

    C:\Users\YzOrg>set line=0123456789 ABCD 0123456789 ABCD0123456789 ABCD0123456789 ABCD0123456789

    C:\Users\YzOrg>echo %line:~10,8%
    ABCD 01

    C:\Users\YzOrg>echo hi > demo%date:~10,4%%date:~4,2%%date:~7,2%.log & dir demo*.log
    Volume in drive C has no label.
    Volume Serial Number is B8EE-D08D

    Directory of C:\Users\YzOrg

    11/24/2010  09:50 AM                 6 demo20101124.log
                   1 File(s)              6 bytes
                   0 Dir(s)  199,100,379,136 bytes free

    C:\Users\YzOrg>set /?
    Displays, sets, or removes cmd.exe environment variables.

    SET [variable=[string]]

    ...<SNIP>

    Pitfalls with using %DATE% and %TIME% in filenames

    Time and date from OS can have spaces.  So put the log filename in its own variable and use
        SET MYVAR=%MYVAR: =0%
    

    to replace any spaces from %DATE% and %TIME% to 0.

    I recommend you follow this guidance, put StdErr redirection at the end of the line.

    Here is the final snippet for use in scripts:

    Code
    set LOG_TIMESTAMP=%date:~10,4%%date:~4,2%%date:~7,2%-%time:~0,2%%time:~3,2%.JobName.log
    set LOG_TIMESTAMP=%LOG_TIMESTAMP: =0%
    echo starting at %date% %time% with log %CD%\log\%LOG_TIMESTAMP%
    

    Output
    starting at Tue 02/13/2011  8:26:57.99 with log C:\Users\YzOrg\log\20110213-0826.JobName.log
    

    Other CMD Tricks

    Use %~dp0 to get the full path of the current batch file.  %0 is the scriptname argument, '~dp' are modifiers to get the drive and path of that argument, %~dp0.

    Rule: always turn off 'echo' in batch files using this first line:
    @if not defined _echo echo off
    

    Use 'set _echo=1' before calling the script to debug it (it will echo every command) References: set /?, call /?, for /?, setlocal /?
    0

    Add a comment

  14. The post I wrote for GreenShot used a configuration file to tell the app to use the CLR and .NET FX that is already installed on Windows 8.  The same hack works for the Metro UI Tweaker tool from The Windows Club (which I found via winsupersite.com).

    So grab the configuration file I used for GreenShot but this time name it "Metro UI Tweaker.exe.config".
    0

    Add a comment

  15. How to run Greenshot on .NET 4.5 (Windows 8).  Greenshot is an OSS alternative for SnagIt (screenshot tool).
    Don't install the Greenshot installer. It will refuse to install without .NET 2.0, even though it seems to run fine on .NET 4.5.

    1) download the zip file and extract it to C:\Program Files\Greenshot. 
    Note: On Win8 you'll need to be running a process with Admin privileges to create the directory and extract the files.
    2) create Greenshot.exe.config to tell .NET to run Greenshot on .NET 4 with a couple of compatibility options.  https://gist.github.com/1223509
    0

    Add a comment

  16. I'm thinking about how to take some of the middle-tier parallel concepts like #RxNet and apply them in a little OSS GUI app I've been thinking about.  I quickly found this gem, ReactiveUI PDF .  A couple of quotes that stoked my interest:
    "What’s in this library
    ReactiveCommand - an implementation of ICommand that is also a Subject whose OnNext is raised when Execute is executed. Its CanExecute can also be defined by an IObservable which means the UI will instantly update instead of implementations which rely on RequerySuggested."
     ...
    "Some philosophy
    A lot of examples of the Reactive Extensions make its domain appear really constrained, like the only thing it’s ever useful for is either handing web service requests and implementing drag-and-drop. However, here’s the key thing to realize - a property change notification is an event.Once you realize that Reactive Programming applies to any time an object changes state, Rx suddenly becomes  far more applicable to any programming domain - really, Rx is a library to model state machines that are context-free with respect to threading."
    And, I can use all the high-level composition that I've been using in the middle tier.  Like Merge() to join streams of events, and Throttle() to do in one line that takes a half-page of code with other frameworks.  This looks promising.  One glitch.  The author of the library recently moved from Microsoft (Office team) to GitHub.  Uh-Oh.  But too promising to ignore it.  At least I hope he still works in C#, maybe he can help with the Windows OSS clients, like Git Extensions, which is written in C# (but not hosted on github).


    nRoute is another MVVM framework that leans on Rx for event streams.  It's author is French.  Hmm.


    It's good to have choices, unlike 18 months ago.

    0

    Add a comment

  17. I was thinking about how to rewrite an old (2009) WCF middle-tier service, and have been thinking about George Tsiokos's recent TPL vs. RxNet post.
    I think a middle-tier service is perfect to illustrate how I see the strengths and weaknesses of these two.  Specifically the scenario:

    Complex Middle-Tier:  Startup vs. Message Handling

    TPL might be great for startup tasks.  There is one 'global' task, Initialize, that has many sequences and chunks (in TPL these could be child tasks) that can have different degrees of parallelization.  It also requires global 'command and control' and 'top-down' composition and error handling (a type of event correlation).  If any critical part of startup fails then tear-down the service (cancel outstanding parallel tasks) and exit the service quickly.  So global handling and command-control programming style (root of the call hierarchy has all control).

    Once everything is initialized you want bottom-up event correlation and error handling.  The function at the top of the callstack has no control (usually a WCF operation or I/O completion callback).  You only want global state to be touched when absolutely necessary, not touched by ignorable infrastructure errors, and not by errors that are ignorable according to business rules.

    Startup, large complex top-down composable work:
    TPL

    Streams, composable business logic (streams that include error/end):
    RxNet

    With .NET 5 the TPL dataflow libraries might change things again, but for now I much prefer RxNet for composing and routing 'messages' between layers.  We recently used it in a project and when you have to correctly handle error scenarios it shines.  Imagine a WCF callback for a business operation that is completely async, where business logic has to fire if the notification fails (delivery of the data to the client).  The code isn't pretty in either case, but is better and can be handled at the right level of the lego blocks with RxNet.
    0

    Add a comment

  18. I’ve written this trick every new job or position I miss out on the old standby, using batch script to capture command-line output to a dated log file.  This post is so I’ll never have to reproduce it again.

    C:\Users\YzOrg>echo %date:~10,4% %date:~4,2%
    2010 11
     
    C:\Users\YzOrg>echo hi >  %date:~10,4%%date:~4,2%.txt
     
    C:\Users\YzOrg>dir *.txt
    Volume in drive C has no label.
    Volume Serial Number is B8EE-D08D
     
    Directory of C:\Users\YzOrg
     
    11/24/2010  09:32 AM                 5 201011.txt
    10/01/2010  10:40 AM               210 SDK.txt
                   2 File(s)            215 bytes
                   0 Dir(s)  199,100,514,304 bytes free
     
    C:\Users\YzOrg>set line=0123456789 ABCD 0123456789 ABCD0123456789 ABCD0123456789 ABCD0123456789
     
    C:\Users\YzOrg>echo %line:~10,8%
    ABCD 01
     
    C:\Users\YzOrg>echo hi > demo%date:~10,4%%date:~4,2%%date:~7,2%.log & dir demo*.log
    Volume in drive C has no label.
    Volume Serial Number is B8EE-D08D
     
    Directory of C:\Users\YzOrg
     
    11/24/2010  09:50 AM                 6 demo20101124.log
                   1 File(s)              6 bytes
                   0 Dir(s)  199,100,379,136 bytes free
     
    C:\Users\YzOrg>set /?
    Displays, sets, or removes cmd.exe environment variables.
     
    SET [variable=[string]]
    ...<SNIP>
     
    Use %~dp0 to get the full path of the current batch file.  %0 is the scriptname argument, '~dp' are modifiers to get the drive and path of that argument, %~dp0. 
     
    Interesting FOR commands in cmd.exe :
    FOR /F ["options"] %variable IN (file-set) DO command [command-parameters]
    FOR /F ["options"] %variable IN ("string") DO command [command-parameters]
    FOR /F ["options"] %variable IN ('command') DO command [command-parameters]
     
    Rule: always turn off 'echo' in batch files using this first line:
    @if not defined _echo echo off
    Use 'set _echo=1' before calling the script to debug it (it will echo every command)
     
    References: set /?, call /?, for /?, setlocal /?

    2

    View comments

  19. iPod

    I recently bought a 4th gen iPod and man do I love it. Don't have to pay a data plan, and with a few bucks for good software can really make use of the GB of
    flash storage and the fat bandwidth over WiFi. Exactly what my old Windows Mobile 6.X phone sucked at. Great battery, great podcast playback (2x play, remembers where I left off, etc.).
    The only thing I was missing was Podcast subscription (on device, no iTunes on Windows please) and automatic WiFi sync for podcasts. There's an app ...

    iOS Apps

    DownCast: $0.99 app to sync podcasts over WiFi. My Features: Multitasking (background play), subscribe to podcasts, sync to iPod via WiFi, 2x speed, good jump buttons (back 30, back 15, forward 30, forward 2:00). Bonus features: can sort a playlist by podcast name instead of date, so can see the three 'good'
    weekly podcasts first (instead of listening to the daily podcasts first, which tend to be filler.  I also found out too late that it can import an OPML from a URL (I was adding them one at a time, good time saver.)

    Microsoft OneNote: free. My Features: (sync to Live/SkyDrive/OfficeLive, whatever they're calling it today). Love that it syncs my notes to all my devices + web.
    So I can start gathering notes and thoughts for a blog post on the laptop, research it on the desktop, and pull it up on my pocket device (iPod in my case) to solicit feedback from a co-worker.
    Leave it to Apple to help make OneNote useful enough to finally start using it instead of email.

    StackOverflow + Google

    The work Google is doing to reduce spammers and content farms seems to be working - SO rank has recently improved dramatically in my recent programming searches.

    For similar technology searches a few weeks ago I was getting spam/content farms of stackoverflow.com duplicated content for most of the results, with SO 3rd or 4th (obviously the content farms were gaming the SEO ranking).  Not scientific by any stretch, but getting better.
    0

    Add a comment

  20. JSON / Diagnostics

    Pretty Print JSON via JayRock
    New JSON library for .NET, JayRock

    WPF and INotifyPropertyChanged

    http://code.google.com/p/notifypropertyweaver/
    http://stackoverflow.com/questions/671968/retrieving-property-name-from-lambda-expression
    http://msdn.microsoft.com/en-us/library/ms229614.aspx
    http://caliburn.codeplex.com/wikipage?title=Asynchronous%20Actions
    http://stackoverflow.com/questions/834632/bind-any-xml-document-to-wpf-treeview

    IoC / Autofac

    Nicholas Blumhardt: AutoFac and object Lifetime (summary: mind your 'unit of work' pattern)
    0

    Add a comment

Blog Archive
Contributors
Contributors
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.