Creating new blazor application throws an error when run

1

I am following Get started with Blazor. I have created the application and attempt to run it as is i have made no changes.

enter image description here

There are three things in my event log.

  • The directory specified for caching compressed content C:\inetpub\temp\IIS Temporary Compressed Files\Clr4IntegratedAppPool is invalid. Static compression is being disabled.
  • Application 'MACHINE/WEBROOT/APPHOST/WEBAPPLICATION1' with physical root 'C:\Users\LindaL\source\repos\Daimto.RazorTest.Tools\WebApplication1\' failed to start process with commandline 'c:\program files (x86)\microsoft visual studio\2017\professional\common7\ide\extensions\microsoft\web tools\projectsystem\VSIISExeLauncher.exe -argFile "C:\Users\LindaL\AppData\Local\Temp\tmpF272.tmp"', ErrorCode = '0x80004005' : 0.
  • Application 'MACHINE/WEBROOT/APPHOST/WEBAPPLICATION1' with physical root 'C:\Users\LindaL\source\repos\Daimto.RazorTest.Tools\WebApplication1\' failed to start process with commandline 'c:\program files (x86)\microsoft visual studio\2017\professional\common7\ide\extensions\microsoft\web tools\projectsystem\VSIISExeLauncher.exe -argFile "C:\Users\LindaL\AppData\Local\Temp\tmpF272.tmp"', ErrorCode = '0x80004005' : 0.

Note i just update to visual studio professional 2017 15.9.3. I have used blazor before this was working fine.

Update: This appears only in the "Blazor" project type.

Update2: hitting Cntrl-F5 as opposed to just F5 – No change.

Update3 Project file per request in comment in answer below

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <RunCommand>dotnet</RunCommand>
    <RunArguments>blazor serve</RunArguments>
    <LangVersion>7.3</LangVersion>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Blazor.Browser" Version="0.6.0" />
    <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="0.6.0" PrivateAssets="all" />

    <DotNetCliToolReference Include="Microsoft.AspNetCore.Blazor.Cli" Version="0.6.0" />
  </ItemGroup>

</Project>
c#
visual-studio
blazor
asked on Stack Overflow Dec 5, 2018 by DaImTo • edited Dec 6, 2018 by DaImTo

1 Answer

0

Delete global.json and see if that helps.

https://github.com/aspnet/Blazor/issues/1342

If that doesn't help try adding global.json with content

{
  "sdk": {
    "version": "2.1.500"
  }
}

If all fails, close all Visual Studio instances and reinstall Blazor templates with dotnet new -i Microsoft.AspNetCore.Blazor.Templates and create new Blazor solution with dotnet new and use Blazor template you want.

answered on Stack Overflow Dec 5, 2018 by Wanton • edited Dec 6, 2018 by Wanton

User contributions licensed under CC BY-SA 3.0