"public headers ("include") directory path for 'Guide' is invalid or not contained in the target" error

Hi, I have a problem with making a swift playgrounds app walkthrough. I followed the steps exactly and modified my Package.swift a bit (in the targets section):

.executableTarget(name: "App", dependencies: ["Guide"], path: "App"),

        .target(

            name: "Guide",

            path: "Guide",

            resources: [

            .process("Guide.tutorial"),

            ])

Now when I open the project in Playgrounds I get this error: public headers ("include") directory path for 'Guide' is invalid or not contained in the target

Any help would be appreciated.

Thanks

I am having this error as well. I'd love to know if you ever found a solution!

Same.

I'm having essentially the same issue while trying to compile Metal files:

// swift-tools-version: 6.0
import PackageDescription

let package = Package(
    name: "BaseMetal",
    platforms: [.macOS(.v14)],
    targets: [
        .executableTarget(name: "BaseMetal"),
        .target(
            name: "BaseMetalShaders",
            path: "Sources/Shaders",
            resources: [
                .process("Canvas.metal"),
                .process("Shader.metal")
            ]
        )
    ]
)

My tree looks like this:

.
├── Package.swift
└── Sources
   ├── BaseMetal
    │   ├── Main.swift
    │   ├── Metalic.swift
    │   └── Renderer.swift
   └── Shaders
         ├── Canvas.metal
         └── Shader.metal

This is the exact error message:

❯ swift run
error: 'basemetal': public headers ("include") directory path for 'BaseMetalShaders' is invalid or not contained in the target

How can this not work??

"public headers ("include") directory path for 'Guide' is invalid or not contained in the target" error
 
 
Q