Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No error in the error list for incompatible netcoreapp1.1 and netcoreapp2.0 apps #2655

Closed
abpiskunov opened this issue Jul 24, 2017 · 2 comments
Assignees
Labels
Feature-Error-List Reporting compile/build errors, warnings, and messages to the Error List. Tracking Tracking a bug against another repo or a larger thematic issue tracking a group of work.
Milestone

Comments

@abpiskunov
Copy link
Contributor

Repro:

  1. Create a core web app targeting 1.1, and then create a core class lib targeting 2.0.
  2. Try to add core class lib dependency to web app.
  3. wait for restore is complete (it should fail) and build solution

Actual output:

Restoring NuGet packages...
To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages during build.'
NuGet package restore failed.
1>------ Build started: Project: ClassLibrary1, Configuration: Debug Any CPU ------
1>ClassLibrary1 -> C:\Users\antonpis\source\repos\WebApplication2\ClassLibrary1\bin\Debug\netcoreapp2.0\ClassLibrary1.dll
2>------ Build started: Project: WebApplication2, Configuration: Debug Any CPU ------
2>C:\Users\antonpis\source\repos\WebApplication2\WebApplication2\WebApplication2.csproj : error NU1201: Project ClassLibrary1 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Project ClassLibrary1 supports: netcoreapp2.0 (.NETCoreApp,Version=v2.0)
2>C:\Program Files\dotnet\sdk\2.0.0-preview3-006815\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.Common.targets(87,5): error : Project 'C:\Users\antonpis\source\repos\WebApplication2\ClassLibrary1\ClassLibrary1.csproj' targets '.NETCoreApp,Version=v2.0'. It cannot be referenced by a project that targets '.NETCoreApp,Version=v1.1'.
2>Done building project "ClassLibrary1.csproj" -- FAILED.
2>Done building project "WebApplication2.csproj" -- FAILED.
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

And no error : Project 'C:\Users\antonpis\source\repos\WebApplication2\ClassLibrary1\ClassLibrary1.csproj' targets '.NETCoreApp,Version=v2.0'. It cannot be referenced by a project that targets '.NETCoreApp,Version=v1.1'. in the error list.

Expected:

error to be present in the error list since it is in the output.

@davkean davkean added the Bug label Aug 3, 2017
@davkean davkean self-assigned this Aug 3, 2017
@davkean davkean added the Feature-Error-List Reporting compile/build errors, warnings, and messages to the Error List. label Aug 3, 2017
@davkean davkean added this to the 15.5 milestone Aug 3, 2017
@davkean davkean added the Tracking Tracking a bug against another repo or a larger thematic issue tracking a group of work. label Sep 11, 2017
@davkean
Copy link
Member

davkean commented Sep 11, 2017

This is will inadvertently fixed by dotnet/msbuild#1276 - which will pull the error message into the consuming project and hence will show in the Error List.

@Pilchie Pilchie modified the milestones: 15.5, 15.6 Oct 17, 2017
@Pilchie
Copy link
Member

Pilchie commented Dec 22, 2017

Confirmed the error does show in the errrorlist in 15.6 Preview 1 (and presumably 15.5, though I didn't check there).

@Pilchie Pilchie closed this as completed Dec 22, 2017
@drewnoakes drewnoakes removed the Bug label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature-Error-List Reporting compile/build errors, warnings, and messages to the Error List. Tracking Tracking a bug against another repo or a larger thematic issue tracking a group of work.
Projects
None yet
Development

No branches or pull requests

4 participants