react-native-windows/vnext/Microsoft.ReactNative.Manag...
Jon Thysell 401416f637
Automatically set EnableSourceLink for in-repo builds only (#13666)
## Description

SourceLink is needed to ensure that our NuGet packages have matching source information when symbols are resolved. So we have an `EnableSourceLink` property which tells some of our projects to add source link, and we enable that when doing CI/PR/official builds by setting the property to true when we call msbuild in our pipelines.

This PR makes it so that instead of having to pass that property, the projects themselves automatically build with source link when they need to.

### Type of Change
- New feature (non-breaking change which adds functionality)

### Why
This makes it so that local builds of RNW are closer to the the same nuget restore behavior / packages.lock.json file as when they're built in pipelines.

This is part is working toward resolving #12004 and this functionality was extracted from PR #13634.

### What
Instead of requiring us to call msbuild with `/p:EnableSourceLink=true` for every solution (or relying on setting it in `ExperimentalFeatures.props`) we now detect when our library projects are being built within the repo (detecting the `src-win` folder which isn't present in the NPM publish) and enable source link then.

## Screenshots
N/A

## Testing
N/A

## Changelog
Should this change be included in the release notes: _yes_

Automatically set EnableSourceLink for in-repo builds only
2024-09-09 20:37:17 +00:00
..
Assets
Properties
Microsoft.ReactNative.Managed.IntegrationTests.csproj Upgrade to Windows SDK 10.0.22621.0 (#13287) 2024-06-04 09:43:32 -07:00
Package.appxmanifest
ReactNativeHostTests.cs
ReactNativeHostTests.js
ReactPackageProvider.cs
TestBundle.targets Integrate RN Nightly 10/16 (#12532) 2023-12-15 13:30:34 -08:00
TestEventService.cs
TestNotificationService.cs
TestReactNativeHostHolder.cs Deprecate web debugging (#12724) 2024-02-12 17:27:39 -08:00
TurboModuleTests.cs
TurboModuleTests.js
UnitTestApp.xaml
UnitTestApp.xaml.cs
packages.lock.json Automatically set EnableSourceLink for in-repo builds only (#13666) 2024-09-09 20:37:17 +00:00