Skip to content
This repository has been archived by the owner on Apr 11, 2020. It is now read-only.

Latest commit

 

History

History
193 lines (117 loc) · 11.1 KB

known-issues-vs2017-preview.md

File metadata and controls

193 lines (117 loc) · 11.1 KB

Known issues for .NET Core 2.0, ASP.NET Core 2.0, and ASP.NET and Web Tools in the Visual Studio 2017 "Preview" channel

This page is not currently active. The most recent release of Visual Studio 2017 is the stable 15.3 Update, known issues for stable versions of Visual Studio are tracked on the Known issues for .NET Core, ASP.NET Core, and ASP.NET and Web Tools in Visual Studio 2017 page

This page is specifically for issues with the .NET Core and ASP.NET Core 2.0 Previews, and the Visual Studio 2017 Preview. For issues with Visual Studio 2017, or .NET Core/ASP.NET Core 1.x see our Visual Studio 2017 Known Issues page. If you encounter any issues not already captured, you can report them using the Report a Problem tool on our Developer Community site, where you can track the status and see issues reported by others as well.

.NET Core Known Issues

Dependencies node in solution explorer shows with a warning icon until restore is complete

  • Issue:

When you create or open an existing .NET Core or ASP.NET Core project using Visual Studio 2017, the dependencies node shows warnings until all packages are restored and intellisense is ready. See this issue for details.

image

  • Workaround:

Simply wait for package restore to complete and the warnings will go away

Duplicate NuGet warning when a .NET Framework package is installed to a .NET Core 2.0 project

  • Issue:

If you try to install a .NET Framework package to a .NET Core 2.0 or .NET Standard 2.0 project, you get a compatibility warning from NuGet. On subsequent build, there is a duplicate warning that is shown to the user that is essentially the same warning as the first one.

  • Workaround:

No workaround available. The warning is a genuine one but the duplicate warning is a known issue that will be fixed in the next release. If you do not wish to see this warning on your project, you can suppress the warning – NU1701 from Build properties, as shown in image below.

image

Missing NuGet node and package icons

  • Issue:

Users with High DPI monitors may observe missing NuGet icons

image

  • Workaround:

You can resolve this by installing the 15.3.0 Preview 3 update to VS 2017.

Inconsistent build behavior in certain scenarios between Visual Studio and dotnet CLI

  • Issue:

You see inconsistent build behavior between CLI and VS for projects that explicitly define PackageTargetFallback element in csproj file. CLI build fails with errors and VS build doesn’t.

  • Workaround:

We will fix this in the next release. Until then please find and replace PackageTargetFallback with AssetTargetFallback in csproj file.

Live Unit Testing option to start on solution load doesn't work for .NET Core projects

  • Issue:

If you enable "Start Live Unit Testing on solution load", which is an option available in Tools/Options/Live Unit Testing, it doesn't work.

  • Workaround:

No workaround available. You have to manually start Live Unit Testing after the solution loads. We will fix this in the next release.

F# templates are not present in Visual Studio IDE

  • Issue:

F# templates are not present in VS IDE. We will fix this in the next release. You can use dotnet CLI to create F# projects. However there is an issue with F# MVC projects, where you will see a compilation failure.

  • Workaround:

We have fixed the compilation failure in a newer .NET Core SDK build. You can install the latest daily build of the .NET Core SDK from https://github.com/dotnet/cli/tree/release/2.0.0-preview2#build-status by choosing the appropriate package from the Installers and Binaries table.

ASP.NET Core 2.0 and Web Tools Known Issues

Warning in the error list that Microsoft.Composition 1.0.27 was restored in a way that may cause compatibility problems

  • Issue:

When you create a new ASP.NET Core 2.0 project using the Web Application template with 'Individual User Accounts' authentication, or when you use scaffolding to add Minimal Dependencies to an ASP.NET Core 2.0 project created using the Empty template, you get a warning in the error list about Microsoft.Composition 1.0.27 getting restored in a way that may cause compatibility problems.

The package Microsoft.VisualStudio.Web.CodeGeneration.Design depends on Microsoft.CodeAnalysis.Workspaces, which in turn depends on the Microsoft.Composition v 1.0.27 which causes this incompatibility warning.

image

  • Workaround:

None. The warning is benign and can be ignored.

When you drag a file out of wwwroot to the project root, you get error 'Failed to update the project tree'

  • Issue:

In Solution Explorer of an ASP.NET Core project, when you drag an html file (or other file) out of wwwroot to the project root, you get the following error

