{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/cli/issues/1199","repository_url":"https://api.github.com/repos/dotnet/cli","labels_url":"https://api.github.com/repos/dotnet/cli/issues/1199/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/cli/issues/1199/comments","events_url":"https://api.github.com/repos/dotnet/cli/issues/1199/events","html_url":"https://github.com/dotnet/cli/issues/1199","id":131007019,"number":1199,"title":"dotnet build of app+library fail (exception) if library pdb doesnt exists","user":{"login":"enricosada","id":147243,"avatar_url":"https://avatars.githubusercontent.com/u/147243?v=3","gravatar_id":"","url":"https://api.github.com/users/enricosada","html_url":"https://github.com/enricosada","followers_url":"https://api.github.com/users/enricosada/followers","following_url":"https://api.github.com/users/enricosada/following{/other_user}","gists_url":"https://api.github.com/users/enricosada/gists{/gist_id}","starred_url":"https://api.github.com/users/enricosada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enricosada/subscriptions","organizations_url":"https://api.github.com/users/enricosada/orgs","repos_url":"https://api.github.com/users/enricosada/repos","events_url":"https://api.github.com/users/enricosada/events{/privacy}","received_events_url":"https://api.github.com/users/enricosada/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-03T12:16:07Z","updated_at":"2016-02-04T09:25:30Z","closed_at":null,"body":"App reference a library project ( example is `test/FSharpTestProjects/TestApp` or `test/TestProjects/TestApp` )\r\n\r\nthe f# compiler (and dotnet-compile-fsc) doesnt create .pdb files atm (not supported, wip).\r\n\r\nThis error it's a regression because before the `dotnet build` of app+library worked ok, now the library .pdb is expected and a bad `System.IO.FileNotFoundException` expection is raised if not exists (at least that should be an error message)\r\n\r\nA feedback, maybe it's useful to create two helper methods in this repo:\r\n\r\n- `FileHelper.CopyRequired(source,to,errorMessage)` => raise error message if source file doesnt exists\r\n- `FileHelper.CopyOptional(source,to)` => no error if source file doesnt exists\r\n\r\nAnd review current code to use only these two, not directly `File.Copy`. \r\n\r\n\r\nI can trace commit but it's not important. \r\n\r\nWhat's a possible fix?\r\n\r\n1. copy pdb only if exists\r\n2. error message if pdb doesnt exists **and it's enabled in project.json** (it's possible to disable pdb in project.json?)\r\n\r\n\r\nthe example:\r\n\r\n```\r\nPS D:\\github\\cli\\test\\FSharpTestProjects\\TestApp> dotnet build\r\nCompiling TestLibrary for DNXCore,Version=v5.0\r\n\r\nCompilation succeeded.\r\n    0 Warning(s)\r\n    0 Error(s)\r\n\r\nTime elapsed 00:00:05.9888705\r\nCompiling TestApp for DNXCore,Version=v5.0\r\n\r\nCompilation succeeded.\r\n    0 Warning(s)\r\n    0 Error(s)\r\n\r\nTime elapsed 00:00:05.4152821\r\nSystem.IO.FileNotFoundException: Could not find file 'D:\\github\\cli\\test\\FSharpTestProjects\\TestLibrary\\bin\\Debug\\dnxcor\r\ne50\\TestLibrary.pdb'.\r\nFile name: 'D:\\github\\cli\\test\\FSharpTestProjects\\TestLibrary\\bin\\Debug\\dnxcore50\\TestLibrary.pdb'\r\n   at System.IO.Win32FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite)\r\n   at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite)\r\n   at Microsoft.DotNet.Cli.Compiler.Common.LibraryExporterExtensions.CopyTo(IEnumerable`1 assets, String destinationPath\r\n)\r\n   at Microsoft.Dotnet.Cli.Compiler.Common.Executable.WriteDepsFileAndCopyProjectDependencies(LibraryExporter exporter,\r\nString projectFileName, String outputPath)\r\n   at Microsoft.Dotnet.Cli.Compiler.Common.Executable.MakeCompilationOutputRunnableForCoreCLR(String outputPath, Library\r\nExporter exporter)\r\n   at Microsoft.Dotnet.Cli.Compiler.Common.Executable.ExportRuntimeAssets(String outputPath, String configuration)\r\n   at Microsoft.Dotnet.Cli.Compiler.Common.Executable.MakeCompilationOutputRunnable(String configuration)\r\n   at Microsoft.DotNet.Tools.Build.CompileContext.MakeRunnableIfNecessary()\r\n   at Microsoft.DotNet.Tools.Build.CompileContext.InvokeCompileOnRootProject()\r\n   at Microsoft.DotNet.Tools.Build.CompileContext.Compile(Boolean incremental)\r\n   at Microsoft.DotNet.Tools.Build.BuildCommand.<>c__DisplayClass1_0.<OnExecute>b__2(CompileContext c)\r\n   at System.Linq.Enumerable.All[TSource](IEnumerable`1 source, Func`2 predicate)\r\n   at Microsoft.DotNet.Tools.Build.BuildCommand.OnExecute(List`1 contexts, CompilerCommandApp args)\r\n   at Microsoft.DotNet.Tools.Compiler.CompilerCommandApp.<>c__DisplayClass70_0.<Execute>b__0()\r\n   at Microsoft.Dnx.Runtime.Common.CommandLine.CommandLineApplication.Execute(String[] args)\r\n   at Microsoft.DotNet.Tools.Compiler.CompilerCommandApp.Execute(OnExecute execute, String[] args)\r\n   at Microsoft.DotNet.Tools.Build.BuildCommand.Run(String[] args)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/dotnet/cli/issues/comments/179728033","html_url":"https://github.com/dotnet/cli/issues/1199#issuecomment-179728033","issue_url":"https://api.github.com/repos/dotnet/cli/issues/1199","id":179728033,"user":{"login":"enricosada","id":147243,"avatar_url":"https://avatars.githubusercontent.com/u/147243?v=3","gravatar_id":"","url":"https://api.github.com/users/enricosada","html_url":"https://github.com/enricosada","followers_url":"https://api.github.com/users/enricosada/followers","following_url":"https://api.github.com/users/enricosada/following{/other_user}","gists_url":"https://api.github.com/users/enricosada/gists{/gist_id}","starred_url":"https://api.github.com/users/enricosada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enricosada/subscriptions","organizations_url":"https://api.github.com/users/enricosada/orgs","repos_url":"https://api.github.com/users/enricosada/repos","events_url":"https://api.github.com/users/enricosada/events{/privacy}","received_events_url":"https://api.github.com/users/enricosada/received_events","type":"User","site_admin":false},"created_at":"2016-02-04T09:25:30Z","updated_at":"2016-02-04T09:25:30Z","body":"thx @davidfowl i'll send a pr"}}