Quantcast
Channel: MSBuildExtensionPack Discussions Rss Feed
Viewing all 468 articles
Browse latest View live

New Post: Remote SqlServer Tasks

$
0
0
To run the tasks on an Win XP machine I had to add 2 additional references:
  • Microsoft.SqlServer.SqlEnum.dll
  • Microsoft.SqlServer.SqlClrProvider.dll
But now all tasks I am using, run fine.

New Post: Parallel Tasks for Exec report success but really failed

$
0
0
Greetings,

I'm running my unit tests in parallel, here is a snippet
<ItemGroup>
    <MyTargets Include="UnitTest-Database-1;UnitTest-Database-2;UnitTest-Database-3;UnitTest-Database-4;javascriptUnitTests">
      <LogFilePath>$(Artifacts)</LogFilePath>
    </MyTargets>
  </ItemGroup>

  
  <Target Name="BuildAll" DependsOnTargets="Compile">
    <MSBuild.ExtensionPack.Framework.Parallel
      MultiLog="True"
      TaskAction="BuildTargetsInParallel" 
      Targets="@(MyTargets)"/>
  </Target>

 <Target Name="UnitTest-Database-4">
    <Exec Command='C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe "$(CruiseControlPath)\UnitTest-Database-4.build" /t:UnitTest-Database-4 /v:d /l:FileLogger,Microsoft.Build.Engine;logfile=$(Artifacts)\UnitTest-Database-4.log' IgnoreExitCode="false" >
    </Exec>
    </Target>
I get random test failures but the targets themselves don't fail and the build is green. It's very intermittent.

I'm looking for some ideas on how to tackle this.

This is all windows, cruisecontrol.net.

Thank you

New Post: Parallel Tasks for Exec report success but really failed

New Post: Remote GAC installation

$
0
0
Hi, IIRC the task copies the file from the AssemblyPath to the RemoteAssemblyPath and then gacutil uses the RemoteAssemblyPath.

Did you reboot after updating the path?

Mike

New Post: In VS2012, MSBuild.ExtensionPack.VisualStudio.TfsSource throws exception on checkout

New Post: SqlServer.SqlExecute task doesn't close connection

$
0
0
Hello,
I have such workflow: one target applies sql change scripts on database. If some script fails, I want to restore database in another target (Sql2008.Database Restore task).
But, if the script fails, the connection leaves and database cannot be restored
error : SmoException: System.Data.SqlClient.SqlError: The operating system returned the error '32(The process cannot access the file because it is being used by another process.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on C:\Backups\1.0.22352.1\Database_new_20140114_1945.bak'.\r
I tried different properties from SqlServer.SqlExecute task, but nothing helped. I see the connection in SQL Activity Monitor till the full exit from script.

Call of SqlExecute looks like:
<MSBuild.ExtensionPack.SqlServer.SqlExecute TaskAction="Execute" Retry="true" Files="@(AllFiles)" ConnectionString="$(OpusDatabase)" Condition="'@(AllFiles)' != '' "/>
...
<OnError ExecuteTargets="RestoreDataBases" Condition="'$(BackupExists)' == 'true'"/>
And trial to restore is so:
<MSBuild.ExtensionPack.Sql2008.Database TaskAction="Restore" DatabaseItem="$(OPUSDataBaseMainName)" DataFilePath="$(BackupDirectoryPath)\$(OPUSDataBaseMainName)_$(BackupTime).bak"/>
I tried to alter database before restore with SqlExecute, but it also fails because of opened connection.
How can this be fixed?

Thanks, Roman

New Post: RemoveLines Taking a Long Time

$
0
0
I have a 1.3 MB SQL file that I am using the RemoveLines task to remove 5 lines of text from the file. For some reason this is taking upwards of 8 minutes. What can I do to figure out why it's taking so long?

New Post: In VS2012, MSBuild.ExtensionPack.VisualStudio.TfsSource throws exception on checkout

$
0
0
Not an issue anymore.

Thanks,
Jatin

New Post: RemoveLines Taking a Long Time

New Post: running tasks in parallel results in targets not found error

$
0
0
Hi

When running several tasks in parallel with the parallel task, I'm getting an error:

BuildScript\build.targets(136,3): error MSB4019: The imported proje
t "C:\delivery.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that
the file exists on disk.

This only happens when executing the tasks in parallel. Any suggestions?

New Post: running tasks in parallel results in targets not found error

New Post: Sql2008.Database Restore fails with 'RestoreContainer::ValidateTargetForCreation'

$
0
0
Sorry I missed this. I'll try figure it out.

Mike

New Post: Sql2008.Database Restore fails with 'RestoreContainer::ValidateTargetForCreation'

New Post: Sql2008.Database Restore fails with 'RestoreContainer::ValidateTargetForCreation'

$
0
0
running the same code on windows 8 gives the correct error

j(23,9): error : SmoException: System.Data.SqlClient.SqlError: The operating system returned the error '32(The process cannot access the file because it is being used by another process.)' while attempting 'RestoreContainer::ValidateTargetForCreation'

I'll try figure out a fix.

Mike

New Post: SqlServer.SqlExecute task doesn't close connection

$
0
0
I think this is more to do with the Restore task than any connection issues. I'm going to look at this but track it here

New Post: Sql2008.Database Restore fails with 'RestoreContainer::ValidateTargetForCreation'

$
0
0
So it looks like SQL has the files locked. You'll need to restore to a different file location (SQL will delete the files in use automatically). If you like you can then script a move of the datafiles back to where you need them.

e.g.

<MSBuild.ExtensionPack.Sql2008.Database TaskAction="Restore" DatabaseItem="Assassin" DataFilePath="....\DBBackups\Assassin.bak" ReplaceDatabase="True" NewDataFilePath="C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Assasin_Restore.mdf"LogFilePath="C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Assassin_Restore_log.LDF"LogName="Assassin_log"/>

I think I edited that right... heres my working repo:
<MSBuild.ExtensionPack.Sql2008.Database TaskAction="Restore" DatabaseItem="Mike" DataFilePath="C:\Databases\Backup\Mike-b.bak" NewDataFilePath="c:\b\Mike.mdf" ReplaceDatabase="true" LogFilePath="c:\b\Mike_log.ndf" LogName="Mike_log"/>
Mike

New Post: Remote GAC installation

$
0
0
assuming this is ok now, feel free to shout if its not.

New Post: Parallel Tasks for Exec report success but really failed

$
0
0
assuming this is ok now, feel free to shout if its not.

New Post: MSBuild.ExtensionPack.SqlServer.SqlCmd throws InvalidOperationException: No process is associated with this object on TeamCity

$
0
0
I'm having this same problem and I can test this private build. But what version of Extension Pack does this dll replace? I have the October edition, but is this 3.5 or 4.0?

Also, is there any work-around (anything I can change on the server) as an interim solution?

New Post: MSBuild.ExtensionPack.SqlServer.SqlCmd throws InvalidOperationException: No process is associated with this object on TeamCity

Viewing all 468 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>