Elton Stoneman

  Home  |   Contact  |   Syndication    |   Login
  123 Posts | 0 Stories | 3755 Comments | 0 Trackbacks

News

Archives

Post Categories

[Source: http://geekswithblogs.net/EltonStoneman]

You can actually use this to check for correct deployment of any .NET stack where you want to verify that assemblies and dependencies in the GAC are correctly deployed. Mostly I use it for troubleshooting when BizTalk can't load maps or schemas.

With PowerShell you can instantiate any .NET object, and if there are any issues in loading the assembly or its dependencies, you'll see the whole error message, which might otherwise be truncated or buried in a stack trace somewhere.

Firstly load the assembly so PowerShell can locate the type. Use the full name if you're loading from the GAC, or the basic name if you've navigated to a program's bin directory:

[System.Reflection.Assembly]::Load('x.y.z.Integration.Maps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=104fee075643f423')

Next use Activator to create and unwrap an instance from the assembly and type name. If this fails, it will highlight any issues with missing dependencies:

$map = [System.Activator]::CreateInstance('x.y.z.Integration.Maps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=104fee075643f423', 'x.y.z.Integration.Maps.x_yService_Getz').Unwrap()

If you don't have any error messages, then your object ($map in this example) is ready to use, and you've verified the deployment is correct. For BizTalk maps you have the additional benefit that running ToString() (or just entering the object name) will show you the underlying XSLT:

$map

If you get do get errors along the way, they should tell you where the problem is. You can get more detail by querying the PowerShell $error object.

posted on Thursday, October 14, 2010 9:22 PM

Feedback

# re: Using PowerShell to verify BizTalk Map Deployment 12/7/2010 3:01 PM Samsung Galaxy S
Great post about the permissions to run a share point 2010

Samsung Galaxy S

# re: Using PowerShell to verify BizTalk Map Deployment 12/10/2010 1:52 PM asset management
I have been looking for this kind of configuration but it was no luck for me. Now, I came across to your site, and glad that I found these codes. This one will be very helpful for me. Thanks for sharing and I hope to see more of your updates.

# re: Using PowerShell to verify BizTalk Map Deployment 2/14/2011 7:12 PM Ferns N Petals Promo Codes
I really wish you used unix instead of windows. Oh well.

# re: Using PowerShell to verify BizTalk Map Deployment 3/19/2011 5:11 PM Ejaculation By Command Review
Your programming lessons are too helpful.

# re: Using PowerShell to verify BizTalk Map Deployment 7/7/2011 3:59 PM moshi monsters
Looks like an old text based game I used to play.

# re: Using PowerShell to verify BizTalk Map Deployment 11/19/2011 9:51 AM Pass4Sure
As you mention above that .Net has different style of development. How can you clear it?




# re: Using PowerShell to verify BizTalk Map Deployment 12/29/2011 11:06 AM hardwood timber flooring
PowerShell feature is rally looking impressive.I am looking forward to reading new articles. Keep up the good work! Awesome blog. I enjoyed reading This is truly a great read for me. I have bookmarked it.


# re: Using PowerShell to verify BizTalk Map Deployment 1/29/2012 4:54 PM Sanovnik
Your post is really good providing good information..I liked it and enjoyed reading it.Keep sharing such important posts.

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: