diff options
author | Juan Hoyos <juan.hoyos@microsoft.com> | 2022-05-23 18:43:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-23 18:43:39 +0300 |
commit | ff5840bbe619e74502e0c8466153e233a2ec6dc5 (patch) | |
tree | 11b15aaa800010d504b45b06d6cc9863ee05a566 /eng | |
parent | 017905c855e28abeb250ae84198c6404515036e8 (diff) |
Fix native sourcelink support (#69598)
* Fix native sourcelink support
* Correctly case Sdk.Targets
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Diffstat (limited to 'eng')
-rw-r--r-- | eng/versioning.targets | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/eng/versioning.targets b/eng/versioning.targets index 9a4ea04f85d..85f6eb4609d 100644 --- a/eng/versioning.targets +++ b/eng/versioning.targets @@ -178,10 +178,18 @@ </Target> <Target Name="GenerateNativeSourcelinkFile" - DependsOnTargets="GenerateSourceLinkFile" Condition="'$(DisableSourceLink)' != 'true'" + DependsOnTargets="_CopyGeneratedSourcelinkFile;_VerifyNativeSourceLinkFileExists" /> + + <Target Name="_CopyGeneratedSourcelinkFile" + DependsOnTargets="GenerateSourceLinkFile" Inputs="$(SourceLink)" Outputs="$(NativeSourceLinkFile)"> <Error Condition="'$(NativeSourceLinkFile)' == ''" Text="Please set NativeSourceLinkFile to forward appropriate information for sourcelink."/> <Copy SourceFiles="$(SourceLink)" DestinationFiles="$(NativeSourceLinkFile)" /> </Target> + + <Target Name="_VerifyNativeSourceLinkFileExists" + Condition="'$(VerifySourceLinkFileExists)' == true"> + <Error Condition="!Exists('$(NativeSourceLinkFile)')" Text="Native SourceLink file could not be made available to the native build. Ensure that $(MSBuildProjectName) ran the sourcelink targets."/> + </Target> </Project> |