开发者

Does anyone have documentation on CustomActivitiesAndExtensions.xml?

开发者 https://www.devze.com 2023-04-02 21:51 出处:网络
I found this mentioned in a few books I have on TFS2010, but the documentation is pretty sparse, and searching on Google and Bing r开发者_运维问答eturns nothing I don\'t already know.

I found this mentioned in a few books I have on TFS2010, but the documentation is pretty sparse, and searching on Google and Bing r开发者_运维问答eturns nothing I don't already know.

Does anyone have and detailed information on the using CustomActivitiesAndExtensions.xml and how it works?


The CustomActivitiesAndExtensions.xml file is primarily used to specify additional activities and/or workflow extensions to be loaded by the Build Service to support your build process.

Here's an example:

<?xml version="1.0" encoding="utf-8"?>
<Assemblies DownloadListedItemsOnly="true">
    <Assembly LoadListedItemsOnly="true" FileName="CustomAssembly.dll" HostEnvironmentOption="All">
        <Activities>
          <Activity FullName="CustomAssembly.OnAgentActivity" HostEnvironmentOption="Agent"/>
          <Activity FullName="CustomAssembly.OnControllerActivity" HostEnvironmentOption="Controller"/>
          <Activity FullName="CustomAssembly.OnBothActivity" HostEnvironmentOption="All"/>
        </Activities>
        <Extensions>
           <Extension FullName="CustomAssembly.OnAgentExtension" HostEnvironmentOption="Agent"/>
           <Extension FullName="CustomAssembly.OnControllerExtension" HostEnvironmentOption="Controller"/>
           <Extension FullName="CustomAssembly.OnBothExtension" HostEnvironmentOption="All"/>
        </Extensions>
    </Assembly>
</Assemblies>

The DownloadListedItemsOnly attribute is an optimization you can use to only download the assemblies specified in this file and ignore any others.

Lastly, it's important to note that if you specify an assembly beneath the Activities or Extensions element that doesn't actually have an Activity or Extension (as appropriate) that's discoverable via reflection, then that assembly won't be loaded. The most likely case where this would be a problem would be if you implemented the design-time experience for your activity in a separate assembly.


As you you know TFS based on WF so you just need the documentation of how to create WF custom activity, To create a basic custom activity, you inherit from the Activity class or a derived type. To create a custom composite activity, you inherit from the CompositeActivity class or a derived type.

See this link:

Creating Custom Activities

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号