[Codespaces] Trying to debug tests in codespaces fails to build
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Description
This might be more of a VS Code / C# DevKit compatibility thing.
The way it tries to invoke build for our tests causes an error:
```
* Executing task: dotnet: build /workspaces/runtime/src/libraries/System.DirectoryServices.Protocols/tests/System.DirectoryServices.Protocols.Tests.csproj
dotnet build /workspaces/runtime/src/libraries/System.DirectoryServices.Protocols/tests/System.DirectoryServices.Protocols.Tests.csproj /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary /p:Configuration=Debug /p:Platform="AnyCPU"
C# extension build result service is available.
Determining projects to restore...
All projects are up-to-date for restore.
Microsoft.Interop.SourceGeneration -> /workspaces/runtime/artifacts/bin/Microsoft.Interop.SourceGeneration/Debug/netstandard2.0/Microsoft.Interop.SourceGeneration.dll
TestUtilities -> /workspaces/runtime/artifacts/bin/TestUtilities/Debug/net8.0/TestUtilities.dll
DownlevelLibraryImportGenerator -> /workspaces/runtime/artifacts/bin/DownlevelLibraryImportGenerator/Debug/netstandard2.0/Microsoft.Interop.LibraryImportGenerator.Downlevel.dll
TestUtilities -> /workspaces/runtime/artifacts/bin/TestUtilities/Debug/net481/TestUtilities.dll
ILLink.RoslynAnalyzer -> /workspaces/runtime/artifacts/bin/ILLink.RoslynAnalyzer/Debug/netstandard2.0/ILLink.RoslynAnalyzer.dll
ILLink.CodeFixProvider -> /workspaces/runtime/artifacts/bin/ILLink.CodeFixProvider/Debug/netstandard2.0/ILLink.CodeFixProvider.dll
System.DirectoryServices.Protocols.Tests -> /workspaces/runtime/artifacts/bin/System.DirectoryServices.Protocols.Tests/Debug/net481/System.DirectoryServices.Protocols.Tests.dll
Mono.Linker -> /workspaces/runtime/artifacts/bin/Mono.Linker/ref/Debug/net10.0/illink.dll
Mono.Linker -> /workspaces/runtime/artifacts/bin/Mono.Linker/Debug/net10.0/illink.dll
ILLink.Tasks -> /workspaces/runtime/artifacts/bin/ILLink.Tasks/Debug/net/ILLink.Tasks.dll
System.DirectoryServices.Protocols -> /workspaces/runtime/artifacts/bin/System.DirectoryServices.Protocols/ref/Debug/net10.0/System.DirectoryServices.Protocols.dll
System.DirectoryServices.Protocols -> /workspaces/runtime/artifacts/bin/System.DirectoryServices.Protocols/Debug/net10.0-windows/System.DirectoryServices.Protocols.dll
System.Private.CoreLib.Generators -> /workspaces/runtime/artifacts/bin/System.Private.CoreLib.Generators/Debug/netstandard2.0/System.Private.CoreLib.Generators.dll
System.Private.CoreLib -> /workspaces/runtime/artifacts/bin/System.Private.CoreLib/ref/Debug/net10.0/System.Private.CoreLib.dll
LibraryImportGenerator -> /workspaces/runtime/artifacts/bin/LibraryImportGenerator/Debug/netstandard2.0/Microsoft.Interop.LibraryImportGenerator.dll
/workspaces/runtime/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/RuntimeInformation.cs(50,8): error CS1029: #error: 'Unknown Architecture' [/workspaces/runtime/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj]
Build FAILED.
```
I think the problem has to do with `/p:Platform="AnyCPU"` If I remove that it builds successfully. We'll need to see why the devkit uses this when launching tests. I suspect that it's due to the structure of our SLNX files.
Contributor guide
Assessment
This issue has not been assessed yet.