sourcelink: SourceLink doesn't work well with WPF projects
Error
Microsoft.Managed.Core.targets(90,5): SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true [C:\Temp\WpfApp1\WpfApp1\WpfApp1_3qoc4wf0_wpftmp.csproj]
is reported when building with /p:ContinuousIntegrationBuild=true.
Due to https://github.com/NuGet/Home/issues/5894 - WPF projects do not import .props and .targets files from NuGet packages.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (8 by maintainers)
Links to this issue
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- sourcelink/README.md at 4e754679f37dac182184c10813dc77814caea05b - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- sourcelink/README.md at 97b6bcf51bf6983449f8eae25dd3a6c19c631192 - sourcelink - Gitea: Git with a cup of tea
- sourcelink/README.md at d8a3a59c1413681b401d65fe9d39e45b026384b5 - sourcelink - Gitea: Git with a cup of tea
- sourcelink/README.md at c9199d81c03166e2fb0b4e4758c1ceb41b3c1e1f - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- sourcelink/README.md at 8ec80a181849eaa280065d88ec443c2e83ca6de7 - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- sourcelink/README.md at 1000b4e121296ccd6ffc133d45ce1f12ed8584e2 - sourcelink - Gitea: Git with a cup of tea
- sourcelink/README.md at ab8cd8c2982949bd27ca9faee27e4a0c6bff87b1 - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- sourcelink/README.md at 7b213852ad1f1a2a87a0238ee4b66addf7451f6b - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- sourcelink/README.md at a2b14852b21ce5408f163e7c73fccf693eceffef - sourcelink - Gitea: Git with a cup of tea
- sourcelink/README.md at 31a772fb8b2e3430e91766cdb169fba379f0d013 - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- sourcelink/README.md at release/1.0.0 - sourcelink - Gitea: Git with a cup of tea
- sourcelink/README.md at locfiles/ec2e7ef3-ba98-4a2e-920b-9d26b3487d9a - sourcelink - Gitea: Git with a cup of tea
- sourcelink/README.md at locfiles/68417c5e-ace7-4440-a7fe-561ca226e899 - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- sourcelink/README.md at 40210e9ad182f345c3a4fd85c04ca47820fab473 - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
- sourcelink/README.md at main - sourcelink - Gitea: Git with a cup of tea
- kcando/sourcelink: Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets - sourcelink - Gitea: Git with a cup of tea
Commits related to this issue
- Workaround https://github.com/dotnet/sourcelink/issues/91 by removing Reproducible build when SourceLink is disabled. — committed to CK-Build/CKli by olivier-spinelli 5 years ago
- Move development NuGet dependencies into Directory.Build.props This should solve this issue popping on AppVeyor: > SourceRoot items must include at least one top-level (not nested) item when Determin... — committed to 0xced/Six.BankMaster by 0xced 4 years ago
- Disable deterministic source paths for WPF Source link is currently broken for WPF as per dotnet/sourcelink#91. — committed to poke/Westerhoff.Configuration.Encryption by poke 4 years ago
The issue in Newtonsoft.Json is related but different than the WPF issue.
When
DeterministicSourcePathsis enabled the compiler needs to know the set of directories that all source code resides under. This set is specified bySourceRootitems. In projects that reference SourceLink packageSourceRootitems are populated by SourceLink since it knows where the repository root is.In projects that do not reference SourceLink package this
SourceRootis undefined and hence the compiler doesn’t know how to normalize the paths and reports the error [1].The recommendation is to include the SourceLink package reference to all projects in the repo (even to test projects). This can be easily accomplished via adding
Directory.Build.propsfile in the root of the repository that includes the SoruceLink package:[1] The compiler does not infer the source root(s) based on source file paths it is given as this might produce confusing results. Consider a repo with two projects:
If the compiler inferred the source roots for these projects they would be
.../src/ProjectA/and.../src/ProjectB/and the paths embedded in DLLs and PDBs toProgram.csfiles would be/_/Program.csfor both.../src/ProjectA/Program.csand.../src/ProjectB/Program.cs. So it would be impossible to distinguish whichProgram.csis which.The workaround is to add
to the .csproj file.