none
Visual Studio 2012 Schema Compare produces System.ArgumentException

    Question

  • We are making our first attempt at rolling out Visual Studio 2012 and SQL Server Data Tools. After making a simple change to a table through the source file, the user attempted a Schema Compare, only to receive the below message. The user then rebooted her computer hoping that would help, but no such luck.

    This error occurs as the Schema Compare window is initializing, before allowing for the second database source to be selected.

    Please help...

    ---------------------------------------------------------------------------------------------------------------

    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.ArgumentException: Parameter is not valid.
       at System.Drawing.Image.get_Width()
       at System.Drawing.Image.get_Size()
       at Microsoft.VisualStudio.Data.Tools.Package.SchemaCompare.UI.ImageComboBox.OnDrawItem(DrawItemEventArgs e)
       at System.Windows.Forms.ComboBox.WmReflectDrawItem(Message& m)
       at System.Windows.Forms.ComboBox.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************

    (longer than 60,000, so omitted in order to get the post out here)

    Wednesday, September 04, 2013 9:07 PM

Answers

  • Thanks for all the support! We were able to repro last night and it did turn out that the display % was the problem. For some reason our owner drawn WPF combo box causes the crash. We did a quick fix and just removed the icon.  It was just a piece of UI sugar anyway that isn't necessary. Our plan is to create a release ASAP with this fix and then investigate the reasons behind the crash in the office.  Once again thanks for everyone's help. We should be able to post very soon about our Sept release.
    Friday, September 13, 2013 3:02 PM
    Owner

