Skip to main content

Server Setup:


Visual Studio 2010


K2 Blackpearl


Windows Server 2008 R2 Standard (64-bit)


Setup:


I am attempting to write an automated build engine for K2 projects. I have used the code from the following URL as a starting point. 


Issue:


When I hit the following line of code ...


package = project.CreateDeploymentPackage();


The following exception is thrown:


Message: "Exception has been thrown by the target of an invocation."


Inner Exception: Value cannot be null.
Parameter name: path1


I'm not sure where this parameter is set or what this error means. I'm not seeing a value to set in any of my objects. I searched the underground and found the following URL and implemented JohanL's solution at the bottom of the page but it has not solved the issue. Has anyone else experienced this issue?

...


 


 


The issue here is with your Machine.Config file.  This particular error is due to the fact that the CreateDeploymentPackage method is attemption to access your ConfigurationManager for this information.  My guess is the productpath. 


The following line should be in the configSections


<section name="sourcecode.configuration" type="SourceCode.Configuration.ConfigurationManager, SourceCode.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d"/>


and you should have the sourcecode.configuration element in your configuration


<sourcecode.configuration>


    <managerConfigFile>C:ProgramDataSourceCodeConfigurationManager.config</managerConfigFile>


    <primaryDefinitionServer name="."/>


    <templateConfigFile/>


    <productPath>C:Program Files (x86)K2 blackpearlin</productPath>


  </sourcecode.configuration>


Reply