GH C# Dev Tutorial - Cannot locate bin folder

Hi all,

I’m just getting my feet wet with the great McNeel C# gh tutorial but I hit an early roadblock.

When I build the HelloGrasshopper solution, I do not see the component in Grasshopper. I cannot locate the bin folder that GrasshopperDeveloperSettings should point to. I know from the tutorial that it should be this folder:

But when I navigate to my VisualStudio project folder, there is no bin folder, I only see this:

I found this great post from David

that mentions that there should be a .gha file in the bin folder that is created.

Can anyone help me find the bin folder or determine why it is not being created?

I am running VisualStudio2019 and Rhino 7. I have the Rhino 7 Visual Studio extension installed:

Thank you!

If you go to properties for your project in Visual Studio, the Output path location where the bin folder is made can be specified there. A screengrab from one of my projects:

Thanks John,

When I check, my output path is blank

I attempted to manual create a bin folder and point the output path there like your screenshot, but when I press play and debug the solution, the bin folder that I manually created is still empty.

Maybe that points to it being a larger Visual Studio issue or problem with my installation?

Not sure if this means anything but I just noticed that my project in the solution explorer also looks different than the tutorial, no Properties or References items.

Tutorial Solution Explorer:

My solution Explorer:

Just a quick question, but did you actually Build your solution? The bin folder isn’t created until you do.
If I create a new component from the new template (which also shows a blank output path, probably meaning it heads to a default location), I also don’t see Properties and References either. Just sounds like you need to build it.

1 Like

An excellent question as I’m a complete newbie, I did not build the solution :slight_smile:

Unfortunately, after building, I still don’t see a bin folder in the project folder and the Output path is still blank. Here is what I see after clicking build solution:

Here’s the project folder after building:

I appreciate your help!

try browse and then select a folder where you want your dll file. It can’t be bin, if you haven’t chosen bin in VS.
Note that this won’t work if you have your project on a USB stick or anyting alike.

what are the errors you suppress?

Compiler Warning (level 2) CS1701

Assuming assembly reference “Assembly Name #1” matches “Assembly Name #2”, you may need to supply runtime policy

The two assemblies differ in release and/or version number. For unification to occur, you must specify directives in the application’s .config file, and you must provide the correct strong name of an assembly, as demonstrated in the following example code.

this might be the cause why it wouldn’t build the solution, but not warn you as warnings are suppressed.

If you want to start with VS, I’d strongly recommend long nguyens video tutorials, where (I think in day 2 or 3) he goes through the process of preparing your VS project, along with a ton of useful information:

1 Like

Amazing! Problem solved! :partying_face:

I have no idea how those warnings were suppressed - I did not do it intentionally. But after un-suppressing the warnings and trying to build again I saw that I needed .NET Framework 4.8 installed. I installed that from Microsofts website and now building the solution creates a bin file as it should and I can continue with the tutorial.

I had flagged Long Nguyens tutorials to watch later, I will definitely make my way through them. Seems extremely helpful as I transition from Python rhinoscript syntax to C# RhinoCommon.

Thank you both for your help!