{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/sdk/issues/1403","repository_url":"https://api.github.com/repos/dotnet/sdk","labels_url":"https://api.github.com/repos/dotnet/sdk/issues/1403/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/sdk/issues/1403/comments","events_url":"https://api.github.com/repos/dotnet/sdk/issues/1403/events","html_url":"https://github.com/dotnet/sdk/issues/1403","id":242194935,"number":1403,"title":"IDE shows missing netstandard.dll while build succeeds","user":{"login":"terrajobst","id":5169960,"avatar_url":"https://avatars3.githubusercontent.com/u/5169960?v=3","gravatar_id":"","url":"https://api.github.com/users/terrajobst","html_url":"https://github.com/terrajobst","followers_url":"https://api.github.com/users/terrajobst/followers","following_url":"https://api.github.com/users/terrajobst/following{/other_user}","gists_url":"https://api.github.com/users/terrajobst/gists{/gist_id}","starred_url":"https://api.github.com/users/terrajobst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terrajobst/subscriptions","organizations_url":"https://api.github.com/users/terrajobst/orgs","repos_url":"https://api.github.com/users/terrajobst/repos","events_url":"https://api.github.com/users/terrajobst/events{/privacy}","received_events_url":"https://api.github.com/users/terrajobst/received_events","type":"User","site_admin":false},"labels":[{"id":637711478,"url":"https://api.github.com/repos/dotnet/sdk/labels/Impacts%20VS","name":"Impacts VS","color":"fbca04","default":false},{"id":511264152,"url":"https://api.github.com/repos/dotnet/sdk/labels/Urgency-Soon","name":"Urgency-Soon","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/dotnet/sdk/milestones/6","html_url":"https://github.com/dotnet/sdk/milestone/6","labels_url":"https://api.github.com/repos/dotnet/sdk/milestones/6/labels","id":2219303,"number":6,"title":"2.0.0","description":"","creator":{"login":"srivatsn","id":20570,"avatar_url":"https://avatars0.githubusercontent.com/u/20570?v=3","gravatar_id":"","url":"https://api.github.com/users/srivatsn","html_url":"https://github.com/srivatsn","followers_url":"https://api.github.com/users/srivatsn/followers","following_url":"https://api.github.com/users/srivatsn/following{/other_user}","gists_url":"https://api.github.com/users/srivatsn/gists{/gist_id}","starred_url":"https://api.github.com/users/srivatsn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srivatsn/subscriptions","organizations_url":"https://api.github.com/users/srivatsn/orgs","repos_url":"https://api.github.com/users/srivatsn/repos","events_url":"https://api.github.com/users/srivatsn/events{/privacy}","received_events_url":"https://api.github.com/users/srivatsn/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":138,"state":"open","created_at":"2016-12-28T20:36:28Z","updated_at":"2017-07-12T04:04:57Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2017-07-11T21:51:21Z","updated_at":"2017-07-12T21:36:05Z","closed_at":null,"body":"I’m using the latest (public) version of VS with the latest .NET Core tooling. I’m consuming a .NET Standard 2.0 library from a .NET Framework 4.6.1 project. The project builds and runs just fine, but shows errors in the IDE:\r\n\r\n![Errors in IDEs](https://user-images.githubusercontent.com/5169960/28092473-584c1fb8-6648-11e7-928e-5c3b78fa764f.jpg)\r\n\r\n## Repro steps\r\n\r\n1. Create a .NET Standard 2.0 class library\r\n2. Change the code of `Class1` as follows:\r\n    ```C#\r\n    using System;\r\n\r\n    public class Class1\r\n    {\r\n        public (string key, int value) GetData()\r\n        {\r\n            return (\"Meaning of Life\", 42);\r\n        }\r\n    }\r\n    ```\r\n3. Create a .NET Framework 4.6.1 console app\r\n4. Add a reference to the class library you created earlier\r\n4. Change the code of `Program` as follows:\r\n    ```C#\r\n    using System;\r\n\r\n    class Program\r\n    {\r\n        static void Main(string[] args)\r\n        {\r\n            var c = new Class1();\r\n            var data = c.GetData();\r\n            Console.WriteLine(data);\r\n        }\r\n    }\r\n    ```\r\n\r\n## Expected Behavior\r\n\r\nNo squiggles and no items in the error list.\r\n\r\n## Actual Behavior\r\n\r\nThe error list shows the following errors:\r\n\r\n* CS0012: The type `ValueTuple<,>` is defined in an assembly that is not referenced. You must add a reference to assembly `netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51`.\r\n* CS1503: Argument 1: cannot convert from `(string key, int value)` to `bool`\r\n\r\nHowever, the project compiles & runs fine.\r\n\r\n## Findings\r\n\r\nFrom @davkean\r\n\r\n> It’s very likely the compiler isn’t being given the netstandard.dll via the design-time build. No idea how this gets added to a .NET Framework 4.6.1 project – but whomever adds that dll should investigate. They can get the results of a design-time build: https://github.com/dotnet/project-system/blob/master/docs/design-time-builds.md#getting-visual-studio-to-output-the-results-of-a-design-time-build.\r\n\r\nFrom @nguerrera \r\n\r\n> Please file a bug on dotnet/sdk as that’s where the component that adds the netstandard ref to netframework projects [now lives](https://github.com/dotnet/sdk/blob/release/2.0.0/src/Tasks/Microsoft.NET.Build.Extensions.Tasks/msbuildExtensions/Microsoft/Microsoft.NET.Build.Extensions/Microsoft.NET.Build.Extensions.NETFramework.targets#L23-L25).\r\n \r\n"},"comment":{"url":"https://api.github.com/repos/dotnet/sdk/issues/comments/314904329","html_url":"https://github.com/dotnet/sdk/issues/1403#issuecomment-314904329","issue_url":"https://api.github.com/repos/dotnet/sdk/issues/1403","id":314904329,"user":{"login":"rainersigwald","id":3347530,"avatar_url":"https://avatars2.githubusercontent.com/u/3347530?v=3","gravatar_id":"","url":"https://api.github.com/users/rainersigwald","html_url":"https://github.com/rainersigwald","followers_url":"https://api.github.com/users/rainersigwald/followers","following_url":"https://api.github.com/users/rainersigwald/following{/other_user}","gists_url":"https://api.github.com/users/rainersigwald/gists{/gist_id}","starred_url":"https://api.github.com/users/rainersigwald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rainersigwald/subscriptions","organizations_url":"https://api.github.com/users/rainersigwald/orgs","repos_url":"https://api.github.com/users/rainersigwald/repos","events_url":"https://api.github.com/users/rainersigwald/events{/privacy}","received_events_url":"https://api.github.com/users/rainersigwald/received_events","type":"User","site_admin":false},"created_at":"2017-07-12T21:36:05Z","updated_at":"2017-07-12T21:36:05Z","body":"I think it's a fairly stable extension point (but of course the evidence is against me since it changed in this release).\r\n\r\nI slightly prefer this approach, especially at this point in the cycle.\r\n\r\nIs the value for the metadatum known at project eval time, or is it only computed at build time? If it's known at eval time, you could use an ItemDefinitionGroup for `TargetPathWithTargetPlatformMoniker` in the SDK defining your metadatum."}}
{"actor":{"display_login":"rainersigwald"}}