- Project to hold the xaml files
- Project to hold the first level library (contain my custom activities)
- Project to hold Business Layer stuff
- Project to test the Business Layer stuff
Everything was working great.
I had an enumeration that was in the "first level library". It was a parameter in my builds. I noticed a better place for it would be in the Business Layer project instead, so I moved. After I did this I got the following error on my builds:
"Failed to load the following parameters:"
<InArgument x:Key="EnumerationName" x:TypeArguments="enumerationLibrary:EnumerationName" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns=http://schemas.microsoft.com/netfx/2009/xaml/activities">[EnumerationName.DefaultValue]</InArgument>
I would also get the following:
The parameter EnumerationName could not be loaded because the type InArgument<MyNamespace.BLProjectName.EnumerationName> was not found. You cannot edit this parameter, but you can save your build definition without it.
I have already added my TFS folder to the build server's "Version control path custom assemblies" therefore I knew the DLL was in the right place and TFS should see it.
Well then I found this forum entry.
Basically TFS will NOT jump from a xaml workflow file to a DLL that does not have a Activity in it. Since I moved my enumeration to the Business project that project does not have an activity. The solution for this? Add a dummy activity into the project.
Here is an example from Valéry Letroye in the forum above:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.TeamFoundation.Build.Client; using System.Activities; namespace AG.SCRM.TeamBuild.Helpers { //If a custom assembly uses a dependent assembly (reference) which is needed to run activities, //they will not get deployed properly. If this is the case you will get “unknown type” errors on //build definition initialization: // TF215097: An error occurred while initializing a build for build definition xxxx: // The type ‘xxxx’ of property ‘xxxx’ could not be resolved. //To work around this issue, we add a dummy CodeActivity into the dependent assembly with the //class scoped attribute: [BuildActivity(HostEnvironmentOption.All)] [BuildActivity(HostEnvironmentOption.All)] public sealed class DummyCodeActivity : CodeActivity { protected override void Execute(CodeActivityContext context) { throw new NotImplementedException(); } } }
I did the above and everything started working fine.
God bless,
Bruno
No comments:
Post a Comment