{"action":"closed","issue":{"url":"https://api.github.com/repos/dotnet/cli/issues/2759","repository_url":"https://api.github.com/repos/dotnet/cli","labels_url":"https://api.github.com/repos/dotnet/cli/issues/2759/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/cli/issues/2759/comments","events_url":"https://api.github.com/repos/dotnet/cli/issues/2759/events","html_url":"https://github.com/dotnet/cli/issues/2759","id":151931634,"number":2759,"title":"Add reference from web app (net452 xproj) to class library (net452 csproj), change class lib to net46, solution builds fine when failure is expected","user":{"login":"balachir","id":8246794,"avatar_url":"https://avatars.githubusercontent.com/u/8246794?v=3","gravatar_id":"","url":"https://api.github.com/users/balachir","html_url":"https://github.com/balachir","followers_url":"https://api.github.com/users/balachir/followers","following_url":"https://api.github.com/users/balachir/following{/other_user}","gists_url":"https://api.github.com/users/balachir/gists{/gist_id}","starred_url":"https://api.github.com/users/balachir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balachir/subscriptions","organizations_url":"https://api.github.com/users/balachir/orgs","repos_url":"https://api.github.com/users/balachir/repos","events_url":"https://api.github.com/users/balachir/events{/privacy}","received_events_url":"https://api.github.com/users/balachir/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/dotnet/cli/milestones/5","html_url":"https://github.com/dotnet/cli/milestone/5","labels_url":"https://api.github.com/repos/dotnet/cli/milestones/5/labels","id":1389772,"number":5,"title":"1.0.0-rtm","description":"2016 (https://github.com/aspnet/Home/wiki/Roadmap)","creator":{"login":"Petermarcu","id":8228359,"avatar_url":"https://avatars.githubusercontent.com/u/8228359?v=3","gravatar_id":"","url":"https://api.github.com/users/Petermarcu","html_url":"https://github.com/Petermarcu","followers_url":"https://api.github.com/users/Petermarcu/followers","following_url":"https://api.github.com/users/Petermarcu/following{/other_user}","gists_url":"https://api.github.com/users/Petermarcu/gists{/gist_id}","starred_url":"https://api.github.com/users/Petermarcu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Petermarcu/subscriptions","organizations_url":"https://api.github.com/users/Petermarcu/orgs","repos_url":"https://api.github.com/users/Petermarcu/repos","events_url":"https://api.github.com/users/Petermarcu/events{/privacy}","received_events_url":"https://api.github.com/users/Petermarcu/received_events","type":"User","site_admin":false},"open_issues":119,"closed_issues":452,"state":"open","created_at":"2015-11-02T19:50:04Z","updated_at":"2017-01-20T07:31:40Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-04-29T17:48:24Z","updated_at":"2017-01-20T07:31:40Z","closed_at":"2017-01-20T07:31:40Z","body":"## Steps to reproduce\n1. New solution with Windows class lib (csproj targeting net451)\n2. Add ASP.NET Core on .NET Framework empty web app (xproj targeting net451)\n3. Add reference from xproj -> csproj, and build : works fine\n4. Change target of class lib from net451 to net46\n5. Build solution\n## Actual behavior\n\nBuild succeeds\n\n```\n1>------ Build started: Project: ClassLibraryOnNetFx1, Configuration: Debug Any CPU ------\n1>  ClassLibraryOnNetFx1 -> C:\\Users\\balach\\Source\\Repos\\balatest01\\ProjectKTestProjects\\Dev14_KRc2\\release.b106\\P2PXprojToCsproj1\\ClassLibraryOnNetFx1\\bin\\Debug\\ClassLibraryOnNetFx1.dll\n2>------ Build started: Project: EmptyWebAppOnAspNetCoreNetFx1, Configuration: Debug Any CPU ------\n2>  C:\\Program Files\\dotnet\\dotnet.exe build \"C:\\Users\\balach\\Source\\Repos\\balatest01\\ProjectKTestProjects\\Dev14_KRc2\\release.b106\\P2PXprojToCsproj1\\EmptyWebAppOnAspNetCoreNetFx1\" --configuration Debug --no-dependencies\n2>  Project EmptyWebAppOnAspNetCoreNetFx1 (.NETFramework,Version=v4.5.2) will be compiled because some of its inputs were newer than its oldest output.\n2>  Compiling EmptyWebAppOnAspNetCoreNetFx1 for .NETFramework,Version=v4.5.2\n2>  Compilation succeeded.\n2>      0 Warning(s)\n2>      0 Error(s)\n2>  Time elapsed 00:00:06.4568436\n2>\n========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========\n```\n## Expected  behavior\n\nBuild fails\n\nIn step (2) above, if you replace the xproj with a Windows console app (csproj targeting net451) instead, and follow the same repro steps, after step (5), you get this error:\n\n```\n1>------ Build started: Project: ClassLibraryOnNetFx1, Configuration: Debug Any CPU ------\n1>  ClassLibraryOnNetFx1 -> C:\\Users\\balach\\Source\\Repos\\balatest01\\ProjectKTestProjects\\Dev14_KRc2\\release.b106\\P2PXprojToCsproj1\\ClassLibraryOnNetFx1\\bin\\Debug\\ClassLibraryOnNetFx1.dll\n2>------ Build started: Project: ConsoleAppOnNetFx1, Configuration: Debug Any CPU ------\n2>C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3274: The primary reference \"C:\\Users\\balach\\Source\\Repos\\balatest01\\ProjectKTestProjects\\Dev14_KRc2\\release.b106\\P2PXprojToCsproj1\\ClassLibraryOnNetFx1\\bin\\Debug\\ClassLibraryOnNetFx1.dll\" could not be resolved because it was built against the \".NETFramework,Version=v4.6\" framework. This is a higher version than the currently targeted framework \".NETFramework,Version=v4.5.2\".\n2>C:\\Users\\balach\\Source\\Repos\\balatest01\\ProjectKTestProjects\\Dev14_KRc2\\release.b106\\P2PXprojToCsproj1\\ConsoleAppOnNetFx1\\Program.cs(13,13,13,33): error CS0246: The type or namespace name 'ClassLibraryOnNetFx1' could not be found (are you missing a using directive or an assembly reference?)\n2>C:\\Users\\balach\\Source\\Repos\\balatest01\\ProjectKTestProjects\\Dev14_KRc2\\release.b106\\P2PXprojToCsproj1\\ConsoleAppOnNetFx1\\Program.cs(13,49,13,69): error CS0246: The type or namespace name 'ClassLibraryOnNetFx1' could not be found (are you missing a using directive or an assembly reference?)\n========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========\n\n```\n"}}
{"actor":{"display_login":"piotrpMSFT"}}