我的解决方案中有数据工厂项目,现在正在创建构建定义。
当构建服务器开始构建解决方案时,它会提供一个异常,说明找不到路径C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets
。我已经在构建服务器上安装了扩展,但上面的文件放在我的AppData文件夹中。
如何使用TFS构建定义构建数据工厂项目?
PS>我正在使用TFS 2013服务器,并且Visual Studio ultimate 2013也安装在构建服务器上。
修改
即使我从命令行使用msbuild,构建也会失败,并显示以下错误
"C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj" (default target) (1) ->
(JsonCompilerTarget target) ->
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: The "ADFCompilerTask" task failed unexpectedly.\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: System.AggregateException: One or more errors occurred. ---> System.ArgumentNullException: Value cannot be null.\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: Parameter name: source\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at Microsoft.VSAuthoring.SDK.Common.VSAuthoring.VersionCenter.GetDefault()\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at Microsoft.VSAuthoring.SDK.BuildSystem.JsonCompilerTask.get_ProjectVersion()\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at Microsoft.VSAuthoring.SDK.BuildSystem.JsonCompilerTask.<ValidateConfigFiles>d__1b.MoveNext()\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: --- End of stack trace from previous location where exception was thrown ---\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at Microsoft.VSAuthoring.SDK.BuildSystem.JsonCompilerTask.<ValidateJsons>d__7.MoveNext()\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: --- End of stack trace from previous location where exception was thrown ---\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at Microsoft.WindowsAzure.DataFactoryStudio.DataFactoryProject.ProjectSystem.ADFCompilerTask.<ExecuteAsync>d__2.MoveNext()\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: --- End of inner exception stack trace ---\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at Microsoft.VSAuthoring.SDK.BuildSystem.JsonCompilerTask.Execute()\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: ---> (Inner Exception #0) System.ArgumentNullException: Value cannot be null.\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: Parameter name: source\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at Microsoft.VSAuthoring.SDK.Common.VSAuthoring.VersionCenter.GetDefault()\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at Microsoft.VSAuthoring.SDK.BuildSystem.JsonCompilerTask.get_ProjectVersion()\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at Microsoft.VSAuthoring.SDK.BuildSystem.JsonCompilerTask.<ValidateConfigFiles>d__1b.MoveNext()\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: --- End of stack trace from previous location where exception was thrown ---\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at Microsoft.VSAuthoring.SDK.BuildSystem.JsonCompilerTask.<ValidateJsons>d__7.MoveNext()\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: --- End of stack trace from previous location where exception was thrown ---\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: at Microsoft.WindowsAzure.DataFactoryStudio.DataFactoryProject.ProjectSystem.ADFCompilerTask.<ExecuteAsync>d__2.MoveNext()<---\r [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
C:\Users\myusername\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets(35,5): error MSB4018: [C:\Builds\103\mysolutiion\BuildDefinition\src\DataFactory\AdfApp\AdfApp.dfproj]
答案 0 :(得分:1)
好的,我可以在我身边重现你的问题。只需创建一个public static class Point {
final int x;
final int y;
public Point(int x, int y) {
this.x = x;
this.y = y;
}
@Override
public String toString() {
return "{" + x + "," + y + '}';
}
@Override
public int hashCode() {
int hash = 5;
hash = 97 * hash + this.x;
hash = 97 * hash + this.y;
return hash;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Point other = (Point) obj;
if (this.x != other.x) {
return false;
}
if (this.y != other.y) {
return false;
}
return true;
}
}
和队列构建:
错误消息表明问题。右键单击项目并卸载项目并编辑.dfproj,您将在声明中找到此类路径:
在我的环境中,DataFactory.targets位于Empty Data Factory Project
中的C:\Users\username\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0
, NOT 下。尝试改变路径,问题应该消失。
答案 1 :(得分:0)
我有同样的问题,我没有修复我的特定问题,但也许它会解决你的问题。我将DataFactory.targets添加到解决方案中的Dependencies文件夹中,并在.dfproj文件中引用它。希望这有帮助!