Geeks With Blogs

News This is the *old* blog. The new one is at blog.sixeyed.com
Elton Stoneman
This is the *old* blog. The new one is at blog.sixeyed.com

[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 PowerShell scripts , BizTalk 2009 | Back to top


Comments on this post: Using PowerShell to verify BizTalk Map Deployment

# re: Using PowerShell to verify BizTalk Map Deployment
Requesting Gravatar...
Great post about the permissions to run a share point 2010

Samsung Galaxy S
Left by Samsung Galaxy S on Dec 07, 2010 3:01 PM

# re: Using PowerShell to verify BizTalk Map Deployment
Requesting Gravatar...
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.
Left by asset management on Dec 10, 2010 1:52 PM

# re: Using PowerShell to verify BizTalk Map Deployment
Requesting Gravatar...
I really wish you used unix instead of windows. Oh well.
Left by Ferns N Petals Promo Codes on Feb 14, 2011 7:12 PM

# re: Using PowerShell to verify BizTalk Map Deployment
Requesting Gravatar...
Your programming lessons are too helpful.
Left by Ejaculation By Command Review on Mar 19, 2011 5:11 PM

# re: Using PowerShell to verify BizTalk Map Deployment
Requesting Gravatar...
Looks like an old text based game I used to play.
Left by moshi monsters on Jul 07, 2011 3:59 PM

# re: Using PowerShell to verify BizTalk Map Deployment
Requesting Gravatar...
As you mention above that .Net has different style of development. How can you clear it?


Left by Pass4Sure on Nov 19, 2011 9:51 AM

# re: Using PowerShell to verify BizTalk Map Deployment
Requesting Gravatar...
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.
Left by hardwood timber flooring on Dec 29, 2011 11:06 AM

# re: Using PowerShell to verify BizTalk Map Deployment
Requesting Gravatar...
Your post is really good providing good information..I liked it and enjoyed reading it.Keep sharing such important posts.
Left by Sanovnik on Jan 29, 2012 4:54 PM

# re: Using PowerShell to verify BizTalk Map Deployment
Requesting Gravatar...
It would be surely a .NET object. Well, nice article.. keep it up
Left by Jabong Coupon Codes on Jul 25, 2012 7:58 AM

# re: Using PowerShell to verify BizTalk Map Deployment
Requesting Gravatar...
I have been learning biztalk and found it to be very it to be very interesting.Thanks for providing this info.
Left by flight coupons on Oct 04, 2012 4:00 PM

# Goibibo Coupons
Requesting Gravatar...
Hi,

I have found goibibo coupons

Coupon Code: LOVEFLY

Flat Rs. 200 discount on all domestic flights not valid for Jetlite and Indigo.

can be used multiple times.
Left by laasya on Jan 03, 2013 5:15 AM

Your comment:
 (will show your gravatar)


Copyright © Elton Stoneman | Powered by: GeeksWithBlogs.net