title: Error when starting ASP.NET Core web app: "Unable to start dotnet.exe. The system cannot find the file specified."
body: <p>I have downloaded Visual Studio 2017 RC. I create a default ASP.NET Core MVC web application (no authentication), press F5 to run it inside IIS Express and I get this message:</p>
  
  <p><a href="https://i.stack.imgur.com/cHle8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cHle8.png" alt="enter image description here"></a></p>
  
  <p>The .csproj is a default one:</p>
  
  <pre><code>&lt;Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk.Web"&gt;
    &lt;PropertyGroup&gt;
      &lt;OutputType&gt;Exe&lt;/OutputType&gt;
      &lt;TargetFramework&gt;netcoreapp1.0&lt;/TargetFramework&gt;
      &lt;PreserveCompilationContext&gt;true&lt;/PreserveCompilationContext&gt;
    &lt;/PropertyGroup&gt;
    &lt;PropertyGroup&gt;
      &lt;PackageTargetFallback&gt;$(PackageTargetFallback);portable-net45+win8+wp8+wpa81;&lt;/PackageTargetFallback&gt;
    &lt;/PropertyGroup&gt;
    &lt;ItemGroup&gt;
      &lt;PackageReference Include="Microsoft.NETCore.App" Version="1.0.1" /&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="1.0.0" /&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.0.1" /&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore.Routing" Version="1.0.1" /&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.0.0" /&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.0.1" /&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.0.0" /&gt;
      &lt;PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.0.0" /&gt;
      &lt;PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.0.0" /&gt;
      &lt;PackageReference Include="Microsoft.Extensions.Logging" Version="1.0.0" /&gt;
      &lt;PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.0.0" /&gt;
      &lt;PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.0.0" /&gt;
      &lt;PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="1.0.0" /&gt;
      &lt;PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink.Loader" Version="14.0.0" /&gt;
    &lt;/ItemGroup&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>Running <code>dotnet --version</code> from the command line returns <code>1.0.0-preview4-004233</code>.</p>
  
  <p>I'm not sure if it's a valid thing to do, but if I change the output DLL's extension to exe and run it, I get a little bit more detail:</p>
  
  <pre><code>Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
     at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
  
     at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
     at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
     at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly&amp; lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType&amp; attributeType, IRuntimeMethodInfo&amp; ctor, Boolean&amp; ctorHasParameters, Boolean&amp; isVarArg)
     at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
     at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType)
     at System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit)
     at System.AppDomain.GetTargetFrameworkName()
  </code></pre>
  
  <p>However, installing <code>System.Runtime</code> NuGet package in this version does not help.</p>
  
  <p>I also have Visual Studio 2015 with .NET Core tools installed on the same machine, could it be an issue?</p>
  
  <p>How do I run ASP.NET Core web apps from VS 2017?</p>