Skip to content

.NET 8 SDK is complaining about Source Link problems in completely unrelated Git submodules #1071

@sandersaares

Description

@sandersaares

Description

Building my solution with .NET 8 I get some warnings that I did not get before:

42>C:\Program Files\dotnet\sdk\8.0.100-preview.5.23303.2\Sdks\Microsoft.Build.Tasks.Git\build\Microsoft.Build.Tasks.Git.targets(26,5): warning : Could not find file 'C:\Source\xxx\xxx\external\googletest_1.8\.git'. The source code won't be available via Source Link.
42>C:\Program Files\dotnet\sdk\8.0.100-preview.5.23303.2\Sdks\Microsoft.Build.Tasks.Git\build\Microsoft.Build.Tasks.Git.targets(26,5): warning : Could not find file 'C:\Source\xxx\xxx\external\opentelemetry-cpp\.git'. The source code won't be available via Source Link.
42>C:\Program Files\dotnet\sdk\8.0.100-preview.5.23303.2\Sdks\Microsoft.Build.Tasks.Git\build\Microsoft.Build.Tasks.Git.targets(26,5): warning : Could not find file 'C:\Source\xxx\xxx\external\opentelemetry-cpp-contrib\.git'. The source code won't be available via Source Link.
42>C:\Program Files\dotnet\sdk\8.0.100-preview.5.23303.2\Sdks\Microsoft.Build.Tasks.Git\build\Microsoft.Build.Tasks.Git.targets(26,5): warning : Could not find file 'C:\Source\xxx\xxx\external\xxx\.git'. The source code won't be available via Source Link.

Reproduction Steps

  1. Have unrelated submodule present in repo.
  2. Build solution that does not use this submodule.
  3. Receive warning.

Expected behavior

No messages about submodules that are not in any way referenced by my solution.

Actual behavior

Irrelevant warnings are emitted.

Regression?

Worked fine with .NET 7 SDK. I suppose this Source Link integration is a new feature in .NET 8.

Known Workarounds

No response

Configuration

8.0.100-preview.5.23303.2

Other information

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions