Yak not respecting .NET targeting

Hi @will , I spoke to @menno at the London Dev day about an issue I am having with Yak and he recommended I tag you.

I have come across an issue where Yak is not respecting the original folder layout of my project when using the Yak Command line tool to build a Yak package.

My project folder structure when built from Visual studio is the following

example/
└── bin/
    └── Release/
        └── net7.0-windows/
            ├── example.dll
            └── example.rhp

When running the Yak build command I expect the net7.0-windows folder to be in the root of the Yak file when unzipped however it is missing and I have to add it myself.

Expected:

example.yak/
├── manifest.yaml
└── net7.0-windows/
            ├── example.dll
            └── example.rhp

What the Yak Command line tool creates

example.yak/
├── manifest.yaml
├── example.dll
└── example.rhp

We need this folder structure so Yak recognises that for this version of our plugin we only support .net 7 as in the past we have supported other .net frameworks.

We suspect we are not using the right tags when running the Yak command line tool:

"C:\Program Files\Rhino 8\System\Yak.exe" build --platform win

Is there another option we should be using?

Thanks,
JNash

A quick question to clarify

example/
└── bin/
    └── Release/
//       #1 - manifest.yml <-- Is your manifest here?
        └── net7.0-windows/
//           #2 - manifest.yml <-- Or here?
            ├── example.dll
            └── example.rhp

@jnash The Yak CLI tool packages up everything inside the directory that it’s run in (everything except .yak files!). Are you running it in the Release/ directory? If you run the build command from here, then it should generate a package with the net7.0-windows/ directory at the top-level. You can run the spec command from this directory too. If any of this doesn’t tally with the behaviour that you’re seeing then please let us know!

example/
└── bin/
    └── Release/
        └── net7.0-windows/
            ├── manifest.yml <-- Our manifest is here 
            ├── example.dll
            └── example.rhp

This should solve your issue @jnash

1 Like

Yes, that was my issue. Thank you for your help!

1 Like