---------------------------
Microsoft Visual Studio
---------------------------
The project system has encountered an error.
 
Failed to update the project tree.
A diagnostic log has been written to the following location: "C:\Users\<user-name>\AppData\Local\Temp\VsProjectFault_b80d13d6-ca81-4c51-b349-5b1a2af1639f.failure.txt".
---------------------------
OK   
---------------------------
  • Workaround:

Close and re-open the solution. To avoid this issue, use Windows File Explorer to move this item instead of Solution Explorer.

When you create a new ASP.NET Core 2.0 project using the Angular template, there is a warning in Dependencies node

  • Issue:

When you create a new ASP.NET Core 2.0 project using the Angular template, there is a warning in Dependencies node that does not go away for a long time, until the npm packages are fully installed

image

  • Workaround:

Wait until npm packages are fully installed. You can view progress in the 'Bower/npm' pane of the Output Window

Certificate error when trying to apply EF migrations or using code generation

  • Issue:

When trying to apply EF migrations or when using code generation to scaffold code in an ASP.NET Core 2.0 application, you get error: 'No certificate named 'HTTPS' found in configuration for the current environment (Production).

image

  • Workaround:

You can resolve this by installing ASP.NET Core 2.0 Preview 2

Cannot resolve scoped service error when trying to apply EF migrations or during code generation using existing DbContext

  • Issue:

When trying to apply EF migrations at design-time or during a publish, or during code generation, you see an error such as: Cannot resolve scoped service 'WebApplication2.Identity.Data.IdentityServiceDbContext' from root provider – even when ASPNETCORE_ENVIRONMENT is set to Development.

image

OR

image

  • Workaround:

You can resolve this by installing ASP.NET Core 2.0 Preview 2

Add-Migration command fails with Exception calling "Substring"

  • Issue:

In an ASP.NET Core 2.0 project, when trying to use the NuGet Package Manager Console to add migrations using Add-Migration cmdlet or Update-Database, you get the following error :

Add-Migration : Exception calling "Substring" with "1" argument(s): "StartIndex cannot be less than zero.
Parameter name: startIndex"

image

  • Workaround:

You can resolve this by installing ASP.NET Core 2.0 Preview 2

After re-targeting ASP.NET Core 1.1 application to 2.0, you get package downgrade warnings related to BrowserLink

  • Issue:

When you re-target your existing ASP.NET Core 1.1 application to ASP.NET Core 2.0, you might run into the many package downgrade warnings of the form. When you F5, the page fails to load with a HTTP Error 502.3 - Bad Gateway.

Detected package downgrade: System.Net.Sockets from 4.3.0 to 4.1.0 WebApp_Anc11_core_NoAuth_1 (>= 1.0.0) -> Microsoft.VisualStudio.Web.BrowserLink (>= 1.1.0) -> Microsoft.AspNetCore.Hosting.Abstractions (>= 1.1.0) -> NETStandard.Library (>= 1.6.1) -> System.Net.Sockets (>= 4.3.0) WebApp_Anc11_core_NoAuth_1 (>= 1.0.0) -> Microsoft.VisualStudio.Web.BrowserLink (>= 1.1.0) -> System.Net.Sockets (>= 4.1.0)
  • Workaround:

You can resolve this by installing ASP.NET Core 2.0 Preview 2

ASP.NET Core 1 and Web Tools Known Issues

After installing update to Visual Studio and publishing a ASP.NET Core 1.1 application, you get a HTTP Error 502.5 on the published application

  • Issue:

Visual Studio 2017 (version 15.3) Preview installs the .NET Core 1.1.2 runtime. When you build and publish ASP.NET Core 1.1 application using this version of Visual Studio, the application is built against the 1.1.2 runtime. If the web server does not have the 1.1.2 runtime, then you get HTTP Error 502.5

  • Workaround:

Install the 1.1.2 runtime on the web server

After opening ASP.NET Core 1.1 solution, you see warnings in Dependencies node in Solution Explorer

  • Issue:

When you open a pre-built ASP.NET Core 1.1 application after installing the latest update to Visual Studio, you might run into the following issue where you see warnings in Dependencies node in Solution Explorer. The warnings do not go away even after restore completes.

  • Workaround:

Close and re-open the solution. The warnings should go away.

Bower packages are not automatically restored after adding full dependencies to an ASP.NET Core 1.1 application created using Empty template

  • Issue:

If you try to add full dependencies to an ASP.NET Core 1.1 application created using Empty template, the warning sign doesn't go away from dependencies node for Bower packages

image

  • Workaround:

Right-click Bower node and restore packages