{"action":"reopened","issue":{"url":"https://api.github.com/repos/NuGet/Home/issues/766","labels_url":"https://api.github.com/repos/NuGet/Home/issues/766/labels{/name}","comments_url":"https://api.github.com/repos/NuGet/Home/issues/766/comments","events_url":"https://api.github.com/repos/NuGet/Home/issues/766/events","html_url":"https://github.com/NuGet/Home/issues/766","id":87417630,"number":766,"title":"nuget pack on csproj files doesn't work in tfs","user":{"login":"mikeholcomb","id":12836155,"avatar_url":"https://avatars.githubusercontent.com/u/12836155?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeholcomb","html_url":"https://github.com/mikeholcomb","followers_url":"https://api.github.com/users/mikeholcomb/followers","following_url":"https://api.github.com/users/mikeholcomb/following{/other_user}","gists_url":"https://api.github.com/users/mikeholcomb/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeholcomb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeholcomb/subscriptions","organizations_url":"https://api.github.com/users/mikeholcomb/orgs","repos_url":"https://api.github.com/users/mikeholcomb/repos","events_url":"https://api.github.com/users/mikeholcomb/events{/privacy}","received_events_url":"https://api.github.com/users/mikeholcomb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/NuGet/Home/milestones/12","html_url":"https://github.com/NuGet/Home/milestones/Client-VNext","labels_url":"https://api.github.com/repos/NuGet/Home/milestones/12/labels","id":1107554,"number":12,"title":"Client-VNext","description":"This is the place of the issues we intend to consider in one of the future versions.\r\n\r\nPlacing an issue here does not mean we intend to act on it, it means it looks promising enough to have a deeper dive into it, or that we don't have it planned for the current or one of the planned future releases.","creator":{"login":"yishaigalatzer","id":1238711,"avatar_url":"https://avatars.githubusercontent.com/u/1238711?v=3","gravatar_id":"","url":"https://api.github.com/users/yishaigalatzer","html_url":"https://github.com/yishaigalatzer","followers_url":"https://api.github.com/users/yishaigalatzer/followers","following_url":"https://api.github.com/users/yishaigalatzer/following{/other_user}","gists_url":"https://api.github.com/users/yishaigalatzer/gists{/gist_id}","starred_url":"https://api.github.com/users/yishaigalatzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yishaigalatzer/subscriptions","organizations_url":"https://api.github.com/users/yishaigalatzer/orgs","repos_url":"https://api.github.com/users/yishaigalatzer/repos","events_url":"https://api.github.com/users/yishaigalatzer/events{/privacy}","received_events_url":"https://api.github.com/users/yishaigalatzer/received_events","type":"User","site_admin":false},"open_issues":133,"closed_issues":6,"state":"open","created_at":"2015-05-12T21:08:40Z","updated_at":"2015-11-23T17:02:37Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2015-06-11T17:12:13Z","updated_at":"2015-11-23T17:02:37Z","closed_at":null,"body":"Porting issue 3645 from http://nuget.codeplex.com/workitem/3645\r\n\r\n-\r\nI use the nuget pack command inside msbuild to create nuget packages during tfs build\r\n```xml\r\n    <Target Name=\"AfterBuild\">\r\n      <Exec WorkingDirectory=\"$(OutputPath)\" Command=\"$(NuGetCommand) pack \"%(ProjectReference.FullPath)\" -BasePath \"$(OutputPath) \" -Exclude **\\*.xml -Verbosity detailed\" />\r\n    </Target>\r\n```\r\nThis works great in visual studio, but in tfs the outputpath of the csproj changes so this error occurs:\r\n```\r\nNuGet.CommandLineException: Unable to find 'd:\\Builds\\18\\232\\src\\Foo\\Binaries\\Debug\\Foo.dll'. Make sure the project has been built.\r\n            at NuGet.Commands.ProjectFactory.BuildProject()\r\n            at NuGet.Commands.ProjectFactory.CreateBuilder(String basePath)\r\n            at NuGet.Commands.PackCommand.BuildFromProjectFile(String path)\r\n            at NuGet.Commands.PackCommand.BuildPackage(String path)\r\n            at NuGet.Commands.PackCommand.ExecuteCommand()\r\n            at NuGet.Commands.Command.Execute()\r\n            at NuGet.Program.Main(String[] args)\r\n```\r\nThe correct path would be d:\\Builds\\18\\232\\bin\\Foo.dll which is defined by tfs in $OutDir \r\nSo I tried to workaround by adding this to the csproj file:\r\n\r\n```xml\r\n<PropertyGroup Condition=\"$(OutDir) != '' \">\r\n    <OutputPath>$(OutDir)</OutputPath>\r\n</PropertyGroup>\r\n```\r\n-\r\n\r\nThis normally solves the problem but nuget pack still tries to find the files in binaries\\debug so it seems it doesn't really use the msbuild outputpath variable.\r\n\r\n"}}