8
votes

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

3
The tooling team is working to get tag helpers working again soon. With the changeover form project.json back to .csproj, it reset most of how that feature worked in VS. Sorry I can't give a better answer yet. – Jimmy
I was hoping yesterdays update would fix it but it did not. They still list it as a known issue with no workaround. github.com/aspnet/Tooling/blob/master/known-issues-vs2017.md. – Matthew
Anything new on this since last upgrade? – BriOnH

3 Answers

6
votes

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

2
votes

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.

0
votes

I fixed it in two steps.

1.Install Razor tool from package manager console. It is pre-release for now

Install-Package Microsoft.AspNetCore.Razor.Tools –Pre
  1. Download and install Razor Language Services from marketplace. (Your visual studio instance should be closed)

After restart visual studio, intellisense and coloring should be working for tag helpers.