<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Programmatically Resolve Assembly Name to Full Path the Same Way MSBuild Does</title><link>http://blogs.msdn.com/jomo_fisher/archive/2008/05/22/programmatically-resolve-assembly-name-to-full-path-the-same-way-msbuild-does.aspx</link><description>Jomo Fisher—Every once in a while I find I need to turn and assembly name like “System” or “System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL” into a path to the actual file for that assembly. This</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Programmatically Resolve Assembly Name to Full Path the Same Way MSBuild Does</title><link>http://blogs.msdn.com/jomo_fisher/archive/2008/05/22/programmatically-resolve-assembly-name-to-full-path-the-same-way-msbuild-does.aspx#8561205</link><pubDate>Fri, 30 May 2008 05:11:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8561205</guid><dc:creator>Matt</dc:creator><description>&lt;P&gt;Hi Jomo!&lt;/P&gt;
&lt;P&gt;This was a very timely post, thank you so much.&lt;/P&gt;
&lt;P&gt;Of course, as luck would have it, I'm not using F#... I need to do exactly what you've done here in C#.&lt;/P&gt;
&lt;P&gt;I think I understand most of your code. &amp;nbsp;The one thing that I don't get is this part:&lt;/P&gt;
&lt;P&gt;IBuildEngine buildengine = new Microsoft.Build.Framework.&lt;/P&gt;
&lt;P&gt;let x = { new IBuildEngine with &lt;/P&gt;
&lt;P&gt;member be.BuildProjectFile(projectFileName, targetNames, globalProperties, argetOutputs) = true&lt;/P&gt;
&lt;P&gt;member be.LogCustomEvent(e) = ()&lt;/P&gt;
&lt;P&gt;member be.LogErrorEvent(e) = ()&lt;/P&gt;
&lt;P&gt;member be.LogMessageEvent(e) = ()&lt;/P&gt;
&lt;P&gt;member be.LogWarningEvent(e) = ()&lt;/P&gt;
&lt;P&gt;member be.ColumnNumberOfTaskNode with get() = 1&lt;/P&gt;
&lt;P&gt;member be.ContinueOnError with get() = true&lt;/P&gt;
&lt;P&gt;member be.LineNumberOfTaskNode with get() = 1&lt;/P&gt;
&lt;P&gt;member be.ProjectFileOfTaskNode with get() = "" }&lt;/P&gt;
&lt;P&gt;To me that reads, "create a new IBuildEngine with the following properties." &amp;nbsp;Is that right?&lt;/P&gt;
&lt;P&gt;Is this creating an anonymous type that implements IBuildEngine?&lt;/P&gt;
&lt;P&gt;Do you know how one creates an IBuildEngine normally? &amp;nbsp;I can't even find a concrete type that implements IBuildEngine when I search in Reflector (and MSDN). &amp;nbsp;Any guidance would be greatly appreciated! :)&lt;/P&gt;</description></item><item><title>re: Programmatically Resolve Assembly Name to Full Path the Same Way MSBuild Does</title><link>http://blogs.msdn.com/jomo_fisher/archive/2008/05/22/programmatically-resolve-assembly-name-to-full-path-the-same-way-msbuild-does.aspx#8567350</link><pubDate>Sun, 01 Jun 2008 09:25:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8567350</guid><dc:creator>Jomo Fisher</dc:creator><description>&lt;p&gt;Matt,&lt;/p&gt;
&lt;p&gt;That's exactly right. F# lets you anonymously implement an interface with an 'object expression' like you see above. In C# or VB you'll need to create a named type (onymous?) that inherits from IBuildEngine and then new it up inside the resolution function.&lt;/p&gt;
</description></item><item><title>re: Programmatically Resolve Assembly Name to Full Path the Same Way MSBuild Does</title><link>http://blogs.msdn.com/jomo_fisher/archive/2008/05/22/programmatically-resolve-assembly-name-to-full-path-the-same-way-msbuild-does.aspx#8569961</link><pubDate>Mon, 02 Jun 2008 21:46:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8569961</guid><dc:creator>Matt</dc:creator><description>&lt;P&gt;Jomo,&lt;/P&gt;
&lt;P&gt;Thanks for the reply! &amp;nbsp;&lt;/P&gt;
&lt;P&gt;While I was investigating the above, I figured I'd temporarily try to interop directly. &amp;nbsp;I compiled your code with the latest F# compiler and referenced it from my project, and of course it works perfectly. &amp;nbsp;Viva la CLR.&lt;/P&gt;
&lt;P&gt;I'm looking forward to a fully supported release of F# so I can justify spending more real work time on it. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;As an aside, I'm surprised there isn't a framework class available that implements IBuildEngine. &amp;nbsp;I expected to be able to do something like:&lt;/P&gt;
&lt;P&gt;task.BuildEngine = Engine.GlobalEngine;&lt;/P&gt;
&lt;P&gt;Keep up the good work, I really enjoy reading your blog.&lt;/P&gt;
&lt;P&gt;Matt&lt;/P&gt;</description></item><item><title>re: Programmatically Resolve Assembly Name to Full Path the Same Way MSBuild Does</title><link>http://blogs.msdn.com/jomo_fisher/archive/2008/05/22/programmatically-resolve-assembly-name-to-full-path-the-same-way-msbuild-does.aspx#8906780</link><pubDate>Fri, 29 Aug 2008 23:50:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8906780</guid><dc:creator>mood</dc:creator><description>&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;i've put your code into VB. so far so good.&lt;/p&gt;
&lt;p&gt;but if i try to execute the RAR by:&lt;/p&gt;
&lt;p&gt;&amp;quot;If (Not rar.Execute) Then&amp;quot;&lt;/p&gt;
&lt;p&gt;i get an &amp;quot;EntryPointNotFoundException&amp;quot; at this point, i don't know why. any ideas?&lt;/p&gt;
&lt;p&gt;btw: F# seems to be really nice, fits the minimal style i like so much :)&lt;/p&gt;
&lt;p&gt;good bytes&lt;/p&gt;</description></item><item><title>F# Scripts—Reference Nirvana</title><link>http://blogs.msdn.com/jomo_fisher/archive/2008/05/22/programmatically-resolve-assembly-name-to-full-path-the-same-way-msbuild-does.aspx#8919126</link><pubDate>Tue, 02 Sep 2008 09:10:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8919126</guid><dc:creator>Jomo Fisher -- Sharp Things</dc:creator><description>&lt;p&gt;Jomo Fisher— Last time I wrote about getting started with F# scripts. They’re the fastest way to just&lt;/p&gt;
</description></item><item><title>re: Programmatically Resolve Assembly Name to Full Path the Same Way MSBuild Does</title><link>http://blogs.msdn.com/jomo_fisher/archive/2008/05/22/programmatically-resolve-assembly-name-to-full-path-the-same-way-msbuild-does.aspx#9301027</link><pubDate>Fri, 09 Jan 2009 03:46:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9301027</guid><dc:creator>Steve Guidi</dc:creator><description>&lt;p&gt;Mood:&lt;/p&gt;
&lt;p&gt;Please verify that your code is referencing v2.0 of the MSBuild assemblies. &amp;nbsp;I was able to reproduce the raising of the EntryPointNotFoundException when I referenced the corresponding v3.5 assemblies.&lt;/p&gt;</description></item><item><title>re: Programmatically Resolve Assembly Name to Full Path the Same Way MSBuild Does</title><link>http://blogs.msdn.com/jomo_fisher/archive/2008/05/22/programmatically-resolve-assembly-name-to-full-path-the-same-way-msbuild-does.aspx#9301031</link><pubDate>Fri, 09 Jan 2009 03:48:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9301031</guid><dc:creator>Steve Guidi</dc:creator><description>&lt;p&gt;Any idea why the related XML files don't appear in the result set? &amp;nbsp;I would expect to see at least the XML file for System.Core as it coexists with the assembly in the same directory.&lt;/p&gt;</description></item></channel></rss>