{"action":"created","issue":{"url":"https://api.github.com/repos/nunit/nunit3-vs-adapter/issues/327","repository_url":"https://api.github.com/repos/nunit/nunit3-vs-adapter","labels_url":"https://api.github.com/repos/nunit/nunit3-vs-adapter/issues/327/labels{/name}","comments_url":"https://api.github.com/repos/nunit/nunit3-vs-adapter/issues/327/comments","events_url":"https://api.github.com/repos/nunit/nunit3-vs-adapter/issues/327/events","html_url":"https://github.com/nunit/nunit3-vs-adapter/issues/327","id":228228609,"number":327,"title":"Latest Mono produces Portable .pdb instead of .mdb(Mono.Cecil update required)","user":{"login":"DavidKarlas","id":774791,"avatar_url":"https://avatars0.githubusercontent.com/u/774791?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidKarlas","html_url":"https://github.com/DavidKarlas","followers_url":"https://api.github.com/users/DavidKarlas/followers","following_url":"https://api.github.com/users/DavidKarlas/following{/other_user}","gists_url":"https://api.github.com/users/DavidKarlas/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidKarlas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidKarlas/subscriptions","organizations_url":"https://api.github.com/users/DavidKarlas/orgs","repos_url":"https://api.github.com/users/DavidKarlas/repos","events_url":"https://api.github.com/users/DavidKarlas/events{/privacy}","received_events_url":"https://api.github.com/users/DavidKarlas/received_events","type":"User","site_admin":false},"labels":[{"id":190575673,"url":"https://api.github.com/repos/nunit/nunit3-vs-adapter/labels/is:bug","name":"is:bug","color":"ee0701","default":false},{"id":195172658,"url":"https://api.github.com/repos/nunit/nunit3-vs-adapter/labels/pri:high","name":"pri:high","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2017-05-12T08:56:00Z","updated_at":"2017-06-29T01:49:53Z","closed_at":null,"body":"Latest Mono is producing Portable .pdb instead of .mdb by default, resulting in this exception:\r\n```\r\n System.IO.FileNotFoundException: Could not find file \"/Users/davidkarlas/Projects/nunit24214asf/nunit24214asf/bin/Debug/nunit24214asf.dll.mdb\".\r\nFile name: '/Users/davidkarlas/Projects/nunit24214asf/nunit24214asf/bin/Debug/nunit24214asf.dll.mdb'\r\n  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00195] in /private/tmp/source-mono-2017-04/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:232 \r\n  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in /private/tmp/source-mono-2017-04/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:149 \r\n  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in /private/tmp/source-mono-2017-04/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:86 \r\n  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess)\r\n  at Mono.CompilerServices.SymbolWriter.MonoSymbolFile.ReadSymbolFile (System.String mdbFilename) [0x00000] in <682b0e3580fe403dad53adbaea0f93fd>:0 \r\n  at Mono.CompilerServices.SymbolWriter.MonoSymbolFile.ReadSymbolFile (System.String mdbFilename, System.Guid assemblyGuid) [0x00000] in <682b0e3580fe403dad53adbaea0f93fd>:0 \r\n  at Mono.Cecil.Mdb.MdbReaderProvider.GetSymbolReader (Mono.Cecil.ModuleDefinition module, System.String fileName) [0x00012] in <682b0e3580fe403dad53adbaea0f93fd>:0 \r\n  at Mono.Cecil.ModuleReader.ReadSymbols (Mono.Cecil.ModuleDefinition module, Mono.Cecil.ReaderParameters parameters) [0x00032] in <ce25e56d9faa4073b3cc14996c972301>:0 \r\n  at Mono.Cecil.ModuleReader.CreateModuleFrom (Mono.Cecil.PE.Image image, Mono.Cecil.ReaderParameters parameters) [0x00042] in <ce25e56d9faa4073b3cc14996c972301>:0 \r\n  at Mono.Cecil.ModuleDefinition.ReadModule (System.IO.Stream stream, Mono.Cecil.ReaderParameters parameters) [0x00028] in <ce25e56d9faa4073b3cc14996c972301>:0 \r\n  at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0000a] in <ce25e56d9faa4073b3cc14996c972301>:0 \r\n  at NUnit.VisualStudio.TestAdapter.NavigationDataProvider.CacheNewTypes (System.String assemblyPath, System.Collections.Generic.IDictionary`2[TKey,TValue] types) [0x0003b] in <e1110a31ce52442d931c91db5aa14a6a>:0 \r\n  at NUnit.VisualStudio.TestAdapter.NavigationDataProvider.CacheTypes (System.String assemblyPath) [0x00006] in <e1110a31ce52442d931c91db5aa14a6a>:0 \r\n  at NUnit.VisualStudio.TestAdapter.NavigationDataProvider.GetNavigationData (System.String className, System.String methodName) [0x00015] in <e1110a31ce52442d931c91db5aa14a6a>:0 \r\n  at NUnit.VisualStudio.TestAdapter.TestConverter.MakeTestCaseFromXmlNode (System.Xml.XmlNode testNode) [0x00058] in <e1110a31ce52442d931c91db5aa14a6a>:0 \r\n  at NUnit.VisualStudio.TestAdapter.TestConverter.ConvertTestCase (System.Xml.XmlNode testNode) [0x0004c] in <e1110a31ce52442d931c91db5aa14a6a>:0 \r\n  at NUnit.VisualStudio.TestAdapter.NUnit3TestDiscoverer.ProcessTestCases (System.Xml.XmlNode topNode, Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter.ITestCaseDiscoverySink discoverySink, NUnit.VisualStudio.TestAdapter.TestConverter testConverter) [0x00021] in <e1110a31ce52442d931c91db5aa14a6a>:0\r\n```\r\n\r\nSolution should be pretty simple, update to Mono.Cecil to 0.10 version(notice that it's still in beta NuGet feed) https://www.nuget.org/packages/Mono.Cecil/0.10.0-beta5 since Cecil autodetects and reads portable .pdb https://github.com/jbevain/cecil/blob/a2314c895987ee801a0c3e32dac05f5399beda37/Mono.Cecil.Cil/Symbols.cs#L726\r\n\r\nMaybe also consider not failing to discover/run tests if .pdb/.mdb is not found.\r\n"},"comment":{"url":"https://api.github.com/repos/nunit/nunit3-vs-adapter/issues/comments/311839685","html_url":"https://github.com/nunit/nunit3-vs-adapter/issues/327#issuecomment-311839685","issue_url":"https://api.github.com/repos/nunit/nunit3-vs-adapter/issues/327","id":311839685,"user":{"login":"rprouse","id":493828,"avatar_url":"https://avatars3.githubusercontent.com/u/493828?v=3","gravatar_id":"","url":"https://api.github.com/users/rprouse","html_url":"https://github.com/rprouse","followers_url":"https://api.github.com/users/rprouse/followers","following_url":"https://api.github.com/users/rprouse/following{/other_user}","gists_url":"https://api.github.com/users/rprouse/gists{/gist_id}","starred_url":"https://api.github.com/users/rprouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rprouse/subscriptions","organizations_url":"https://api.github.com/users/rprouse/orgs","repos_url":"https://api.github.com/users/rprouse/repos","events_url":"https://api.github.com/users/rprouse/events{/privacy}","received_events_url":"https://api.github.com/users/rprouse/received_events","type":"User","site_admin":false},"created_at":"2017-06-29T01:49:53Z","updated_at":"2017-06-29T01:49:53Z","body":"@DavidKarlas sorry, no progress on this although the workaround works. It is fixed for .NET Core projects. I tried several different approaches, but the root issue is that the NUnit engine uses an older version of Mono.Cecil that targets .NET 2.0 so we can continue to run older tests under their target framework. Unfortunately, the version of Mono.Cecil that fixes this no longer targets .NET 2.0.\r\n\r\nWe as a team are going to have to decide how we are going to tackle this. One option would be to update the engine to .NET 3.5, but that would drop support for running tests under .NET 2.0. We could still run .NET 2.0 tests, but they would run under 3.5.\r\n\r\nAnother possible option is to start using DiaSession again in the adapter. I tried a branch with this without much luck.\r\n\r\n@nunit/core-team and @nunit/engine-team what are your thoughts on this? I think that this is at root an Engine issue since it is the engine that is putting the constraints on the adapter."}}
{"actor":{"display_login":"rprouse"}}