如何实现 TFS InvokeProcess 在其他凭据下运行
我正在使用 TFS (VS 2010) 构建定义和 XAML 来构建适用于不同环境的应用程序。现在,我们需要将这些构建推送到生产服务器,这些服务器需要与构建控制器不同的凭据。
我一直致力于实施“自定义 Team Build 2010 – 第 9 部分:模拟活动(在其他凭据下运行)”(来自 http://www.ewaldhofman.nl/post/2010/05/28/Customize-Team-Build-2010-e28093-Part-9-Impersonate-activities-(run-under-other-credentials ).aspx 但我无法弄清楚如何在 XAML 文件中使用凭据。
因此,我已经实现了提供的解决方案,并且使构建定义需要凭据,但是如何将凭据代码(似乎是 C# 中的)实现到 XAML(是 XML 中)?
谢谢, 斯蒂芬妮
I'm using TFS (VS 2010) Build Definitions and XAMLs to build apps to different environments. Now, we need to push these builds to Production servers which require different credentials than what the Build Controller has.
I have been working on implementing the steps found at "Customize Team Build 2010 – Part 9: Impersonate activities (run under other credentials)" from http://www.ewaldhofman.nl/post/2010/05/28/Customize-Team-Build-2010-e28093-Part-9-Impersonate-activities-(run-under-other-credentials).aspx but I cannot figure out how to use the credentials within the XAML file.
So, I have implemented the provided solution, and have made build definitions require the credentials, but how do I implement the credentials code (which appears to be in C#) into the XAML (which is XML)?
Thanks,
Stephanie
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我已经在这里解决了我的问题。我不知道这些活动是用 C# 编码的,尽管它们是通过 XML 组织的。
I have solved my issue here. I wasn't aware that the activities were coded in C#, although organized through the XML.
您可以使用 TryCatch 活动来包装模拟对象并将其放置在 Final 中。
XAML 应如下所示:
You can use a TryCatch activity to wrap the impersonation object and dispose it in the Finally.
The XAML should look like: