Skip to content

Nuke.Common: Can't compile after nuke :setup #1588

@thygrrr

Description

@thygrrr

Usage Information

10.1.0 / Windows 11 Pro / .NET 8, .NET 10

Description

The files generated with nuke :setup cannot be compiled, and thus nuke cannot be used out of the box.

I have attached the resulting build folder as a zip. This is on Windows 11 Pro, pwsh or nushell, .NET 8 and .NET 10.

Reproduction Steps

dotnet tool install Nuke.GlobalTool --global  
nuke :setup
./build.ps1   # or dotnet build

Resulting project: build.zip

Expected Behavior

Actually compiles.
Actually builds.

Actual Behavior

Doesn't compile.

Original Log:

PS P:\2dog> ./build.ps1
PowerShell Core version 7.5.3
Microsoft (R) .NET SDK version 10.0.101
P:\2dog\build\Build.cs(3,7): error CS0246: The type or namespace name 'Nuke' could not be found (are you missing a using directive or an assembly reference?)
P:\2dog\build\Build.cs(4,7): error CS0246: The type or namespace name 'Nuke' could not be found (are you missing a using directive or an assembly reference?)
P:\2dog\build\Build.cs(5,7): error CS0246: The type or namespace name 'Nuke' could not be found (are you missing a using directive or an assembly reference?)
P:\2dog\build\Build.cs(6,7): error CS0246: The type or namespace name 'Nuke' could not be found (are you missing a using directive or an assembly reference?)
P:\2dog\build\Build.cs(7,7): error CS0246: The type or namespace name 'Nuke' could not be found (are you missing a using directive or an assembly reference?)
P:\2dog\build\Build.cs(8,7): error CS0246: The type or namespace name 'Nuke' could not be found (are you missing a using directive or an assembly reference?)
P:\2dog\build\Build.cs(9,7): error CS0246: The type or namespace name 'Nuke' could not be found (are you missing a using directive or an assembly reference?)
P:\2dog\build\Build.cs(10,14): error CS0246: The type or namespace name 'Nuke' could not be found (are you missing a using directive or an assembly reference?)
P:\2dog\build\Build.cs(11,14): error CS0246: The type or namespace name 'Nuke' could not be found (are you missing a using directive or an assembly reference?)
P:\2dog\build\Configuration.cs(4,7): error CS0246: The type or namespace name 'Nuke' could not be found (are you missing a using directive or an assembly reference?)
P:\2dog\build\Build.cs(13,15): error CS0246: The type or namespace name 'NukeBuild' could not be found (are you missing a using directive or an assembly reference?)
P:\2dog\build\Configuration.cs(7,30): error CS0246: The type or namespace name 'Enumeration' could not be found (are you missing a using directive or an assembly reference?)
P:\2dog\build\Build.cs(26,5): error CS0246: The type or namespace name 'Target' could not be found (are you missing a using directive or an assembly reference?)
P:\2dog\build\Build.cs(32,5): error CS0246: The type or namespace name 'Target' could not be found (are you missing a using directive or an assembly reference?)
P:\2dog\build\Build.cs(37,5): error CS0246: The type or namespace name 'Target' could not be found (are you missing a using directive or an assembly reference?)
P:\2dog\build\Build.cs(23,6): error CS0246: The type or namespace name 'ParameterAttribute' could not be found (are you missing a using directive or an assembly reference?)
P:\2dog\build\Build.cs(23,6): error CS0246: The type or namespace name 'Parameter' could not be found (are you missing a using directive or an assembly reference?)
P:\2dog\build\Configuration.cs(6,23): error CS0308: The non-generic type 'TypeConverter' cannot be used with type arguments

Regression?

Perhaps.🐄

Known Workarounds

No. Nuget references apparently don't suffice:

    <PackageReference Include="Nuke.Common" Version="10.1.0" />

There's no functioning meta package; and installing all the Nuke packages I can see in NuGet also doesn't work beyond making Config.cs compile (when referencing Nuke.Tooling)

Could you help with a pull-request?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions