aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
256 stars 124 forks source link

Asp.net core project successfully builds in VS2015 even if there are errors #888

Closed pantonis closed 7 years ago

pantonis commented 7 years ago

I am using VS2015 Community and I am working on an asp.net core 1.0.1 project. When there are errors and the project compiles successfully. If I run cmd and the dotnet build the errors appear.

I have cleaned everything bin, obj, .vs folders xproj.user files but still the same problem. It is saying that is successfully build but it does not.

Thanks in advance.

guardrex commented 7 years ago

Might want to throw in package cache clearing just to make sure incoherent packages aren't to blame: Either clear the caches manually in %UserProfile%\.nuget\packages\ and %LocalAppData%\Nuget\v3-cache, or you can delete them with the nuget.exe tool (from NuGet.org): nuget locals all -clear.

pantonis commented 7 years ago

@GuardRex I tried what you suggested. Still the same problem

pantonis commented 7 years ago

I found the solution here: #888

Uninstalled all versions of dotnet core sdk and left the latest one only and then deleted the "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.targets" file and did a repair of Microsoft .NET Core 1.0.1- VS 2015 Tooling Preview 2.

That fixed the problem