Problem updating to 2012

Feb 13, 2013 at 1:06 PM
Hi,

I just updated to the newest released version for the 2012 support, as we have upgraded our build system to TFS 2012 recently.

However when I attempt to use the template, I get a XAML error:

TF215097: An error occurred while initializing a build for build definition XXX
Exception Message: The invocation of the constructor on type 'TfsBuild.NuGetter.Activities.NuGetterProcess' that matches the specified binding constraints threw an exception. (type XamlObjectWriterException)

<snip>

Inner Exception Details:

Exception Message: Could not load file or assembly 'System.Management.Automation, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (type FileNotFoundException)


I think I read in another discussion item that this assembly is used for the powershell support, and that it should be in the GAC. After some digging, it appears that its only present if you have installed the Windows SDK on the build controller. The specific required version is from powershell v1.0 (and not the v3 one that is also present) and is strong-name signed - it can be found at

C:\Program Files (x86)\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0

Could this be added to the docs and/or adjusted so it doesn't load the powershell binary unless pre-packaging is required - I'm not using pre-packaging at all so it's been quite confusing!

Thanks for all the hard work - its very useful to have these templates and has still saved me loads of time,
Coordinator
Feb 14, 2013 at 1:09 AM
Yeah, PowerShell is a huge capability if you're using it but, like this, can be a pain if you're not.

I'm looking into the best way to handle this - "NuGetter Lite" maybe.

Thanks! I appreciate the feedback,

Mark
Feb 20, 2013 at 8:44 AM
Hi,

I am having a similar issue to mr_miles that I have not yet been able to resolve. I recently upgraded TFS from 2010 to 2012. Everything was working before the upgrade.

When trying to use either NuGetterMultiPkgBuildVersionedTemplate20.xaml or NuGetterMultiPkgBuildTemplate20.xaml I receive the following error.

Error:
TF215097: An error occurred while initializing a build for build definition Test: The invocation of the constructor on type 'TfsBuild.NuGetter.Activities.NuGetterProcess' that matches the specified binding constraints threw an exception.

I have verified:
  • Build Controller path to custom assemblies is correct
  • Assemblies in custom folder are the latest version (2.1.13037.3)
  • System.Management.Automation dll is in the GAC
I am not quite sure how mr_miles was able to get to inner exception details, maybe that would be the first step?

Thanks in advance for your help.

Joe
Feb 20, 2013 at 9:42 AM
The inner exception details were just at the end of the TFS build log (the detailed one).

Is it possible that the System.Automation.dll in the GAC is the wrong version? You need the strong-name-signed one from Powershell v1, not the unsigned one from v3 IIRC.

On Wed, Feb 20, 2013 at 8:44 AM, Joe2291 <notifications@codeplex.com> wrote:

From: Joe2291

Hi,

I am having a similar issue to mr_miles that I have not yet been able to resolve. I recently upgraded TFS from 2010 to 2012. Everything was working before the upgrade.

When trying to use either NuGetterMultiPkgBuildVersionedTemplate20.xaml or NuGetterMultiPkgBuildTemplate20.xaml I receive the following error.

Error:
TF215097: An error occurred while initializing a build for build definition Test: The invocation of the constructor on type 'TfsBuild.NuGetter.Activities.NuGetterProcess' that matches the specified binding constraints threw an exception.

I have verified:
  • Build Controller path to custom assemblies is correct
  • Assemblies in custom folder are the latest version (2.1.13037.3)
  • System.Management.Automation dll is in the GAC
I am not quite sure how mr_miles was able to get to inner exception details, maybe that would be the first step?

Thanks in advance for your help.

Joe

Read the full discussion online.

To add a post to this discussion, reply to this email (NuGetter@discussions.codeplex.com)

To start a new discussion for this project, email NuGetter@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Feb 20, 2013 at 8:21 PM
Hi mr_miles,

I believe you meant "System.Management.Automation.dll" and yes, I think it is the correct version.

In the c:\windows\assembly I have System.Management.Automation.dll
  • Version: 1.0.0.0
  • Key: 31bf3856ad364e35
  • File Version: 6.1.7601.17514
Thanks for the clarification on the Inner Exception details, I was hoping there was a magic trick to get more information. Unfortunately, anytime I kick off a build it fails within a second or two with the error below and doesn't provide any more information.

Error:
TF215097: An error occurred while initializing a build for build definition Test: The invocation of the constructor on type 'TfsBuild.NuGetter.Activities.NuGetterProcess' that matches the specified binding constraints threw an exception.

I have also tried running fuslogvw for binding issues and I get none.

Any other ideas would be greatly appreciated.

Thanks,
Joe
Feb 28, 2013 at 6:48 AM
Does anyone have additional information on this issue? I've run into the same problem but have yet to find a solution. I'm getting the same error as Joe and I have version 1.0 of system.management.automation.dll in my GAC. The only difference I've seen at this point is that the file version of my automation dll is 6.1.7600.16385 and not 6.1.7601.17514. What installs file version 17514 of system.management.automation??

Does anyone have thoughts or suggestions? I'd appreciate either!
Feb 28, 2013 at 12:00 PM
Sorry, I don't have any more help - for me it just worked after that.

One "gotcha" question - are you looking on the controller or the agent? My errors were generated from the controller, but normally errors come from the agent, so its easy to look in the wrong place.

Miles
Feb 28, 2013 at 6:43 PM
I believe my errors are coming from the controller but can't be positive (which I realize sounds odd). When I kick off a build through visual studio it dies within about a minute but I'm actually not able to get to any of the expanded error details. There doesn't appear to be any inner exception information for me to retrieve, which is highly frustrating. Do I need set the logging level to certain state in order to get that information?
Feb 28, 2013 at 10:25 PM
Edited Feb 28, 2013 at 10:30 PM
Hi mperna,

I had a few moments today to get back to this and I have figured out what was causing my problem; I hope this helps you solve yours.

In my attempt to solve the issue, I decided to download the latest code and try to build. figuring any missing dependencies would be blatantly obvious via build log. Thankfully, the error was obvious. As soon as I hit build, I found System.Management.Automation with assembly Version 3.0.0.0 was missing. So, I installed the last version and all worked perfectly!!!

You can get the last version from: http://www.microsoft.com/en-us/download/details.aspx?id=34595. Install, reboot, try again. If this doesn't solve you problem try downloading / building the latest code.

Hope this helps,
Joe
Apr 10, 2013 at 4:54 PM
Installing PowerShell 3 on the controller from Joe's link fixed the problem for me.