<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Miles</title>
    <description>The latest articles on DEV Community by Miles (@halemiles).</description>
    <link>https://dev.to/halemiles</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F464046%2Fe3cdbea6-17fa-4380-8127-5e5497f9f6cc.jpg</url>
      <title>DEV Community: Miles</title>
      <link>https://dev.to/halemiles</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/halemiles"/>
    <language>en</language>
    <item>
      <title>Microsoft created some dotnet installer scripts (official)</title>
      <dc:creator>Miles</dc:creator>
      <pubDate>Fri, 11 Dec 2020 09:52:37 +0000</pubDate>
      <link>https://dev.to/halemiles/dotnet-installer-scripts-official-2p2m</link>
      <guid>https://dev.to/halemiles/dotnet-installer-scripts-official-2p2m</guid>
      <description>&lt;p&gt;Installing dotnet core is getting easier. There are two scripts that Microsoft offer to install on Windows or Unix.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script"&gt;https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dot.net/v1/dotnet-install.sh"&gt;https://dot.net/v1/dotnet-install.sh&lt;/a&gt; for Linux/MacOS&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dot.net/v1/dotnet-install.ps1"&gt;https://dot.net/v1/dotnet-install.ps1&lt;/a&gt; for Windows&lt;/p&gt;

&lt;p&gt;These scripts have a lot of parameters you can use such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; &lt;code&gt;-Version&lt;/code&gt; if you need a previous version&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-InstallDir&lt;/code&gt; if you have a specific location you need to install on&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-Dry-Run&lt;/code&gt; if you want to simulate the installtion without any files changing&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-Architecture&lt;/code&gt; if you want to run x86 on a x64 machine&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The official documentation shows all the available parameters and some examples of how to use&lt;/p&gt;

&lt;p&gt;If you want to run quickly you could run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="c"&gt;# In Windows&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;powershell&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-NoProfile&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-ExecutionPolicy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;unrestricted&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Command&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &amp;amp;([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) &amp;lt;additional install-script args&amp;gt;"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# In Linux&lt;/span&gt;
curl &lt;span class="nt"&gt;-sSL&lt;/span&gt; https://dot.net/v1/dotnet-install.sh | bash /dev/stdin &amp;lt;additional install-script args&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or if you want to install a specific version (assuming you have downloaded the script file first)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="c"&gt;# In Windows&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;/dotnet-install.ps1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Runtime&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;dotnet&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Version&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;3.0.0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# In Linux&lt;/span&gt;
./dotnet-install.ps1 &lt;span class="nt"&gt;-Runtime&lt;/span&gt; dotnet &lt;span class="nt"&gt;-Version&lt;/span&gt; 3.0.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Of course there are some caveats. &lt;a href="https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script#script-behavior"&gt;https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script#script-behavior&lt;/a&gt;. Some dependencies need to be installed and there is a lot of default behaviour so check out the parameters list if you have any special requirements &lt;a href="https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script#options"&gt;https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script#options&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>microsoft</category>
    </item>
  </channel>
</rss>
