-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add multi targeting to projects #17
Conversation
- Support compiling with WinForms in .NET 7 on Mac - Add VS debug targets for Rhino 8 netfx/netcore - Include launch.json/tasks.json for VS Code to make it easier to start debugging on Mac - Remove VS for Mac build
e5c12ab
to
4af2620
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other Questions
- Any reason not to include a
settings.json
{
"dotnet.defaultSolution": "MySolutionName.sln"
}
- Should we include a build netfx task?
- When using
dotnet new rhinocommand --help
I see quite a few options.-lang
and-type
would be good to include possible options as I wasn't sure what options were available until I entered a wrong value by runningdotnet new rhinocommand -lang --help
the same way--version
is done--version <6|7|8>
would be great - I like
-sample
, awesome to find that! I'll include that in the guide - Everything else I've tried works.
- Everything builds on both platforms (Besides ZooManager on mac)
<Exec Command=""$(YakExecutable)" spec" WorkingDirectory="$(OutputPath)" Condition="$(BuildYakPackage) == 'True'" /> | ||
<Exec Command=""$(YakExecutable)" build" WorkingDirectory="$(OutputPath)" Condition="$(BuildYakPackage) == 'True'" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The yak building, is like magic @cwensley. I like it a lot!
One issue I have is that SPEC is always run. So if you create a manifest.yml
in your build directory, spec will still run and your manifest is ignored. I think if there is a manifest.yml besides the .csproj, it should use that and not run yak spec. Happy to discuss this.
Now, mucking around I do see that it works like the nuget build in that it takes info from the assembly. Which is actually awesome. And really removes the need for a manifest.yml!
If I change these csproj attributes it reflects in the manifest, which is part of yak spec
neat.
I think it would be really good to make sure these always exist in the .csproj and are documented like so.
<Version>4.0.0</Version> <!-- Specifies Assembly & Yak Version -->
<Company>Yakult</Company> <!-- Specifies Yak Authors -->
<Description>Well. It's yakky!</Description> <!-- Specifies Assembly & Yak Description -->
Now, the tricky attributes...
- Guid (Can be obtained from assembly)
- Icon (Is not obtained from assembly)
- Keywords (Is not obtained from assembly)
I'm sure these can be gleamed from the assembly as well. But I don't think they are
Yak Code
Possibly we should add a YouTrack to gleam these attributes as well. But that's another problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I had thoughts of supporting a custom manifest.yml. Ideally this target can be added to a separate nuget package perhaps "RhinoYakPackage" so we can simplify the projects and also have a better "out of the box" experience. I initially thought of adding to RhinoCommon nuget package but that wouldn't work with older rhino versions (e.g. if you want to target RhinoCommon 8.0 for example).
"program": "C:\\Program Files\\Rhino 8\\System\\Rhino.exe", | ||
"targetArchitecture": "x86_64", | ||
}, | ||
"args": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would love it if Grasshopper opens when I debug a GH Plugin
"args": [], | |
"osx": { | |
"args": ["-runscript=Grasshopper"], | |
}, | |
"windows": { | |
"args": ["/runscript=\"Grasshopper\""], | |
}, |
I'm quite sure the args is correct, but I've never used an osx/windows condition? Would the above work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These args should be added to the existing "osx" and "windows" sections, not create new ones just for args. Yes it should work, though I think on Windows it should be "/runscript=_Grasshopper", and macOS "-runscript=_Grasshopper", with underscores so it is language agnostic. This should also be applied to the VBGrasshopper template too.
We don't include a .sln file, and the C# VSCode extension automatically will pick up the .csproj and/or .sln and recent builds even generates a .sln for you.
Why build netfx? It already builds all tfm's, net45, net48, net7.0 if specified. Do you mean a launch.json config with netfx on Windows? If so, yes we could to match what we have in the VS launchSettings.json.
-lang and -type are built-in to dotnet new (you will see it in the "Options" section when using --help). I'm not sure we can add any additional help text to it.
👍
Yay!
Yep, Zoo is Windows only currently. |
Fixes #16