{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/sdk/issues/1562","repository_url":"https://api.github.com/repos/dotnet/sdk","labels_url":"https://api.github.com/repos/dotnet/sdk/issues/1562/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/sdk/issues/1562/comments","events_url":"https://api.github.com/repos/dotnet/sdk/issues/1562/events","html_url":"https://github.com/dotnet/sdk/issues/1562","id":255310803,"number":1562,"title":"Adding item templates doesn't effect the project if EnableDefaultCompileItems is set to false. ","user":{"login":"ericstj","id":8918108,"avatar_url":"https://avatars3.githubusercontent.com/u/8918108?v=4","gravatar_id":"","url":"https://api.github.com/users/ericstj","html_url":"https://github.com/ericstj","followers_url":"https://api.github.com/users/ericstj/followers","following_url":"https://api.github.com/users/ericstj/following{/other_user}","gists_url":"https://api.github.com/users/ericstj/gists{/gist_id}","starred_url":"https://api.github.com/users/ericstj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericstj/subscriptions","organizations_url":"https://api.github.com/users/ericstj/orgs","repos_url":"https://api.github.com/users/ericstj/repos","events_url":"https://api.github.com/users/ericstj/events{/privacy}","received_events_url":"https://api.github.com/users/ericstj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-09-05T15:08:56Z","updated_at":"2017-09-13T05:01:33Z","closed_at":null,"author_association":"MEMBER","body":"Moved from https://github.com/dotnet/project-system/issues/2678\r\n\r\nUsing 15.3 preview 26723.0.d15rel\r\n\r\n1. Create new NETStandard library project.\r\n2. Edit the CSproj to set EnableDefaultCompileItems and manually include class1.cs.  EG:\r\n```xml\r\n<Project Sdk=\"Microsoft.NET.Sdk\">\r\n\r\n  <PropertyGroup>\r\n    <TargetFramework>netstandard1.4</TargetFramework>\r\n    <EnableDefaultCompileItems>false</EnableDefaultCompileItems>\r\n  </PropertyGroup>\r\n\r\n  <ItemGroup>\r\n    <Compile Include=\"Class1.cs\" />\r\n  </ItemGroup>\r\n\r\n</Project>\r\n```\r\n3. Do Add > New Item and select a class.  Name it \"test\".\r\n4. In Class1.cs try to instantiate \"test\".\r\n\r\nExpect: compile works and item is added to csproj.\r\n\r\nActual: added item is missing from project, but appears in the solution hierarchy 😕 \r\nUnloading and reloading the project maintains this state.  The added item remains missing from the project file.  I can't seem to do anything to get the file to disappear from the hierarchy.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dotnet/sdk/issues/comments/329059597","html_url":"https://github.com/dotnet/sdk/issues/1562#issuecomment-329059597","issue_url":"https://api.github.com/repos/dotnet/sdk/issues/1562","id":329059597,"user":{"login":"lifengl","id":11638466,"avatar_url":"https://avatars2.githubusercontent.com/u/11638466?v=4","gravatar_id":"","url":"https://api.github.com/users/lifengl","html_url":"https://github.com/lifengl","followers_url":"https://api.github.com/users/lifengl/followers","following_url":"https://api.github.com/users/lifengl/following{/other_user}","gists_url":"https://api.github.com/users/lifengl/gists{/gist_id}","starred_url":"https://api.github.com/users/lifengl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lifengl/subscriptions","organizations_url":"https://api.github.com/users/lifengl/orgs","repos_url":"https://api.github.com/users/lifengl/repos","events_url":"https://api.github.com/users/lifengl/events{/privacy}","received_events_url":"https://api.github.com/users/lifengl/received_events","type":"User","site_admin":false},"created_at":"2017-09-13T05:01:32Z","updated_at":"2017-09-13T05:01:32Z","author_association":"NONE","body":"Why do we want to show them all the time, even the developer wants to disable the globbing behavior?  How do I disable all the default globbings, if I prefer to list all files by myself to reduce performance hit from globbings?\r\n\r\nOne thing to note that the project system currently doesn't support excluding with @(...). Currently, we don't interpret any msbuild expressions, and leaves them to msbuild.  @(value) was expanded based on the early evaluation, and doesn't work correctly when a new item is added.\r\n\r\nSent from my phone\r\n\r\nOn Sep 12, 2017, at 2:05 PM, Nick Guerrera <notifications@github.com<mailto:notifications@github.com>> wrote:\r\n\r\n\r\nNote that #1157<https://github.com/dotnet/sdk/issues/1157> is related. The requested behavior there is incompatible with the expectation expressed in dotnet/project-system#2678 (comment)<https://github.com/dotnet/project-system/issues/2678#issuecomment-326686534>\r\nWe should specify the correct behavior for .cs|.vb files that are not compiled. If we want them to continue to show in solution explorer as None items, then we should close #1157<https://github.com/dotnet/sdk/issues/1157> and keep only this open.\r\n\r\nRegardless, I think the fix for this issue we should be excluding @(Compile) from default @(None). Currently, we only exclude things that match the default compile glob, and only do so when default compile globbing is on. We probably also want to exclude the other well known items. E.g. Anything in @(EmbeddedResource) already should not be globbed in to @(None) either.\r\n\r\n—\r\nYou are receiving this because you were mentioned.\r\nReply to this email directly, view it on GitHub<https://github.com/dotnet/sdk/issues/1562#issuecomment-328984238>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ALGWwlXQa5FOo57t0W7I2kpkgbX_qsW1ks5shvIggaJpZM4PNF-f>.\r\n"}}
{"actor":{"display_login":"lifengl"}}