在过去的一周里,我一直在努力实施以下解决方案:(http://blog.samstephens.co.nz/2010-10-18/msbuild-including-extra-files-multiple-builds/.
它基于Sayed的实现:http://sedodream.com/CommentView,guid,803d77d7-a220-4cee-a803-f6291cd4ba71.aspx(完美地运行),但是我需要来自多个位置的文件而且Sayed的解决方案不能解决对于那种情况.
虽然理论上萨姆的解决方案提供准确我需要什么,我不能让它建(尽管剪切和粘贴自己的解决方案,只修改路径,以反映我的环境).几天来,我一直在抨击以下错误:
[15:31:30]: [CopyPipelineFiles] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(1852, 5): error MSB4018: The "CopyPipelineFiles" task failed unexpectedly.
System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path) at System.IO.Path.Combine(String path1, String path2)
at Microsoft.Web.Publishing.Tasks.CopyPipelineFiles.CopyPipelineFilesToFolder(TaskLoggingHelper log, ITaskItem[] allpipeLineItems, String sourceFolderName, String targetFolderName, ItemMetadataFilter itemMetadataSkipFilter, Boolean fUpdateItemSpec, Boolean deleteItemsMarkAsExcludeTrue, List`1 updatedPipeLineItems, List`1 failedPipeLineItems)
at Microsoft.Web.Publishing.Tasks.CopyPipelineFiles.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)
[15:31:31]: Process exited with code 1
[15:31:31]: …Run Code Online (Sandbox Code Playgroud)