Avoid loading NuGet.targets if already loaded#4969
Conversation
Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
|
@chipitsine Can you provide some details about why this is needed? |
|
in complex environments NuGet.targets might be occasioanely imported many times
|
|
Including @nkolev92 What is impact of loading multiple times in one project? Is there a repro of how this happens? |
|
@rrelyea the impact is that warning (which could be treated as an error if a user has their build configured that way), and confusion around import ordering. This would only address the former. I would also like to know more details about exactly what projects are causing this warning--what are the "complex environments" like? |
|
I'm afraid I cannot provide particular details due to some NDA. but google shows similar issues |
|
yep, the impact is to mute warnings |
|
@nkolev92, do you have a preference on this? The MSBuild team is willing to take it. The only downside is that if you have a situation where you import One possible workaround: |
|
I do not recall getting a lot of feedback (read: any) around duplicate imports of the NuGet targets file. Is there even a default template that could lead you to this situation? |
rainersigwald
left a comment
There was a problem hiding this comment.
Sounds like there weren't any real objections to doing this check, so let's go forward with it. Object ASAP if you care to, please. We'll merge ~tomorrow.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Ilya Shipitsin chipitsine@gmail.com