setting OutputPath
in a Directory.Build.targets
#7669
-
When working on a plugin based project I set the default This is at least what I planned on doing... But neither properties are overriden/respected in the Now I was wondering if this is intended behavior or if this might be a bug/oversight? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Can you drop a minimal sample? It sounds like you may be running into the order of props and target evaluation not quite being what you expect, but with a minimal example we could talk in more detail about the specifics of your scenario. |
Beta Was this translation helpful? Give feedback.
-
The So, the only solution is to set this before the .NET SDK targets are imported (implicitly), which is just before There are two ways you can go about this..., Using
|
Beta Was this translation helpful? Give feedback.
The
OutputPath
properties get overridden before hitting the Common targets and only at the end of Common targets, theDirectory.Build.targets
is imported. By purely looking at MSBuild evaluation, this should work but with all of the workarounds in the .NET SDK going on, it won't.So, the only solution is to set this before the .NET SDK targets are imported (implicitly), which is just before
</Project>
tag on your project file.There are two ways you can go about this...,
Using
BeforeTargetFrameworkInferenceTargets
propertySeparate the above "Project Output" and "Plugins Output" sections to a new targets file, let's say
JustBeforeSdk.targets
and then put the following in yourDirectory.Bu…