Skip to content

[main] CLI-based tools in eng directory failing to build with error CS0246 #5054

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Winniexu01 opened this issue Apr 17, 2025 · 13 comments · Fixed by dotnet/sdk#48544
Closed
Assignees
Labels
ops-monitor Issues created/handled by the source build monitor role untriaged

Comments

@Winniexu01
Copy link
Member

Winniexu01 commented Apr 17, 2025

Related to dotnet/sdk#48523

https://dev.azure.com/dnceng/internal/_build/results?buildId=2689462&view=logs&j=fa5c2909-0e29-5671-d5eb-16d6c40e0c4a&t=2a0bd486-3f67-5c59-da0c-b84d88848a4b&l=23 (internal Microsoft link)

Scan for binaries building failed with below message:

/mnt/vss/_work/1/s/eng/tools/BinaryToolKit/Program.cs(61,20): error CS0246: The type or namespace name 'Command' could not be found (are you missing a using directive or an assembly reference?) [/mnt/vss/_work/1/s/eng/tools/BinaryToolKit/BinaryToolKit.csproj]
/mnt/vss/_work/1/s/eng/tools/BinaryToolKit/Program.cs(71,42): error CS0246: The type or namespace name 'Command' could not be found (are you missing a using directive or an assembly reference?) [/mnt/vss/_work/1/s/eng/tools/BinaryToolKit/BinaryToolKit.csproj]
/mnt/vss/_work/1/s/eng/tools/BinaryToolKit/Program.cs(12,28): error CS0246: The type or namespace name 'Argument<>' could not be found (are you missing a using directive or an assembly reference?) [/mnt/vss/_work/1/s/eng/tools/BinaryToolKit/BinaryToolKit.csproj]
/mnt/vss/_work/1/s/eng/tools/BinaryToolKit/Program.cs(18,28): error CS0246: The type or namespace name 'Option<>' could not be found (are you missing a using directive or an assembly reference?) [/mnt/vss/_work/1/s/eng/tools/BinaryToolKit/BinaryToolKit.csproj]
/mnt/vss/_work/1/s/eng/tools/BinaryToolKit/Program.cs(25,28): error CS0246: The type or namespace name 'Option<>' could not be found (are you missing a using directive or an assembly reference?) [/mnt/vss/_work/1/s/eng/tools/BinaryToolKit/BinaryToolKit.csproj]
/mnt/vss/_work/1/s/eng/tools/BinaryToolKit/Program.cs(33,28): error CS0246: The type or namespace name 'Option<>' could not be found (are you missing a using directive or an assembly reference?) [/mnt/vss/_work/1/s/eng/tools/BinaryToolKit/BinaryToolKit.csproj]
@Winniexu01 Winniexu01 added ops-monitor Issues created/handled by the source build monitor role untriaged labels Apr 17, 2025
@mthalman
Copy link
Member

@ViktorHofer - Looks like the version of Arcade being used here doesn't yet bring in the new S.CL changes. Do you know the story here?

@mthalman
Copy link
Member

This is also failing in the CreateBaselineUpdatePR project:

/mnt/vss/_work/1/s/eng/tools/CreateBaselineUpdatePR/Program.cs(87,20): error CS0246: The type or namespace name 'Command' could not be found (are you missing a using directive or an assembly reference?) [/mnt/vss/_work/1/s/eng/tools/CreateBaselineUpdatePR/CreateBaselineUpdatePR.csproj]

https://dev.azure.com/dnceng/internal/_build/results?buildId=2689642&view=results (internal link)

@mthalman mthalman changed the title [main] Scan for binaries failing with error CS0246 [main] CLI-based tools in eng directory failing to build with error CS0246 Apr 17, 2025
@ViktorHofer
Copy link
Member

The stage2 build in the VMR got fixed today with dotnet/dotnet@f09dba3

Are these components using different dependencies somehow?

@ViktorHofer
Copy link
Member

Is there a binlog that I can take a look at?

@mthalman
Copy link
Member

These tools are just using Arcade to install the SDK, which is using the version from the global.json.

@mthalman
Copy link
Member

No binlog is captured for these tools.

@mthalman
Copy link
Member

@ViktorHofer
Copy link
Member

dotnet/sdk#48544

@ViktorHofer
Copy link
Member

Also filed #5055

@MichaelSimons
Copy link
Member

Is this going to require a re-bootstrap to pick up the fix?

@ViktorHofer
Copy link
Member

ViktorHofer commented Apr 17, 2025

No. The impacted tools (BinaryToolKit (for tagging), CreateBaselineUpdatePR and BuildComparer) use the version that is specified in Versions.props, regardless of the SDK and PSB.

The latest build is already green: https://dev.azure.com/dnceng/internal/_build/results?buildId=2689702&view=results

@MichaelSimons
Copy link
Member

My suggestion in #4976 (comment) would have prevented this. We should be using the PSB versions in source-build scenarios. ...But we should still be updating the versions.props appropriately.

@ViktorHofer
Copy link
Member

ViktorHofer commented Apr 17, 2025

Agreed. It would be great if we could add support for that in source-build scenarios. That said, tools that run inside a source-only context still depend on an accurate version in Versions.props / Directory.Packages.props.

FWIW referencing the tool projects (BuildComparer, CreateBaselineUpdatePR and BinaryToolKit) in tools.proj would've also prevented this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ops-monitor Issues created/handled by the source build monitor role untriaged
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants