{"action":"created","issue":{"url":"https://api.github.com/repos/NuGet/Home/issues/1477","labels_url":"https://api.github.com/repos/NuGet/Home/issues/1477/labels{/name}","comments_url":"https://api.github.com/repos/NuGet/Home/issues/1477/comments","events_url":"https://api.github.com/repos/NuGet/Home/issues/1477/events","html_url":"https://github.com/NuGet/Home/issues/1477","id":108735241,"number":1477,"title":"Project that find themselves at varying nesting depths cannot find `packages/`","user":{"login":"kkm000","id":8228229,"avatar_url":"https://avatars.githubusercontent.com/u/8228229?v=3","gravatar_id":"","url":"https://api.github.com/users/kkm000","html_url":"https://github.com/kkm000","followers_url":"https://api.github.com/users/kkm000/followers","following_url":"https://api.github.com/users/kkm000/following{/other_user}","gists_url":"https://api.github.com/users/kkm000/gists{/gist_id}","starred_url":"https://api.github.com/users/kkm000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkm000/subscriptions","organizations_url":"https://api.github.com/users/kkm000/orgs","repos_url":"https://api.github.com/users/kkm000/repos","events_url":"https://api.github.com/users/kkm000/events{/privacy}","received_events_url":"https://api.github.com/users/kkm000/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/NuGet/Home/milestones/18","html_url":"https://github.com/NuGet/Home/milestones/Discussions","labels_url":"https://api.github.com/repos/NuGet/Home/milestones/18/labels","id":1265556,"number":18,"title":"Discussions","description":"This milestone is intended for open and on going discussions.\r\n\r\nItems tracked here, may be spun off into Issues in one of the product milestone.","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":5,"closed_issues":1,"state":"open","created_at":"2015-08-21T00:44:46Z","updated_at":"2015-09-28T21:12:52Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-09-28T20:00:07Z","updated_at":"2015-09-28T21:50:09Z","closed_at":null,"body":"I do not know if this is a right venue for questions, but I cannot find a mailing list or a google group where I can communicate with other users. If there is one, please point me to one and close this.\r\n\r\nWe have some projects that can be pulled as Git submodules into different solutions. The projects sometimes end up at a different depth from the solution directory. Since NuGet always inserts a single relative reference to the downloaded unpacked libraries, it works only if the project is at the same depth as where the reference to a NuGet package was added (e. g., `../../packages/ .... /mylibrary.dll`).\r\n\r\nSo far I have to manually edit each project that is used this way to add a property (this is only for MsBuild, since VS provides this same property pointing to the solution folder)\r\n```xml\r\n  <PropertyGroup>\r\n    <SolutionDir Condition=\"$(SolutionDir) == '' And Exists('..\\..\\..\\*.sln')\">..\\..\\..\\</SolutionDir>\r\n    <SolutionDir Condition=\"$(SolutionDir) == '' And Exists('..\\..\\*.sln')\">..\\..\\</SolutionDir>\r\n    <SolutionDir Condition=\"$(SolutionDir) == '' And Exists('..\\*.sln')\">..\\</SolutionDir>\r\n  </PropertyGroup>\r\n```\r\n\r\nThen I modify references added by NuGet as\r\n\r\n```xml\r\n  <ItemGroup>\r\n    <Reference Include=\"FParsec\">\r\n      <HintPath>$(SolutionDir)packages\\FParsec.1.0.1\\lib\\net40-client\\FParsec.dll</HintPath>\r\n      <Private>True</Private>\r\n    </Reference>\r\n  </ItemGroup>\r\n```\r\n\r\nreplacing some string of double-dot references, like `../..` with `$(SolutionDir)`.\r\n\r\nThen I need to maintain the change in case of a package upgrade, by re-editing the project file manually.\r\n\r\nCan something be done about that? I thought about creating a package that contains a special target that transforms the Reference item collection, but the catch 22 is that the transformer package suffers from the same problem in locating its `.props` and `.targets` files...\r\n\r\nMaintaining working link to a NuGet package becomes a living horror, and we seem to be getting more of such projects. Help!!!"},"comment":{"url":"https://api.github.com/repos/NuGet/Home/issues/comments/143883791","html_url":"https://github.com/NuGet/Home/issues/1477#issuecomment-143883791","issue_url":"https://api.github.com/repos/NuGet/Home/issues/1477","id":143883791,"user":{"login":"kkm000","id":8228229,"avatar_url":"https://avatars.githubusercontent.com/u/8228229?v=3","gravatar_id":"","url":"https://api.github.com/users/kkm000","html_url":"https://github.com/kkm000","followers_url":"https://api.github.com/users/kkm000/followers","following_url":"https://api.github.com/users/kkm000/following{/other_user}","gists_url":"https://api.github.com/users/kkm000/gists{/gist_id}","starred_url":"https://api.github.com/users/kkm000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkm000/subscriptions","organizations_url":"https://api.github.com/users/kkm000/orgs","repos_url":"https://api.github.com/users/kkm000/repos","events_url":"https://api.github.com/users/kkm000/events{/privacy}","received_events_url":"https://api.github.com/users/kkm000/received_events","type":"User","site_admin":false},"created_at":"2015-09-28T21:50:09Z","updated_at":"2015-09-28T21:50:09Z","body":"I see, that's a clear explanation, thanks!"}}