-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoTargets sdk import discrepancy #443
Comments
There are two ways users can declare NoTargets: <Project Sdk="Microsoft.Build.NoTargets/1.0.0">
...
</Project> <Project>
<!-- Users can declare any property or import before Sdk.props -->
<Import Project="Sdk.props" Sdk="Microsoft.Build.NoTargets" Version="1.0.0" />
<!-- Users can declare any property or import after Sdk.props -->
...
<!-- Users can declare any property or import before Sdk.targets -->
<Import Project="Sdk.targets" Sdk="Microsoft.Build.NoTargets" Version="1.0.0" />
<!-- Users can declare any property or import after Sdk.targets -->
</Project> Given the second example, NoTargets is trying to detect if the user already imported Sdk.props from Microsoft.NET.Sdk or For the Sdk.targets import, its essentially the same thing, a detection if the user already imported the common targets from the .NET SDK. |
Could we then have the same condition for both imports? The condition for importing the NetSdk targets is '$(CommonTargetsPath)' == '', while the props is based on MicrosoftCommonPropsHasBeenImported. |
Unfortunately, no. |
Currently the Microsoft.NET.Sdk targets are imported if
'$(CommonTargetsPath)' == ''
while the props are when'$(MicrosoftCommonPropsHasBeenImported)' != 'true'
. This is even more confusing given thatCommonTargetsPath
is an internal Microsoft.Common.targets property that gets set when Microsoft.Common.targets gets executed. Shouldn't also use the NoTargets Sdk.targets also useMicrosoftCommonPropsHasBeenImported
?The text was updated successfully, but these errors were encountered: