payload: {"action":"closed","issue":{"url":"https://api.github.com/repos/xamarin/xamarin-macios/issues/7663","repository_url":"https://api.github.com/repos/xamarin/xamarin-macios","labels_url":"https://api.github.com/repos/xamarin/xamarin-macios/issues/7663/labels{/name}","comments_url":"https://api.github.com/repos/xamarin/xamarin-macios/issues/7663/comments","events_url":"https://api.github.com/repos/xamarin/xamarin-macios/issues/7663/events","html_url":"https://github.com/xamarin/xamarin-macios/issues/7663","id":543970422,"node_id":"MDU6SXNzdWU1NDM5NzA0MjI=","number":7663,"title":"Error MT2101: Can't resolve the reference 'System.Security.Cryptography.Pkcs.SignedCms'","user":{"login":"vsfeedback","id":32854332,"node_id":"MDQ6VXNlcjMyODU0MzMy","avatar_url":"https://avatars3.githubusercontent.com/u/32854332?v=4","gravatar_id":"","url":"https://api.github.com/users/vsfeedback","html_url":"https://github.com/vsfeedback","followers_url":"https://api.github.com/users/vsfeedback/followers","following_url":"https://api.github.com/users/vsfeedback/following{/other_user}","gists_url":"https://api.github.com/users/vsfeedback/gists{/gist_id}","starred_url":"https://api.github.com/users/vsfeedback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsfeedback/subscriptions","organizations_url":"https://api.github.com/users/vsfeedback/orgs","repos_url":"https://api.github.com/users/vsfeedback/repos","events_url":"https://api.github.com/users/vsfeedback/events{/privacy}","received_events_url":"https://api.github.com/users/vsfeedback/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-12-30T18:27:53Z","updated_at":"2019-12-30T18:35:04Z","closed_at":"2019-12-30T18:35:04Z","author_association":"NONE","body":"_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/content/problem/861186/error-mt2101-cant-resolve-the-reference-systemsecu.html)._\r\n\r\nSteps to reproduce:\r\n\r\n- Download and extract sample from user (reduced in size)\r\n[ErrorSample.zip](https://github.com/xamarin/xamarin-macios/files/4010640/ErrorSample.zip)\r\n- Build\r\n- Error:\r\n\r\n```\r\n/Library/Frameworks/Mono.framework/Versions/6.4.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2126,5): warning MSB3276: Found conflicts between different versions of the same dependent assembly. Please set the \"AutoGenerateBindingRedirects\" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190.\r\nMTOUCH : warning MT0109: The assembly 'System.Security.Cryptography.Pkcs.dll' was loaded from a different path than the provided path (provided path: /Users/donblas/.nuget/packages/system.security.cryptography.pkcs/4.7.0/runtimes/win/lib/netstandard2.1/System.Security.Cryptography.Pkcs.dll, actual path: /Users/donblas/Programming/macios/master/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.iOS/Facades/System.Security.Cryptography.Pkcs.dll).\r\nMTOUCH : error MT2002: Failed to resolve \"System.Security.Cryptography.Pkcs.SignedCms\" reference from \"System.Security.Cryptography.Pkcs, Version=4.0.3.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\"\r\n```\r\n\r\nFull Log: https://gist.github.com/chamons/53339ab1b25b0ca533b04525a6c62027\r\n\r\n\r\n\r\n---\r\nWhen I add the nuget package System.Security.Cryptography.Pkcs version 4.7.0 found here:\r\n\r\nhttps://www.nuget.org/packages/System.Security.Cryptography.Pkcs/\r\n\r\nI get the following build error:\r\n\r\nError MT2101: Can't resolve the reference 'System.Security.Cryptography.Pkcs.SignedCms'\r\n\r\nI didn’t notice this until I tried to deploy to my phone as it all worked fine on the emulator.  However, I’ve found if I turn off Linking it all works - even on my phone.  However, this seems dangerous and I’m afraid of issues it could cause down the road.\r\n\r\n---\r\n### Original Comments\r\n\r\n#### Stephen Huff on 12/18/2019, 00:20 PM: \r\n\r\n<p>BTW this is the full error:</p><p>/Users/shuff/Development/shuff_Branch/DocExMobile/DocExMobile.iOS/MTOUCH: Error MT2101: Can't resolve the reference 'System.Security.Cryptography.Pkcs.SignedCms', referenced from the method 'System.Void MsgReader.Outlook.Storage/Message::ProcessSignedContent(System.Byte[])' in 'System.Security.Cryptography.Pkcs, Version=4.0.3.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. (MT2101) (DocExMobile.iOS)\r\n</p><p>I tried adding the following to \"Additional mtouch arguments\"</p><p>--linkskip=System.Security.Cryptography.Pkcs</p><p>but it still errors with \"Link Framework SDKs Only\" picked.  The only work around is \"Don't Link\"</p>\r\n\r\n#### Visual Studio Feedback System on 12/19/2019, 01:20 AM: \r\n\r\n<p>We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.</p>\r\n\r\n#### Chris Hamons [MSFT] on 12/23/2019, 04:40 PM: \r\n\r\n<p>I have attempted to reproduce your issue in the current stable with:</p>\r\n<ul>\r\n<li>New iOS Single View Project</li>\r\n<li>Add System.Security.Cryptography.Pkcs nuget</li>\r\n<li>Build Release (Generic Device)</li>\r\n</ul>\r\n<p>and it builds fine for me.</p>\r\n<p>Please attach a sample project showing the issue.</p>\r\n\r\n#### Stephen Huff on 12/24/2019, 10:45 PM: \r\n\r\n<p>I've tried reproducing it in a sample project and have not been able to - is there a way I can privately share the entire project that produces the error with you?</p>\r\n\r\n#### Stephen Huff on 12/24/2019, 11:18 PM: \r\n\r\n<p>I got it to error in a test project after all by creating it in the same way and adding all the same references.  I originally created my project in Visual Studio 2019 on Windows and then moved it to the Mac - I did the same for this project.  I then added all the exact same references but didn't get the error until I added the using statement and created the line:</p><p> var signedCms = new SignedCms()</p><p>in MainPage.Xaml.cs . That and the using statement are the only differences between what Visual Studio 2019 created in Windows and what I changed on the Mac (other then setting the Debug project to \"Link Framework SDKs Only\").<a target='_blank' href=\"https://developercommunity.visualstudio.com/storage/attachments/111377-errorsample.zip\">errorsample.zip</a></p>\r\n\r\n\r\n---\r\n### Original Solutions\r\n(no solutions)"}}
other: {"actor":{"display_login":"chamons"}}