作为CI过程的一部分,我试图为SSIS项目创建清单文件。我发现我应该能够使用MSBuild扩展包中的MSBuild扩展包任务来完成这个任务。
我已经在本地开发人员机器上成功地实现了这一点,创建了一个MSBuild文件,调用了这个任务,并传入了。输出正是我想要的,即将.dtsConfig和.dtsx文件复制到输出文件夹中,并生成清单文件。
但是,当我将它添加到我的CI系统中时,我会得到以下错误:
error MSB4018: The "MSBuild.ExtensionPack.SqlServer.BuildDeploymentManifest" task failed unexpectedly.
error MSB4018: System.IO.IOException: The device is not ready.
error MSB4018:
error MSB4018: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
error MSB4018: at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite)
error MSB4018: at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite)
error MSB4018: at MSBuild.ExtensionPack.SqlServer.BuildDeploymentManifest.CreateElementForFileAndCopy(String fileType, String sourcePath, String destinationPath) in C:\Projects\CodePlex\MSBuildExtensionPack\Solutions\Main3.5\Framework\SqlServer\BuildDeploymentManifest.cs:line 158
error MSB4018: at MSBuild.ExtensionPack.SqlServer.BuildDeploymentManifest.<>c__DisplayClass18.<Execute>b__a(<>f__AnonymousType1`2 <>h__TransparentIdentifier1) in C:\Projects\CodePlex\MSBuildExtensionPack\Solutions\Main3.5\Framework\SqlServer\BuildDeploymentManifest.cs:line 124
error MSB4018: at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
error MSB4018: at System.Xml.Linq.XContainer.AddContentSkipNotify(Object content)
error MSB4018: at System.Xml.Linq.XContainer.AddContentSkipNotify(Object content)
error MSB4018: at MSBuild.ExtensionPack.SqlServer.BuildDeploymentManifest.Execute() in C:\Projects\CodePlex\MSBuildExtensionPack\Solutions\Main3.5\Framework\SqlServer\BuildDeploymentManifest.cs:line 103
error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)对是什么原因有什么想法吗?调用运行在我的开发VM上的构建文件的确切批处理文件可以工作。我试图排除像抗病毒这样的问题,我已经关闭了它们,但仍然会发生同样的错误。
发布于 2013-09-10 08:14:30
好吧,看来我和同事花了一段时间才能回答我自己的问题。
在*.dtsx中有一个指向与其关联的配置文件位置的路径。这个硬编码的路径是查看D:\驱动器,它存在于我的开发人员机器上,但不存在于构建服务器上(至少不是物理硬盘,而是DVD驱动器)。因此,它试图从DVD驱动器读取一个文件,这就是导致“设备尚未就绪的错误”的原因。我修改了*dtsx文件以使用相对路径,而不是绝对路径,现在一切似乎都正常!:-)
希望这能帮到别人!
加里
https://stackoverflow.com/questions/18694710
复制相似问题