chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes

I try to set up an TFS 2013 build together with TypeMock autodeploy. The build server does not have TypeMock installed.I use the TfvcTemplate 12 WithTypemock.xaml as build template. Only when running a build I get the following error

TF215097: An error occurred while initializing a build for build definition DKHelloBuild: 
Exception Message: Cannot create unknown type '{clr-namespace:TypeMock.TFS}TypeMockRegister'. (type XamlObjectWriterException)
Exception Stack Trace:    at System.Xaml.XamlObjectWriter.WriteStartObject(XamlType xamlType)
   at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)
   at System.Activities.XamlIntegration.FuncFactory`1.Evaluate()
   at System.Activities.DynamicActivity.OnInternalCacheMetadata(Boolean createEmptyBindings)
   at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindings, IList`1& validationErrors)
   at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childActivity, ChildActivity& nextActivity, Stack`1& activitiesRemaining, ActivityCallStack parentChain, IList`1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback)
   at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors)
   at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, LocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors)
   at System.Activities.Validation.ActivityValidationServices.InternalActivityValidationServices.InternalValidate()
   at Microsoft.TeamFoundation.Build.Workflow.WorkflowHelpers.ValidateWorkflow(Activity activity, ValidationSettings validationSettings)
   at Microsoft.TeamFoundation.Build.Hosting.BuildProcessCache.LoadFromXaml(String workflowXaml, TextExpressionImports textExpressionImports)
   at Microsoft.TeamFoundation.Build.Hosting.BuildControllerWorkflowManager.PrepareRequestForBuild(WorkflowManagerActivity activity, IBuildDetail build, WorkflowRequest request, IDictionary`2 dataContext)
   at Microsoft.TeamFoundation.Build.Hosting.BuildWorkflowManager.TryStartWorkflow(WorkflowRequest request, WorkflowManagerActivity activity, BuildWorkflowInstance& workflowInstance, Exception& error, Boolean& syncLockTaken)
No idea what goes wrong. I added the different assemblies as follows to TFS
 
* BuildProcessTemplates
     - TfvTemplate 12 With Typemock.xaml
     * AutoDeploy
         - all the files as found in AutoDeploy including x64 and x86
     * CustomActivities
          - TypeMock.TFS2013.dll
 
I configured my BuildController that it can find the CustomActiviites. And in the build definition I have set the AutoDeploy directory.
 
What am I doing wrong?
 
asked by jcdekoning (640 points)

1 Answer

0 votes

A little update. If I change the XAML file the import of namespace TypeMock.TFS from

xmlns:local="clr-namespace:TypeMock.TFS"

to

xmlns:local="clr-namespace:TypeMock.TFS;assembly=TypeMock.TFS2013"

I get a different error when staring a build.

TF215097: An error occurred while initializing a build for build definition DKHelloBuild: 
Exception Message: Cannot set unknown member 'TypeMock.TFS.TypeMockStart.EvaluationFolder'. (type XamlObjectWriterException)
Exception Stack Trace:    at System.Xaml.XamlObjectWriter.WriteStartMember(XamlMember property)
   at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)
   at System.Activities.XamlIntegration.FuncFactory`1.Evaluate()
   at System.Activities.DynamicActivity.OnInternalCacheMetadata(Boolean createEmptyBindings)
   at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindings, IList`1& validationErrors)
   at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childActivity, ChildActivity& nextActivity, Stack`1& activitiesRemaining, ActivityCallStack parentChain, IList`1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback)
   at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors)
   at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, LocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors)
   at System.Activities.Validation.ActivityValidationServices.InternalActivityValidationServices.InternalValidate()
   at Microsoft.TeamFoundation.Build.Workflow.WorkflowHelpers.ValidateWorkflow(Activity activity, ValidationSettings validationSettings)
   at Microsoft.TeamFoundation.Build.Hosting.BuildProcessCache.LoadFromXaml(String workflowXaml, TextExpressionImports textExpressionImports)
   at Microsoft.TeamFoundation.Build.Hosting.BuildControllerWorkflowManager.PrepareRequestForBuild(WorkflowManagerActivity activity, IBuildDetail build, WorkflowRequest request, IDictionary`2 dataContext)
   at Microsoft.TeamFoundation.Build.Hosting.BuildWorkflowManager.TryStartWorkflow(WorkflowRequest request, WorkflowManagerActivity activity, BuildWorkflowInstance& workflowInstance, Exception& error, Boolean& syncLockTaken)
So it seems to me that it is able to find the TypeMock.TFS2013.dll. Is this new error still related to not finding the right dependencies?

 

answered by jcdekoning (640 points)

I removed from the XAML the EvaluationFolder="{x:Null}" part from the <local:TypeMockStart ..> activity. Now at least a build is running but I see now some warnings like

Access to the registry key 'HKEY_LOCAL_MACHINESOFTWAREWow6432NodeTypeMock' is denied.

The registryenvironment values of Typemock Isolator seemes to be corrupt, please try re-installing Isolator.

Do I really have to give my build server user administration rights to get AutoDeploy working? And what if I install TypeMock on the server, are these administrator rights than not required? 

...