{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/sdk/issues/1502","repository_url":"https://api.github.com/repos/dotnet/sdk","labels_url":"https://api.github.com/repos/dotnet/sdk/issues/1502/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/sdk/issues/1502/comments","events_url":"https://api.github.com/repos/dotnet/sdk/issues/1502/events","html_url":"https://github.com/dotnet/sdk/issues/1502","id":250772163,"number":1502,"title":"Conflict resolution from desktop MSBuild fails to get assembly identity from cross-gen'ed linux binaries","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":[{"id":911539006,"url":"https://api.github.com/repos/dotnet/sdk/labels/Blocking-RTM","name":"Blocking-RTM","color":"e99695","default":false},{"id":412731487,"url":"https://api.github.com/repos/dotnet/sdk/labels/Bug","name":"Bug","color":"ee0701","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":{"login":"dsplaisted","id":145043,"avatar_url":"https://avatars3.githubusercontent.com/u/145043?v=4","gravatar_id":"","url":"https://api.github.com/users/dsplaisted","html_url":"https://github.com/dsplaisted","followers_url":"https://api.github.com/users/dsplaisted/followers","following_url":"https://api.github.com/users/dsplaisted/following{/other_user}","gists_url":"https://api.github.com/users/dsplaisted/gists{/gist_id}","starred_url":"https://api.github.com/users/dsplaisted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsplaisted/subscriptions","organizations_url":"https://api.github.com/users/dsplaisted/orgs","repos_url":"https://api.github.com/users/dsplaisted/repos","events_url":"https://api.github.com/users/dsplaisted/events{/privacy}","received_events_url":"https://api.github.com/users/dsplaisted/received_events","type":"User","site_admin":false},"assignees":[{"login":"dsplaisted","id":145043,"avatar_url":"https://avatars3.githubusercontent.com/u/145043?v=4","gravatar_id":"","url":"https://api.github.com/users/dsplaisted","html_url":"https://github.com/dsplaisted","followers_url":"https://api.github.com/users/dsplaisted/followers","following_url":"https://api.github.com/users/dsplaisted/following{/other_user}","gists_url":"https://api.github.com/users/dsplaisted/gists{/gist_id}","starred_url":"https://api.github.com/users/dsplaisted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsplaisted/subscriptions","organizations_url":"https://api.github.com/users/dsplaisted/orgs","repos_url":"https://api.github.com/users/dsplaisted/repos","events_url":"https://api.github.com/users/dsplaisted/events{/privacy}","received_events_url":"https://api.github.com/users/dsplaisted/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/dotnet/sdk/milestones/8","html_url":"https://github.com/dotnet/sdk/milestone/8","labels_url":"https://api.github.com/repos/dotnet/sdk/milestones/8/labels","id":2386000,"number":8,"title":"2.1.3xx","description":"","creator":{"login":"dsplaisted","id":145043,"avatar_url":"https://avatars3.githubusercontent.com/u/145043?v=4","gravatar_id":"","url":"https://api.github.com/users/dsplaisted","html_url":"https://github.com/dsplaisted","followers_url":"https://api.github.com/users/dsplaisted/followers","following_url":"https://api.github.com/users/dsplaisted/following{/other_user}","gists_url":"https://api.github.com/users/dsplaisted/gists{/gist_id}","starred_url":"https://api.github.com/users/dsplaisted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsplaisted/subscriptions","organizations_url":"https://api.github.com/users/dsplaisted/orgs","repos_url":"https://api.github.com/users/dsplaisted/repos","events_url":"https://api.github.com/users/dsplaisted/events{/privacy}","received_events_url":"https://api.github.com/users/dsplaisted/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":119,"state":"open","created_at":"2017-03-14T19:45:46Z","updated_at":"2018-04-24T01:04:23Z","due_on":null,"closed_at":null},"comments":15,"created_at":"2017-08-16T21:57:18Z","updated_at":"2018-04-24T15:15:50Z","closed_at":null,"author_association":"MEMBER","body":"1. Crete a new console project.\r\n2. Modify the contents to the following.\r\n```\r\n<Project Sdk=\"Microsoft.NET.Sdk\">\r\n\r\n  <PropertyGroup>\r\n    <OutputType>Exe</OutputType>\r\n    <TargetFramework>netcoreapp2.0</TargetFramework>\r\n    <RuntimeIdentifier>centos.7-x64</RuntimeIdentifier>\r\n  </PropertyGroup>\r\n\r\n  <ItemGroup>\r\n    <PackageReference Include=\"System.Threading\" Version=\"4.3.0\" />\r\n  </ItemGroup>\r\n\r\n</Project>\r\n```\r\n\r\n3. dotnet restore\r\n4. dotnet publish --> works correctly\r\n5. msbuild /t:publish --> app will fail to start with a refdef mismatch for System.Threading.  \r\n\r\nThis is because the System.Threading.dll conflict isn't being resolved.  If you examine the log you'll see\r\n```\r\nEncountered conflict between 'CopyLocal:C:\\Users\\ericstj\\.nuget\\packages\\runtime.linux-x64.microsoft.netcore.app\\2.0.0\\runtimes\\linux-x64\\lib\\netcoreapp2.0\\System.Threading.dll' and 'CopyLocal:C:\\Users\\ericstj\\.nuget\\packages\\system.threading\\4.3.0\\lib\\netstandard1.3\\System.Threading.dll'.  Could not determine a winner because 'CopyLocal:C:\\Users\\ericstj\\.nuget\\packages\\runtime.linux-x64.microsoft.netcore.app\\2.0.0\\runtimes\\linux-x64\\lib\\netcoreapp2.0\\System.Threading.dll' is not an assembly.\r\n```\r\n\r\nCompare this to the following in dotnet publish:\r\n```\r\nEncountered conflict between 'CopyLocal:C:\\Users\\ericstj\\.nuget\\packages\\runtime.linux-x64.microsoft.netcore.app\\2.0.0\\runtimes\\linux-x64\\lib\\netcoreapp2.0\\System.Threading.dll' and 'CopyLocal:C:\\Users\\ericstj\\.nuget\\packages\\system.threading\\4.0.11\\lib\\netstandard1.3\\System.Threading.dll'.  Choosing 'CopyLocal:C:\\Users\\ericstj\\.nuget\\packages\\runtime.linux-x64.microsoft.netcore.app\\2.0.0\\runtimes\\linux-x64\\lib\\netcoreapp2.0\\System.Threading.dll' because AssemblyVersion '4.1.0.0' is greater than '4.0.11.0'.\r\n```\r\n\r\nIt would seem that the [desktop implementation](https://github.com/dotnet/sdk/blob/a34f9e69bad5c38a897e7102a16a242a82fa278d/src/Tasks/Common/src/FileUtilities.net45.cs#L13-L22) for getting the assembly version can't handle the cross-gened assemblies, however the [core implementation ](https://github.com/dotnet/sdk/blob/a34f9e69bad5c38a897e7102a16a242a82fa278d/src/Tasks/Common/src/FileUtilities.netstandard.cs#L17-L40) can.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dotnet/sdk/issues/comments/383970829","html_url":"https://github.com/dotnet/sdk/issues/1502#issuecomment-383970829","issue_url":"https://api.github.com/repos/dotnet/sdk/issues/1502","id":383970829,"user":{"login":"dsplaisted","id":145043,"avatar_url":"https://avatars3.githubusercontent.com/u/145043?v=4","gravatar_id":"","url":"https://api.github.com/users/dsplaisted","html_url":"https://github.com/dsplaisted","followers_url":"https://api.github.com/users/dsplaisted/followers","following_url":"https://api.github.com/users/dsplaisted/following{/other_user}","gists_url":"https://api.github.com/users/dsplaisted/gists{/gist_id}","starred_url":"https://api.github.com/users/dsplaisted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsplaisted/subscriptions","organizations_url":"https://api.github.com/users/dsplaisted/orgs","repos_url":"https://api.github.com/users/dsplaisted/repos","events_url":"https://api.github.com/users/dsplaisted/events{/privacy}","received_events_url":"https://api.github.com/users/dsplaisted/received_events","type":"User","site_admin":false},"created_at":"2018-04-24T15:15:50Z","updated_at":"2018-04-24T15:15:50Z","author_association":"MEMBER","body":"@ericstj @weshaggard The platform manifest is only set in Microsoft.NETCore.App.props if the app is not self-contained:\r\n\r\n```xml\r\n  <ItemGroup Condition=\"'$(RuntimeIdentifier)' == '' or '$(SelfContained)' != 'true'\">\r\n    <PackageConflictPlatformManifests Include=\"$(MSBuildThisFileDirectory)Microsoft.NETCore.App.PlatformManifest.txt\" />\r\n  </ItemGroup>\r\n```\r\n\r\nSo we don't have access to it when publishing a self-contained app.  In order to use it for the assembly versions, we'd need the Microsoft.NETCore.App to include it even for self-contained apps (although I'm not sure what other affects that would have on conflict resolution, so it might need to go in a different item so we only use it to get the assembly versions)."}}
{"actor":{"display_login":"dsplaisted"}}