{"action":"created","issue":{"url":"https://api.github.com/repos/NuGet/Home/issues/2441","repository_url":"https://api.github.com/repos/NuGet/Home","labels_url":"https://api.github.com/repos/NuGet/Home/issues/2441/labels{/name}","comments_url":"https://api.github.com/repos/NuGet/Home/issues/2441/comments","events_url":"https://api.github.com/repos/NuGet/Home/issues/2441/events","html_url":"https://github.com/NuGet/Home/issues/2441","id":145475541,"number":2441,"title":"Path to project package - why it is relative?","user":{"login":"kreuzerkrieg","id":829317,"avatar_url":"https://avatars.githubusercontent.com/u/829317?v=3","gravatar_id":"","url":"https://api.github.com/users/kreuzerkrieg","html_url":"https://github.com/kreuzerkrieg","followers_url":"https://api.github.com/users/kreuzerkrieg/followers","following_url":"https://api.github.com/users/kreuzerkrieg/following{/other_user}","gists_url":"https://api.github.com/users/kreuzerkrieg/gists{/gist_id}","starred_url":"https://api.github.com/users/kreuzerkrieg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kreuzerkrieg/subscriptions","organizations_url":"https://api.github.com/users/kreuzerkrieg/orgs","repos_url":"https://api.github.com/users/kreuzerkrieg/repos","events_url":"https://api.github.com/users/kreuzerkrieg/events{/privacy}","received_events_url":"https://api.github.com/users/kreuzerkrieg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-03T09:53:13Z","updated_at":"2016-04-05T07:46:43Z","closed_at":"2016-04-04T21:24:59Z","body":"This issue was already risen on codeplex, however I didnt find this issue here. \r\nThe original link https://nuget.codeplex.com/workitem/8337\r\nSince I dont see it is addressed one way or another I repost it here:\r\nLooks like the path to package's props and targets used in project's file is pointing to the solution folder. Example: \r\n<Import Project=\"..\\Solutions\\packages\\cpprestsdk.2.4.0\\build\\native\\cpprestsdk.props\" Condition=\"Exists('..\\Solutions\\packages\\cpprestsdk.2.4.0\\build\\native\\cpprestsdk.props')\" /> \r\nNow, lets say this import is in my infrastructure project which resides in infra solution and, what a surprise, its gonna be used in numerous application solutions. These application solutions are not going to stick to the same folder structure as infra solution did. So at the moment I include my infra project in application solution the path \"..\\Solutions\\packages\\cpprestsdk.2.4.0\\build\\native\\cpprestsdk.props\" is no more relevant. \r\nFrom my experience staring at nuget imports in various project files it always means $(SolutionDir)\\packages...\\ so it looks wrong to try and use relative path instead of using macros. Meanwhile I manually search and replace relative paths to mocro'ed one, like: <Import Project=\"$(SolutionDir)packages\\cpprestsdk.2.4.0\\build\\native\\cpprestsdk.props\" Condition=\"Exists('$(SolutionDir)packages\\cpprestsdk.2.4.0\\build\\native\\cpprestsdk.props')\" />. It solves the problem described above but gives me hard times when I try to update packages. The project file ends with multiple imports since nuget cant get it right. Example: \r\n<Import Project=\"..\\Solutions\\packages\\cpprestsdk.2.4.0.1\\build\\native\\cpprestsdk.props\" Condition=\"Exists('..\\Solutions\\packages\\cpprestsdk.2.4.0.1\\build\\native\\cpprestsdk.props')\" /> \r\n<Import Project=\"$(SolutionDir)packages\\cpprestsdk.2.4.0\\build\\native\\cpprestsdk.props\" Condition=\"Exists('$(SolutionDir)packages\\cpprestsdk.2.4.0\\build\\native\\cpprestsdk.props')\" /> \r\n\r\nSo, can we get our imports pointing to the right place using macros instead of relative paths? sounds this is the right thing to do in any case.\r\n"},"comment":{"url":"https://api.github.com/repos/NuGet/Home/issues/comments/205705447","html_url":"https://github.com/NuGet/Home/issues/2441#issuecomment-205705447","issue_url":"https://api.github.com/repos/NuGet/Home/issues/2441","id":205705447,"user":{"login":"kreuzerkrieg","id":829317,"avatar_url":"https://avatars.githubusercontent.com/u/829317?v=3","gravatar_id":"","url":"https://api.github.com/users/kreuzerkrieg","html_url":"https://github.com/kreuzerkrieg","followers_url":"https://api.github.com/users/kreuzerkrieg/followers","following_url":"https://api.github.com/users/kreuzerkrieg/following{/other_user}","gists_url":"https://api.github.com/users/kreuzerkrieg/gists{/gist_id}","starred_url":"https://api.github.com/users/kreuzerkrieg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kreuzerkrieg/subscriptions","organizations_url":"https://api.github.com/users/kreuzerkrieg/orgs","repos_url":"https://api.github.com/users/kreuzerkrieg/repos","events_url":"https://api.github.com/users/kreuzerkrieg/events{/privacy}","received_events_url":"https://api.github.com/users/kreuzerkrieg/received_events","type":"User","site_admin":false},"created_at":"2016-04-05T07:46:43Z","updated_at":"2016-04-05T07:46:43Z","body":"As I understand it doesnt work with native projects. checked it a minute ago with VS2015 Update 2, none of described in the link you've provided happened, so I guess the project.json works with managed project only.\r\n\r\n\r\n"}}