You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I finally got around to doing something I wanted to do for a while: Packaging PicoGK as a Nuget package.
Nuget is the package manager that MS uses for .NET, and it makes installing modules very simple. No more running the PicoGK installer and cloning submodules. All you have to do is add the package to your project, and you can use PicoGK.
I'll rewrite the documentation in the coming weeks to reflect this, but it's currently a busy time for us. However, Apple's restrictions on new Mac hardware forced me to address this now, because our old installer stopped working on fresh systems.
Hello PicoGK
Here's a quick Hello World example of how to create a new project with PicoGK.
Open a command prompt and do the following:
Create a new console application:
dotnet new console -n HelloPicoGK
You now have a new console app project. Now add the PicoGK Nuget package by going into the new project subdirectory and adding it:
cd HelloPicoGK
dotnet add package PicoGK
PicoGK is now available for use in your app. To test it, you can replace the contents of Program.cs with this code:
using PicoGK;
internal class Program
{
private static void Main(string[] args)
{
Library.Go(0.5f, Test.Task);
}
}
class Test
{
public static void Task()
{
Library.oViewer().Add(Utils.mshCreateCube());
}
}
Compile and run.
You can of course also do all of this set up using the Visual Studio/Visual Studio Code user interface.
Seeing the PicoGK code
By default, you will not see the PicoGK source code, when you debug. To understand PicoGK, it is often desirable to see what's going on behind the scenes. If you want to, you can enable two settings in Visual Studio Code which allow you to step into the PicoGK package. The easiest way to find them is to use the search bar in the settings.
Open Settings > Settings
Search for Just my code and uncheck the checkbox next to Csharp > Debug > Just My Code
Search for Nu Get Org Symbol and check the checkbox next to Csharp > Debug > Search Nu Get Org Symbol Server
After you've done this you can step into the PicoGK module, even though the source code is served via Github (it will take a moment to download if you do this the first time).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear all,
I finally got around to doing something I wanted to do for a while: Packaging PicoGK as a Nuget package.
Nuget is the package manager that MS uses for .NET, and it makes installing modules very simple. No more running the PicoGK installer and cloning submodules. All you have to do is add the package to your project, and you can use PicoGK.
I'll rewrite the documentation in the coming weeks to reflect this, but it's currently a busy time for us. However, Apple's restrictions on new Mac hardware forced me to address this now, because our old installer stopped working on fresh systems.
Hello PicoGK
Here's a quick
Hello World
example of how to create a new project with PicoGK.Open a command prompt and do the following:
Create a new console application:
You now have a new console app project. Now add the PicoGK Nuget package by going into the new project subdirectory and adding it:
PicoGK is now available for use in your app. To test it, you can replace the contents of
Program.cs
with this code:Compile and run.
You can of course also do all of this set up using the Visual Studio/Visual Studio Code user interface.
Seeing the PicoGK code
By default, you will not see the PicoGK source code, when you debug. To understand PicoGK, it is often desirable to see what's going on behind the scenes. If you want to, you can enable two settings in Visual Studio Code which allow you to step into the PicoGK package. The easiest way to find them is to use the search bar in the settings.
Settings > Settings
Just my code
and uncheck the checkbox next toCsharp > Debug > Just My Code
Nu Get Org Symbol
and check the checkbox next toCsharp > Debug > Search Nu Get Org Symbol Server
After you've done this you can step into the PicoGK module, even though the source code is served via Github (it will take a moment to download if you do this the first time).
Enjoy,
Lin
Beta Was this translation helpful? Give feedback.
All reactions