{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/msbuild/issues/222","repository_url":"https://api.github.com/repos/Microsoft/msbuild","labels_url":"https://api.github.com/repos/Microsoft/msbuild/issues/222/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/msbuild/issues/222/comments","events_url":"https://api.github.com/repos/Microsoft/msbuild/issues/222/events","html_url":"https://github.com/Microsoft/msbuild/issues/222","id":107557399,"number":222,"title":"MSBuild should have a solution import in Microsoft.Common.Targets","user":{"login":"Serivy","id":9199253,"avatar_url":"https://avatars.githubusercontent.com/u/9199253?v=3","gravatar_id":"","url":"https://api.github.com/users/Serivy","html_url":"https://github.com/Serivy","followers_url":"https://api.github.com/users/Serivy/followers","following_url":"https://api.github.com/users/Serivy/following{/other_user}","gists_url":"https://api.github.com/users/Serivy/gists{/gist_id}","starred_url":"https://api.github.com/users/Serivy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Serivy/subscriptions","organizations_url":"https://api.github.com/users/Serivy/orgs","repos_url":"https://api.github.com/users/Serivy/repos","events_url":"https://api.github.com/users/Serivy/events{/privacy}","received_events_url":"https://api.github.com/users/Serivy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-09-21T17:14:14Z","updated_at":"2016-02-23T23:03:07Z","closed_at":null,"body":"My request is to be able to put enterprise level logic in a msbuild target at a solution level rather than modifying every single .*proj file. This way I can modify one file in the solution directory and all projects which implement Microsoft.Common.Targets can set things like $(OutDir), Reference Paths, Analyzers, Nuget restores/updates or even Build server logic (Strongname signing, digital signuates, assembly versions). It would be priceless to enforce logic on a solution without relying on developers to install the custom target file into the right directory. Currently I do this by modifying all the projects to import a solution wide target file.\r\n\r\nThere are more details on the uservoice page including other suggestions to change but it would essentially be adding `<Import Project=\"$(SolutionDir)Custom.$(MSBuildThisFile)\" Condition=\"$(SolutionDir)Custom.$(MSBuildThisFile)')\"/>` or some variation of this to Microsoft.Common.CurrentVersion.targets just under $(MSBuildProjectFullPath).user.\r\n\r\nI created a user voice post previously but when I saw the news about MSBuild being open source I decided to raise it directly with you here. https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/9674760-add-a-custom-solution-import-in-microsoft-common-t \r\nI apologise for my persistence with this request however it would make maintaining an enterprise build system much easier. \r\n\r\nI am happy to answer any queries you may have, especially if it strengthens the possibility of this becoming a reality! Thanks\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/msbuild/issues/comments/187955231","html_url":"https://github.com/Microsoft/msbuild/issues/222#issuecomment-187955231","issue_url":"https://api.github.com/repos/Microsoft/msbuild/issues/222","id":187955231,"user":{"login":"aheusser","id":2006478,"avatar_url":"https://avatars.githubusercontent.com/u/2006478?v=3","gravatar_id":"","url":"https://api.github.com/users/aheusser","html_url":"https://github.com/aheusser","followers_url":"https://api.github.com/users/aheusser/followers","following_url":"https://api.github.com/users/aheusser/following{/other_user}","gists_url":"https://api.github.com/users/aheusser/gists{/gist_id}","starred_url":"https://api.github.com/users/aheusser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aheusser/subscriptions","organizations_url":"https://api.github.com/users/aheusser/orgs","repos_url":"https://api.github.com/users/aheusser/repos","events_url":"https://api.github.com/users/aheusser/events{/privacy}","received_events_url":"https://api.github.com/users/aheusser/received_events","type":"User","site_admin":false},"created_at":"2016-02-23T23:03:07Z","updated_at":"2016-02-23T23:03:07Z","body":"I also agree with the basic need expressed by the OP.  Thanks to @Serivy for taking the time to coherently capture the need.  Rest assured:  from my perspective, at least, you are _not _the \"odd one out\".\r\n\r\nHaving a capability along these lines would be valuable (i.e., an ability to apply \"enterprise build logic\" across all projects in a solution _without_ requiring something specific be authored into each individual .csproj and _without_ requiring something special be installed on a build machine).\r\n\r\nAnother way of stating the desire might be:  the \"enterprise build logic\" should be something that can be reasonably and naturally stored and retrieved from the same repository structure in which you retrieve the actual solution source itself.  Once retrieved, one would ideally _not_ have to engage in \"special steps\" to get the associated enterprise logic incorporated into your machine's msbuild system.\r\n\r\n"}}