All replies

  • Hi, would you be able to send us some more information, particularly

    - SSDT Version number

    - OS Version (Windows 7, Windows 8, Windows 8.1 Preview, etc.)

    - If you installed a full version of Visual Studio, the Visual Studio Update number (e.g. Update 1, 2, 3) would be great.

    This would be a great help as we investigate this issue. Thanks,

    Kevin

    Wednesday, September 04, 2013 11:56 PM
    Moderator
  • I have the same problem.

    I have SSDT 2012.
    (some other things are listed in the control panel, like SQL Server Data Tools - enu (11.1.30822.0), that might be good to know)

    I have Windows 8 Enterprise.

    And Visual Studio 2012 Premium. Update 3 (I'm pretty sure I had the same problem before I installed update 3)

    I'm also pretty sure my collegue has exactly the same versions, same project using Team foundation. And he has no problems.

    Thursday, September 05, 2013 7:03 AM
  • SSDT - SQL Server Data Tools - August 2013 update (http://msdn.microsoft.com/en-us/jj650015)

    Windows 7 (64-bit) Enterprise

    Visual Studio Ultimate - Update 3

    Thursday, September 05, 2013 12:08 PM
  • I managed to work around it.

     

    All you have to do, is NOT mouse-over the dropdown menu's for source- and target-database.
    Instead, use the SQL - Schema Compare menu at the top. (and try to avoid the SqlSchemaCompare Tab)

    Thursday, September 05, 2013 1:11 PM
  • I'm glad this worked for you.  We'll continue to try and track this down.  If anyone else is seeing this please let us know.  It'll help us prioritize the importance of the fix.
    Thursday, September 05, 2013 4:41 PM
    Owner
  • This workaround does not help us. Simply initiating a "Schema Compare" generates this error, so it is not a matter of avoiding the drop downs or the window itself. It is also an infinite loop, and the only way out is to go through task manager and abort Visual Studio.

    Bobby Wallace - The Idea Guy @ Truss Media Services

    Thursday, September 05, 2013 5:28 PM
  • Same issue everything was fine until I installed: SSDT - SQL Server Data Tools - August 2013 update (http://msdn.microsoft.com/en-us/jj650015)

    Thursday, September 05, 2013 6:14 PM
  • I am also having the same problem, only maybe worse....

    Since the .SCMP window is among the last opened, I can't even operate within visual studio, since every time i open the solution, the window is restored and causes the exception.  

    Can anyone at least help me "reset" the open window layout so this window doesn't open on startup, and allow me to do other things in VS?

    Windows 8 Pro, 6.2.9200,

    -- VS Info:

    ----------------------------------------------------------

    Microsoft Visual Studio Premium 2012
    Version 11.0.60610.01 Update 3
    Microsoft .NET Framework
    Version 4.5.50709

    Installed Version: Premium

    LightSwitch for Visual Studio 2012   04941-004-0043007-02331
    Microsoft LightSwitch for Visual Studio 2012

    Office Developer Tools   04941-004-0043007-02331
    Microsoft Office Developer Tools

    Team Explorer for Visual Studio 2012   04941-004-0043007-02331
    Microsoft Team Explorer for Visual Studio 2012

    Visual Basic 2012   04941-004-0043007-02331
    Microsoft Visual Basic 2012

    Visual C# 2012   04941-004-0043007-02331
    Microsoft Visual C# 2012

    Visual C++ 2012   04941-004-0043007-02331
    Microsoft Visual C++ 2012

    Visual F# 2012   04941-004-0043007-02331
    Microsoft Visual F# 2012

    Visual Studio 2012 Code Analysis Spell Checker   04941-004-0043007-02331
    Microsoft® Visual Studio® 2012 Code Analysis Spell Checker

    Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

    The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

    Visual Studio 2012 SharePoint Developer Tools   04941-004-0043007-02331
    Microsoft Visual Studio 2012 SharePoint Developer Tools

    Windows Phone SDK 8.0 - ENU   04941-004-0043007-02331
    Windows Phone SDK 8.0 - ENU

    AlignAssignments   1.0
    Command for aligning assignments.

    AutoBraceComplete   1.0
    auto brace complete

    AWS Toolkit for Visual Studio 2012   1.5.1.0
    AWS Toolkit for Visual Studio 2012.
    Copyright 2011-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.

    This software includes third party software subject to the following copyrights:
    - WPF Toolkit for charting and grid controls, Microsoft Public License (Ms-PL) 
      [http://wpf.codeplex.com/license]
    - Logging from log4net, Apache License 
      [http://logging.apache.org/log4net/license.html]
    - Putty for PPK to PEM conversion, MIT license 
      [http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html]
    - NGit for AWS Elastic Beanstalk incremental push
      [https://github.com/mono/ngit/blob/master/NGit.license.txt]
    - NSch dependency for NGit
      [https://github.com/mono/ngit/blob/master/NSch.license.txt]
    - Sharpen dependency for NGit
      [https://github.com/mono/ngit/blob/master/Sharpen/AssemblyInfo.cs]
    - ICSharpCode.SharpZipLib dependency for NGit
      [http://www.icsharpcode.net/opensource/sharpziplib/]
    - Mono.Posix.dll and Mono.Security.dll dependencies for NGit
      [http://mono-project.com/FAQ:_Licensing#Licensing]
    - MPFProj for Visual Studio Project Framework
      [http://mpfproj10.codeplex.com/license]
    - JSONLint for JSON validation
      [https://github.com/zaach/jsonlint/blob/master/README.md]
    - Noesis.Javascript.dll for JSON validation
      [http://javascriptdotnet.codeplex.com/license]

    Code alignment   9.1
    Code alignment is a practice for formating your code.
    Based on principals from maths and other displines, code alignment gives extra meaning to your code by lining up similar code parts into columns.
    This is a practice everyone performs on most data using tables and spreadsheets, but unfortunately doesn't get applied to code often enough.

    CodeMaid   #114
    CodeMaid is an open source Visual Studio extension to cleanup, dig through and simplify our C#, C++, F#, VB, XAML, XML, ASP, HTML, CSS, JavaScript and TypeScript coding.

    Written by Steve Cadwallader, for more information visit http://www.codemaid.net/

    CssLint   1.0
    Information about my package

    CustomDocWell   1.0
    Provides configurable behavior for the document well in Visual Studio 2012.

    Entity Framework Power Tools   1.0
    Adds useful design-time DbContext features to the Visual Studio Solution Explorer context menu. 

    When right-clicking on a file containing a derived DbContext class, the following context menu functions are supported:

    1) View Entity Data Model - Displays the underlying Code First model in the Entity Framework designer.
    2) View Entity Data Model XML - Displays the EDMX XML representing the underlying Code First model.
    3) Generate Views - Generates pre-compiled views used by the EF runtime to improve start-up performance. Adds the generated views file to the containing project.

    Git Source Control Provider   1.0.0.0


    Indent Guides   13
    Indent Guides

    Adds visual guides at each indentation level.

    Microsoft Advertising SDK for Windows Phone   6.2.923.0
    Microsoft Advertising SDK for Windows Phone
    Build 6.2.923.0

    Microsoft Code Digger   0.9
    Microsoft Code Digger

    Microsoft Team Foundation Server 2012 Power Tools   3.0
    Power Tools that extend the Team Foundation Server integration with Visual Studio.

    Microsoft Visual Studio Process Editor   1.0
    Process Editor for Microsoft Visual Studio Team Foundation Server

    Microsoft XNA Game Studio   4.0
    Microsoft XNA Game Studio 4.0
    Build 4.0.40906.0

    NuGet Package Manager   2.6.40627.9000
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

    OptionsPageImpl   1.0
    Information about my package

    PHP Tools for Visual Studio   1.6.4231
    PHP Tools extend Visual Studio with a set of features to build PHP applications more efficiently. It makes code more readable, easier to navigate, and clean.

    PowerCommands for Visual Studio 2010   1.0
    A set of power commands for Visual Studio 2010

    PreEmptive Analytics Visualizer   1.0
    Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

    Quick Launch Tasks   1.0
    Microsoft Quick LaunchTasks package adds accessibility and settings tasks to the Quick Launch tool.

    SQL Server Data Tools   11.1.30822.0
    Microsoft SQL Server Data Tools

    Visual Studio Achievements   1.0
    Visual Studio Achievements

    VSCommands11   12.0
    VSCommands 11

    Web Developer Tools   1.2.40308.0
    Microsoft Web Developer Tools contains the following components:
    Page Inspector: Tool that offers an efficient way to decompose Web Applications and diagnose front-end issues.
    Web Publishing: Extensions required for Web Publishing for both hosted servers as well as on premises.
    Web Form Templates: Includes the default templates for Web Form Applications.
    Editor Extensions: Includes HTML, CSS, and JS editor extensions that greatly enhance the development experience.

    Git Extensions
    Git Extensions is a graphical interface for Git
    For more information about Git Extensions, see the Git Extensions website at
    http://code.google.com/p/gitextensions/
    Copyright © 2012 Henk Westhuis

    ----------------------------------------------------------

    Thursday, September 05, 2013 10:39 PM
  • I know what you mean. I had the same problem.

    I believe the difference is.... you should close that SchemaCompare Tab. Or at least open a different Tab so it's hidden. That way, you won't get the error. And for some reason.... when I mouse-over those dropdown menu's, I still get that error. Except it's no longer an infinite loop.

    Friday, September 06, 2013 6:50 AM
  • Thanks for reporting this.  I put a 'catch' in the draw code so drawing the icon won't bring down Visual Studio.  Unfortunately we haven't been able to replicate the issue in the office (where I can debug).  The next version of SSDT for Dev10/11 will contain my "fix".  I'll keep this thread updated if I discover anything else.
    Friday, September 06, 2013 3:04 PM
    Owner
  • Assuming that the problem is in update 3, is there some way we can back out update? We have a developer (who was key to this rollout, so it's a black eye at the moment) who cannot work.

    Thanks,


    Bobby Wallace - The Idea Guy @ Truss Media Services

    Friday, September 06, 2013 3:11 PM
  • I have same problem.  My system is: Lenovo Yoda 13, Windows Enterprise 8 64 bit, Visual Studio 2012 Update 3 (11.0.60610.01), SSDT (11.1.30622.0)

    Interestingly, I have a desktop that runs Windows 8 Pro 64.  Same setup for SSDT and visual studio, but the schema compare runs fine.

    Thanks

    -Rushui



    • Edited by Rushui Friday, September 06, 2013 3:54 PM
    Friday, September 06, 2013 3:45 PM
  • I am getting the same error.  I also recently updated Data tools with this
    "Same issue everything was fine until I installed: SSDT - SQL Server Data Tools - August 2013 update (http://msdn.microsoft.com/en-us/jj650015)"

    Windows 7 64 bit Enterprise

    Visual Studio 2012 Ultimate version 11.0.50727.1 (pretty sure I have update 3)

    Microsoft SQL Server Data Tools 2012 11.1.30822.0

    1. Click SQL > Schema Compare > New Schema Comparison
    2. Click Select source or Select Target drop downs
    3. Select Project radio button or Data base radio buttons
    4. I select my project or database and then click OK
    5. Then the error appears

    Friday, September 06, 2013 8:02 PM

    1. Click SQL > Schema Compare > New Schema Comparison
    2. Click Select source or Select Target drop downs
    3. Select Project radio button or Data base radio buttons
    4. I select my project or database and then click OK
    5. Then the error appears

    Here is how I avoid the error until there's a fix.

    1. Click SQL > Schema Compare > New Schema Comparison
    We need to hide that SqlSchemaCompare1 tab, with those darn dropdown menu's...

    2. Drag your Solution Explorer to the same area as the newly created SqlSchemaCompare1
    It has to be something like Solution Explorer, otherwise you can't do step 4.

    3. Keep the Solution Explorer open, so the SqlSchemaCompare1 is hidden.
    4. Click SQL > Schema Compare > Select source...

    5. Select your database and stuff, then click OK (no error)

    Do your thing, but avoid the source/target dropdown menu's.



    • Edited by Mtihc Friday, September 06, 2013 9:02 PM
    • Proposed as answer by Mtihc Friday, September 06, 2013 9:46 PM
    Friday, September 06, 2013 8:23 PM
  • Thanks so much!  That worked perfectly!
    Friday, September 06, 2013 8:54 PM
  • Yep - I have got the same issue

    Exact same versions as noted above - version of SSDT is 11.1.30822.0

    Can workaround by hiding the schema compare window and using pulldowns from the main SQL menu item.

    Have also tried to run the compare (using workaround) and saving the compare (in the Schema COmparisons) folder - but doing a double click on the newly created items just gives me a chanin of unhandled exceptions.

    The workaround is gross - please give us a fix

    Stan

    Monday, September 09, 2013 2:40 AM
  • Yes, it's ugly.  I'll talk to my counterparts on Monday and see what we can do.

    Monday, September 09, 2013 4:09 AM
    Owner
  • This workaround seems to do the trick. Thanks

    I hope there will be a proper fix soon, because it's really annoying i have to kill my entire devenv.exe due to this error.

    Monday, September 09, 2013 10:06 AM
  • Another vote for a fix soon please.  Not very pleasant to need to kill visual studio or see the constant exception message
    Monday, September 09, 2013 10:19 AM
  • This is affecting me but not some other developers in the organization with very similar hardware and software configurations.

    Here are some more details about my setup and upgrade order as best as I can recall them:

    • Windows 7 Pro 64-bit
    • VS 2012 Ultimate
    • SQL 2008 local instance
    • SQL Data Tools June 2013
    • At this point, I could open the database project and schema compare without an error.  I had to upgrade my local SQL instance because the project was SQL 2012 and I couldn't do a compare against a 2008 instance.
    • SQL Tools for VS 2012 Business Intelligence
    • VS 2012 Update 3
    • SQL 2012
    • I can't remember the reason, but at this point I had to upgrade to the August 2013 SQL Data Tools.
    • error

    Here's hoping this info helps MS find and fix this sooner!


    drew

    Monday, September 09, 2013 2:28 PM
  • Same problem here.

    Windows 7 Ultimate
    Visual Studio 2010 Professional (10.0.40219.1 SP1Rel)
    SSDT Aug. 2013

    Tuesday, September 10, 2013 3:05 AM
  • Come on Microsoft.  Can we have a patch please?  I am finding it very difficult to tell my client how good it is to use the latest and greatest updates when you screw me like this. 

    I am relying on SSDT to publish my database, and really need this update to be fixed and deployed.

    Thanks (in advance)

    Tuesday, September 10, 2013 9:09 AM
  • I also have this same issue on Windows 8, VS 2012 Update 3 and the latest SSDT. The posted work around is not working for me. 
    Tuesday, September 10, 2013 1:59 PM
  • We've decided to make the previous version of SSDT available in case anyone needs to go back.

    http://msdn.microsoft.com/en-us/data/hh297027

    We're continuing to look at this issue.  The good news is that we finally have a repro in the office.

    Tuesday, September 10, 2013 3:00 PM
    Owner
  • Question in regards to going to the previous version. It is just a matter of uninstalling the current version and installing the older or are there more/different steps?

    Thank you.

    Tuesday, September 10, 2013 3:34 PM
  • Going back to the previous version did not help me. I have to delete my .suo file to be able to open the solution.
    Tuesday, September 10, 2013 4:19 PM
  • Hi,

    just in case nobody suspected it until now:
    Could it have something to do with screen resolution?

    I tried it on another machine today and it worked. It should be
    roughly the same setup, but the monitor has a higher resolution.

    Tuesday, September 10, 2013 5:44 PM
  • Skalpin,

    At first I got the same problem but then I realize that are severall other programs mention "SQL Server Data Tools".

    After I uninstall all of them and using the old version of SSDT, everything is working.

    BTW, I spent $200,00 in Windows Upgrade attempt to solve my problem, thinking that was my Win 7 the problem...


    Fernando Angelieri

    Tuesday, September 10, 2013 9:06 PM
  • Fernando, 

    Thanks I'll give that a try.

    Wednesday, September 11, 2013 3:17 PM
  • I had same issue with August release and then I installed  VS 2013 RC. And still had issue with that version of data Tools. In discussing the issue with a colleague ( Thanks Virag)... We determined only difference between my PC where it didn't work and his where it did was I had adjusted  my Display to be 125%. Once I went into control panel and adjusted display back 100% and logged in and out everything worked. There was no issue with this in June release.

    Thanks.

    • Proposed as answer by dotnetgeek Wednesday, September 11, 2013 5:01 PM
    Wednesday, September 11, 2013 4:48 PM
  • Skalpin,

    At first I got the same problem but then I realize that are severall other programs mention "SQL Server Data Tools".

    After I uninstall all of them and using the old version of SSDT, everything is working.

    BTW, I spent $200,00 in Windows Upgrade attempt to solve my problem, thinking that was my Win 7 the problem...


    Fernando Angelieri

    Removing ALL SQL Server Data Tools and installing the previous version worked for me. Thanks for the suggestion Fernando. 

    Wednesday, September 11, 2013 5:09 PM
  • Changing my display to 125% in control panel also does the trick for me...
    Friday, September 13, 2013 12:16 PM
  • Thanks for all the support! We were able to repro last night and it did turn out that the display % was the problem. For some reason our owner drawn WPF combo box causes the crash. We did a quick fix and just removed the icon.  It was just a piece of UI sugar anyway that isn't necessary. Our plan is to create a release ASAP with this fix and then investigate the reasons behind the crash in the office.  Once again thanks for everyone's help. We should be able to post very soon about our Sept release.
    Friday, September 13, 2013 3:02 PM
    Owner
  • Thanks for the workaround.  Going to Display settings and changing the font size from 125% to 100% fixed my issue.

    • Proposed as answer by Cory Langston Monday, September 16, 2013 10:20 PM
    • Edited by Cory Langston Monday, September 16, 2013 10:23 PM
    Monday, September 16, 2013 9:55 PM
  • The Sept 2013 update is available for download and fixes this issue. 

    SSDT for Visual Studio 2012: http://msdn.microsoft.com/en-us/jj650015

    SSDT for Visual Studio 2010: http://msdn.microsoft.com/en-us/jj650014

    Thanks!
    Jill

     
    Wednesday, September 18, 2013 4:06 AM
    Owner
  • Hello Jill,

    Not worked for me

    I have installed Visual Studio 2013 RC, SQLServer Express 2012 in a Windows 8.1 Pro RTM.

    The same configuration but in a Windows 8 Pro, worked perfectly.

    ¿any idea?

    Wednesday, September 18, 2013 9:34 AM
  • It is working for me.

    VS2012 Ultimate, Win8 (compilation 9200).

    Just installed over previuous version (after roll-back).

    Thanks MS guys.


    Fernando Angelieri

    Wednesday, September 18, 2013 11:34 AM
  • The september version fixed this issue for me.

    Thanks!

    Wednesday, September 18, 2013 12:54 PM
  • Yup - the update fixed the issue for me - thanks guys!

    Stan


    • Edited by Stan_W_Gifford Friday, September 20, 2013 3:38 AM typo (Duh)
    Wednesday, September 18, 2013 9:40 PM