2017-02-17 88 views
4

尝试使用dotnet watch但刚开了一个错误:没有可执行找到匹配命令 “dotnet的手表”

No executable found matching command "dotnet-watch"

dotnet --version 
1.0.0-rc4-0004834 

安装了.NET 1.1的核心SDK和.NET 1.1核心运行

.csproj文件:

<ItemGroup> 
    <PackageReference Include="Microsoft.AspNetCore" Version="1.0.3" /> 
    <PackageReference Include="Microsoft.DotNet.Cli.Utils" Version="1.0.0-rc4-004771" /> 
    <PackageReference Include="Microsoft.Extensions.CommandLineUtils" Version="1.1.0" /> 
    <PackageReference Include="Microsoft.Extensions.Logging" Version="1.1.0" /> 
    <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.0" /> 
    <PackageReference Include="Microsoft.NETCore.App" Version="1.1.0" /> 
    <PackageReference Include="Microsoft.DotNet.Watcher.Tools" Version="1.1.0-preview4-final" /> 
    </ItemGroup> 

dotnet restore已完成

我该如何解决这个问题?

回答

11

添加Microsoft.DotNet.Watcher.Tools到您的.csproj如下:

<ItemGroup> 
    <DotNetCliToolReference Include="Microsoft.DotNet.Watcher.Tools" Version="1.0.0-msbuild2-final" /> 
</ItemGroup> 

csproj

然后EXCUTE DOTNET恢复和DOTNET手表运行

commandline

+0

哦,谢谢。我应该使用DotNetCliToolReference,我的不好 – Marusyk

相关问题