Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

taghelpers intellisense not working in Preview5

I downloaded and installed latest .NET Core:

dotnet --version
1.0.0-preview5-004478

I also updated my AspNetCore project's package references:

<PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp1.1</TargetFramework>
    <PreserveCompilationContext>true</PreserveCompilationContext>
  </PropertyGroup>
  <ItemGroup>
    <Folder Include="wwwroot\" />
  </ItemGroup>
<ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.0" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.TagHelpers" Version="1.1.0" />
    <PackageReference Include="Microsoft.NETCore.App" Version="1.1.0" />
    <PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="1.1.0" />
    <PackageReference Include="Microsoft.AspNetCore.Razor.Tools" Version="1.1.0-preview4-final" />
    <PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.1.0" />
    <PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.1.0" />
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="1.1.0" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="1.1.0-preview4-final" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.1.0-preview4-final" />
    <PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.1.0" />
    <PackageReference Include="Microsoft.Extensions.Configuration.Json" 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.Extensions.Logging.Debug" Version="1.1.0" />
    <PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="1.1.0" />
    <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="1.1.0" />
    <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.Design" Version="1.1.0" />   </ItemGroup>

It seems like tooling not working well yet for the latest versions. For example when I try to run dotnet ef it complains about missing project.json - which is depricated now.

I'm using Visual Studio 2017 Community RC and the integrated PM console can run add-migration, update-database,... so I don't care about missing dotnet ef support but if you had any idea of any workaround I would appreciate that becasue I also like to work with VS Code instead of the Studio.

My problem is now I try to build an ASP.Core MVC website with heavy usage of tag helpers. But the intellisense not working for that:

no-tag-helper

like image 568
ggabor Avatar asked Jan 15 '17 06:01

ggabor


2 Answers

There is a known issue for VS2017 https://github.com/aspnet/Tooling/blob/master/known-issues-vs2017.md#tag-helpers-do-not-work and it links to a workaround "Install the Razor Language Service extension"

Update:

For the new release of Visual Studio 2017 Preview 15.3 (and from now on, i supposed) the razor language service is selected as a component inside the Visual Studio instalation process when you select the ASP.NET and web development workload

like image 72
animalito maquina Avatar answered Nov 15 '22 22:11

animalito maquina


For Visual studio 17' you need to install this extension and it will work.

https://marketplace.visualstudio.com/items?itemName=ms-madsk.RazorLanguageServices

If you made the app with an MVC template, you don't have to install anything else from NuGet.

like image 34
Talnaci Sergiu Vlad Avatar answered Nov 15 '22 21:11

Talnaci Sergiu Vlad