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
JSValueReaderTest.cs CELA open source policy no longer recommends all right reserved in license header (#5083) 2020-06-01 15:17:26 -07:00
JSValueTest.cs Adding compile time Code generation for Managed React Native modules for Windows (#5064) 2020-06-04 02:39:30 +00:00
JTokenJSValueReader.cs CELA open source policy no longer recommends all right reserved in license header (#5083) 2020-06-01 15:17:26 -07:00
JTokenJSValueWriter.cs CELA open source policy no longer recommends all right reserved in license header (#5083) 2020-06-01 15:17:26 -07:00
Microsoft.ReactNative.Managed.UnitTests.csproj Upgrade to Windows SDK 10.0.22621.0 (#13287) 2024-06-04 09:43:32 -07:00
NativeModuleTest.cs Fix typos and add `cspell` configuration (#11536) 2023-05-05 13:12:29 -07:00
NoAttributeNativeModuleTest.cs Fix typos and add `cspell` configuration (#11536) 2023-05-05 13:12:29 -07:00
Package.appxmanifest Remove Microsoft user names from source code (#6125) 2020-09-30 13:22:06 -07:00
ReactModuleBuilderMock.cs Add support for turbomodule eventemitters, and codegen (#13555) 2024-08-13 07:35:57 -07:00
UnitTestApp.xaml CELA open source policy no longer recommends all right reserved in license header (#5083) 2020-06-01 15:17:26 -07:00
UnitTestApp.xaml.cs Target WinUI 3 to WinUI 3 Preview 1 (#5309) 2020-06-25 00:54:24 -07:00
packages.lock.json Automatically set EnableSourceLink for in-repo builds only (#13666) 2024-09-09 20:37:17 +00:00