question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Solution target generation does not take into account imported targets

See original GitHub issue

A target added to a project via solution project extensibility points is no longer accessible after #1497, because the injected call-arbitrary-target-in-all-projects target overrides the one imported from After.SolutionName.sln.targets. This produces errors like

S:\msbuild>bin\Bootstrap\15.0\Bin\MSBuild.exe src\MSBuild.sln /t:PackNugetPackages /v:q
Microsoft (R) Build Engine version 15.1.523.56541
Copyright (C) Microsoft Corporation. All rights reserved.

S:\msbuild\src\Framework\Microsoft.Build.Framework.csproj : error MSB4057: The target "PackNugetPackages" does not exist in the project.
S:\msbuild\src\XMakeCommandLine\MSBuild.csproj : error MSB4057: The target "PackNugetPackages" does not exist in the project.

This regresses solutions that use a target at the solution level to restore NuGet packages, a common pattern for Xamarin.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
kzucommented, Jan 25, 2017

Verified fixed, thanks!! 😄

0reactions
rainersigwaldcommented, Feb 3, 2017

@kzu No public VS build contains the fix yet. It’s in MSBuild 15.1.533 and up.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solution target generation does not take into account ...
You could try creating a solution target that, when imported to a solution, runs ones per solution. Import the same target into each...
Read more >
CMake imported target found when configuring but ...
1 Answer. For IMPORTED library target value -NOTFOUND corresponds to absent IMPORTED_LOCATION property, corresponded to the library's path. You ...
Read more >
Cmake install target triggering
I suppose flow as follows: build external library with add_subdirectory(); install external library files into local directory; import targets ...
Read more >
MSBuild .targets Files
Learn about the MSBuild .targets files that contain items, properties, targets, and tasks for common scenarios.
Read more >
MSBuild Targets
Learn how MSBuild uses targets to group tasks together and allow the build process to be factored into smaller units.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found