Error Packaging a script from the command line.

christiangchristiang Posts: 9
edited November 4, 2014 12:37PM in SQL Packager Previous Versions
We are packaging a sql script as part of our build process. I'm using the following command:
H:\myproject>"C:\Program Files (x86)\Red Gate\SQL Packager 7\SQLPackager.exe" /f /project MySQLPackage.sqlpkg
SQL Packager: activated, edition: professional, serial number: xxx-xxx-xxxxxx-xxxx
SQL Packager Command Line V7.0.0.1484
==================================================================================================
Copyright c Red Gate Software Ltd 1999-2013

Creating package...
Unexpected error: Value cannot be null. Parameter name: collection
Value cannot be null.
Parameter name: collection
System.ArgumentNullException
at System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection, IEqualityComparer`1 compa
rer)
at System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection)
at RedGate.SQLCompare.Engine.Options.ToString()
at #4rpb.#XWA.#wVD()
at #4rpb.#XWA.#OUb()
at #4rpb.#OsPb.#6sc(String[] #ead)


Here is the sqlpackager 6 output:
H:\myproject>"C:\Program Files (x86)\Red Gate\SQL Packager 6\SQLPackager.exe" /f /project MySQLPackage.sqlpkg
SQL Packager Command Line V6.4.0.8
==================================================================================================
Copyright c Red Gate Software Ltd 1999-2008

Serial Number:xxx-xxx-xxxxxx-xxxx

Creating package...
OK


The project file was created in sql packager 6 initially, then when I got the error I created a new project file from sql packager 7. It seems to build fine from the UI.

Comments

  • Eddie DEddie D Posts: 1,780 Rose Gold 5
    Thank you for your forum post and sorry that you have encountered a problem.

    It looks a bug to me. Therefore I have added the details of your post to Bug Report SPA-639.

    I will request that the SQL Packager Product Manager review this bug report.

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • thinkingsoftwarethinkingsoftware Posts: 1 New member
    edited November 5, 2014 3:51AM
    We are seeing the same behaviour, just upgraded to SQLPackager 7 from 6 and a previous command line function now failing (others all fine, just one):

    "C:Program FilesRed GateSQL Packager 7SQLPackager.exe" /scriptsource:"C:InstallationSQL Scripts & Snapshotshorizon_data.sql" /force /makeexe /name:horizon_data /location:"C:InstallationSQL Scripts & Snapshots"

    Output is the same:

    Creating package...
    Unexpected error: Value cannot be null. PArameter name: collection
    ...
    System.ArgumentNullException at System.Collections.Generic.HashSet'1..ctor(IEnumerable'1 collection, IEqualityComparer'1 compare)
    at System.Collections.Generic.HashSet'1..ctor(IEnumerable'1 collection)
    at RedGate.SQLCompare.Engine.Options.ToString
    at #4rpb.#XWA.#wVD()
    at #4rpb.#XWA.#OUb()
    at #4rpb.#OsPb.#6sc(String[] #ead)


    This query was originally posted in May, surely there is a resolution available for this by now?
Sign In or Register to comment.