Search

SSDT Projects Fail to Build in Parallel by jhess001

Closed
as Won't Fix Help for as Won't Fix

3
0
Sign in
to vote
Type: Bug
ID: 775643
Opened: 1/2/2013 3:00:31 PM
Access Restriction: Public
0
Workaround(s)
2
User(s) can reproduce this bug
When I build two of our SSDT projects in parallel I get a failed build. If I set BuildInParallel="false" then everything is groovy.

"c:\TeamProjects\Development\Main\Source\Database\Source\ISMIS\ISMIS.sqlproj" (default target) (8) ->
(SqlBuild target) ->
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(4
65,5): error MSB4018: The "SqlBuildTask" task failed unexpectedly.\r [c:\TeamProjects\Development\Main\Source\Dat
abase\Source\ISMIS\ISMIS.sqlproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(465
,5): error MSB4018: System.ObjectDisposedException: Store must be open for this operation.\r [c:\TeamProjects\Dev
elopment\Main\Source\Database\Source\ISMIS\ISMIS.sqlproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(465
,5): error MSB4018:    at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, F
ileAccess access, FileShare share, Int32 bufferSize, IsolatedStorageFile isf)\r [c:\TeamProjects\Development\Main
\Source\Database\Source\ISMIS\ISMIS.sqlproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(465
,5): error MSB4018:    at MS.Internal.IO.Packaging.PackagingUtilities.SafeIsolatedStorageFileStream..ctor(String
path, FileMode mode, FileAccess access, FileShare share, ReliableIsolatedStorageFileFolder folder)\r [c:\TeamProj
ects\Development\Main\Source\Database\Source\ISMIS\ISMIS.sqlproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(465
,5): error MSB4018:    at MS.Internal.IO.Packaging.PackagingUtilities.CreateUserScopedIsolatedStorageFileStreamWi
thRandomName(Int32 retryCount, String& fileName)\r [c:\TeamProjects\Development\Main\Source\Database\Source\ISMIS
\ISMIS.sqlproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(465
,5): error MSB4018:    at MS.Internal.IO.Packaging.SparseMemoryStream.SwitchModeIfNecessary()\r [c:\TeamProjects\
Development\Main\Source\Database\Source\ISMIS\ISMIS.sqlproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(465
,5): error MSB4018:    at MS.Internal.IO.Packaging.SparseMemoryStream.Write(Byte[] buffer, Int32 offset, Int32 co
unt)\r [c:\TeamProjects\Development\Main\Source\Database\Source\ISMIS\ISMIS.sqlproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(465
,5): error MSB4018:    at MS.Internal.IO.Packaging.DeflateEmulationTransform.Decompress(Stream source, Stream sin
k)\r [c:\TeamProjects\Development\Main\Source\Database\Source\ISMIS\ISMIS.sqlproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(465
,5): error MSB4018:    at MS.Internal.IO.Packaging.CompressEmulationStream..ctor(Stream baseStream, Stream tempSt
ream, Int64 position, IDeflateTransform transformer)\r [c:\TeamProjects\Development\Main\Source\Database\Source\I
SMIS\ISMIS.sqlproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(465
,5): error MSB4018:    at MS.Internal.IO.Packaging.CompressStream.ChangeMode(Mode newMode)\r [c:\TeamProjects\Dev
elopment\Main\Source\Database\Source\ISMIS\ISMIS.sqlproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(465
,5): error MSB4018:    at MS.Internal.IO.Packaging.CompressStream.Seek(Int64 offset, SeekOrigin origin)\r [c:\Tea
mProjects\Development\Main\Source\Database\Source\ISMIS\ISMIS.sqlproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(465
,5): error MSB4018:    at MS.Internal.IO.Zip.ProgressiveCrcCalculatingStream.Seek(Int64 offset, SeekOrigin origin
)\r [c:\TeamProjects\Development\Main\Source\Database\Source\ISMIS\ISMIS.sqlproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(465
,5): error MSB4018:    at MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Read(Byte[] buffer, Int32 offset, Int32 cou
nt)\r [c:\TeamProjects\Development\Main\Source\Database\Source\ISMIS\ISMIS.sqlproj]
Details (expand)

Product Language

English

Version

SQL Server 2008

Category

Developer Tools (SSDT, BIDS, etc.)

Operating System

Windows 7 Professional

Operating System Language

English

Steps to Reproduce

Wrote an MSBuild file to execute my two sqlproj in parallel and them build with two MSBuild nodes.

Actual Results

See the stack trace in the description.

Expected Results

I expect the same results as if I was running on one msbuild node.

Platform

X64

Virtualization

 
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 1/17/2013 at 10:26 AM
We understand the issue and is under consideration.
Posted by Clicktricity on 1/15/2013 at 2:37 PM
I am also seeing the same error:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets (465): The "SqlBuildTask" task failed unexpectedly.
System.ObjectDisposedException: Store must be open for this operation.
at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, IsolatedStorageFile isf)
at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, IsolatedStorageFile isf)
at MS.Internal.IO.Packaging.PackagingUtilities.SafeIsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, ReliableIsolatedStorageFileFolder folder)
at MS.Internal.IO.Packaging.PackagingUtilities.CreateUserScopedIsolatedStorageFileStreamWithRandomName(Int32 retryCount, String& fileName)
at MS.Internal.IO.Packaging.SparseMemoryStream.EnsureIsolatedStoreStream()
at MS.Internal.IO.Packaging.SparseMemoryStream.SwitchModeIfNecessary()
at MS.Internal.IO.Packaging.DeflateEmulationTransform.Decompress(Stream source, Stream sink)
at MS.Internal.IO.Packaging.CompressEmulationStream..ctor(Stream baseStream, Stream tempStream, Int64 position, IDeflateTransform transformer)
at MS.Internal.IO.Packaging.CompressStream.ChangeMode(Mode newMode)
at MS.Internal.IO.Packaging.CompressStream.Seek(Int64 offset, SeekOrigin origin)
at MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.StreamReader.ReadBuffer(Char[] userBuffer, Int32 userOffset, Int32 desiredChars, Boolean& readToUserBuffer)
at System.IO.StreamReader.Read(Char[] buffer, Int32 index, Int32 count)
at System.Xml.XmlTextReaderImpl.ReadData()
at System.Xml.XmlTextReaderImpl..ctor(String url, TextReader input, XmlNameTable nt)
at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.CreateXmlReader(TextReader input)
at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.LoadExternals(TextReader input, String fileName, String logicalSourceName, IList`1 externalPartsSubstitution, Boolean suppressErrorsForMissingDependencies)
at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.AddReference(CustomSchemaData customData)
at Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSchemaModel.OnCustomDataAdded(CustomSchemaData customData)
at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.AddCustomData(CustomSchemaData customData, Boolean raiseEvents)
at Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlModelBuilder.Add(CustomSchemaData customSchemaData)
at Microsoft.Data.Tools.Schema.SchemaModel.ModelBuilder.AddOrUpdate(CustomSchemaData customSchemaData)
at Microsoft.Data.Tools.Schema.Sql.Build.SqlTaskHost.AddOrUpdate(CustomSchemaData customSchemaData)
at Microsoft.Data.Tools.Schema.Tasks.Sql.TaskHostLoader.ProcessReferences(TaskLoggingHelper providedLogger, SqlTaskHost host, ErrorManager errors)
at Microsoft.Data.Tools.Schema.Tasks.Sql.TaskHostLoader.LoadImpl(ITaskHost providedHost, TaskLoggingHelper providedLogger, Boolean runAllBuildTimeValidationRules)
at Microsoft.Data.Tools.Schema.Tasks.Sql.TaskHostLoader.Load(ITaskHost providedHost, TaskLoggingHelper providedLogger, Boolean runAllBuildTimeValidationRules)
at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.ExecuteLoadTaskHostStep()
at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.ExecuteStep(Func`1 step)
at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()
Posted by jhess001 on 1/3/2013 at 5:10 PM
The project that I get this error on has a database reference to a dacpac too.
Posted by olegmkr on 1/3/2013 at 2:08 PM
Hi,

I have similar problem. I create two simple projects with one shared database reference to \\XXX\Shr.dacpac. If I build in parallel I gave this error too, If I build first and after second - ok.
Sign in to post a workaround.