{"id":9561,"date":"2006-09-30T16:41:00","date_gmt":"2006-09-30T16:41:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2006\/09\/30\/linking-against-rc2\/"},"modified":"2019-02-18T13:21:17","modified_gmt":"2019-02-18T20:21:17","slug":"linking-against-rc2","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/linking-against-rc2\/","title":{"rendered":"Linking against RC2"},"content":{"rendered":"<p class=\"MsoNormal\"><span>The RC2 SDK is not yet available.&nbsp; Until it is, here is a quick and dirty way for you to find\/extract the DLLs to link your code against.&nbsp; Do this from a RC2 shell and you&#8217;ll a copy of the DLLS in C:\\SDK:<\/span><\/p>\n<p class=\"MsoNormal\"><span><\/span>&nbsp;<\/p>\n<p class=\"MsoNormal\"><span><font face=\"Courier New\"><font size=\"1\">PS&gt;[appdomain]::currentdomain.getassemblies() | <\/font><\/font><\/span><\/p>\n<p class=\"MsoNormal\"><span><font face=\"Courier New\"><font size=\"1\">where {($_.fullname -match &#8220;system.management&#8221;) -OR ($_.fullname \u2013match &#8220;Microsoft&#8221;)} |<\/font><\/font><\/span><\/p>\n<p class=\"MsoNormal\"><span><font face=\"Courier New\"><font size=\"1\">copy-item -path {$_.location} -destination c:\\sdk\\ -verbose<\/font><\/font><\/span><\/p>\n<p class=\"MsoNormal\"><span>&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span>Enjoy!<\/span><\/p>\n<p class=\"MsoNormal\"><span>Jeffrey Snover [MSFT]<br \/>Windows PowerShell\/MMC Architect<br \/>Visit the Windows PowerShell Team blog at:&nbsp;&nbsp;&nbsp; <a href=\"http:\/\/blogs.msdn.com\/PowerShell\">http:\/\/blogs.msdn.com\/PowerShell<\/a><br \/>Visit the Windows PowerShell ScriptCenter at:&nbsp; <a href=\"http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx\">http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx<\/a><\/span><\/p>\n<p class=\"MsoNormal\"><span>&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span>NOTE: Added January 5th, 2009 &#8211; If you add a hard coded reference to C:\\Sdk in your visual studio projects,&nbsp; then two side effects will happen.&nbsp; First, your project will not work if the sdk is not in C:\\SDK.&nbsp; Second, you will only have as up-to-date assemblies as are in C:\\SDK.&nbsp; I personally edit the .csproj files with notepad, find an existing reference (e.g. System.Xml), copy and paste this item, and change the reference to System.Management.Automation.&nbsp; This&nbsp;builds against the most up-to-date System.Management.Automation reference on the system.<\/span><\/p>\n<p class=\"MsoNormal\"><span>&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span>Hope this Helps,<\/span><\/p>\n<p class=\"MsoNormal\"><span>James Brundage [MSFT] &nbsp;<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The RC2 SDK is not yet available.&nbsp; Until it is, here is a quick and dirty way for you to find\/extract the DLLs to link your code against.&nbsp; Do this from a RC2 shell and you&#8217;ll a copy of the DLLS in C:\\SDK: &nbsp; PS&gt;[appdomain]::currentdomain.getassemblies() | where {($_.fullname -match &#8220;system.management&#8221;) -OR ($_.fullname \u2013match &#8220;Microsoft&#8221;)} | [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[43],"class_list":["post-9561","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-sdk"],"acf":[],"blog_post_summary":"<p>The RC2 SDK is not yet available.&nbsp; Until it is, here is a quick and dirty way for you to find\/extract the DLLs to link your code against.&nbsp; Do this from a RC2 shell and you&#8217;ll a copy of the DLLS in C:\\SDK: &nbsp; PS&gt;[appdomain]::currentdomain.getassemblies() | where {($_.fullname -match &#8220;system.management&#8221;) -OR ($_.fullname \u2013match &#8220;Microsoft&#8221;)} | [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/9561","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=9561"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/9561\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=9561"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=9561"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=9561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}