C
C#8mo ago
blackSheep

✅ C# + raylib + freebsd

Hi All, I'm running FreeBSD 14 Release, dotnet 8.0 compiled from Ports and Raylib 5.0 downloaded from GitHub. When I run a simple sample helloworld I get this error msg: dandvv@i7_32Gb@freeBSD:~/dev/src/raylib$dotnet run /home/dandvv/dev/src/raylib/Program.cs(18,70): error CS0117: 'Color' does not contain a definition for 'RED' [/home/dandvv/dev/src/raylib/raylib.csproj] The build failed. Fix the build errors and run again. This is the directory structure on /home/dandvv/dev/src/raylib/ - Program.cs - Raylib-cs - bin - obj - raylib.csproj This is the sample code: https://pastebin.com/z9XnvaXT If I comment the lines where I use the "Color.RED" element the sample compile with no warnings and runs fine. Any light on that would be much appreciate.
Pastebin
C# Raylib - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
13 Replies
MODiX
MODiX8mo ago
.NET is a marketing term referring to a family of products, consisting of two different lineages. The .NET Framework ("netfx") lineage was introduced in 2002. This lineage runs only on Windows. Its most recent release is .NET Framework 4.8.1. While this lineage is still supported, very few new features are being introduced into it. Devs are encouraged not to target .NET Framework for new app development. The .NET Core ("netcore") lineage was introduced in 2016. This is a modern development platform which runs across many different OSes. The .NET Core 3.1 product was the last version in this lineage to bear the ".NET Core" name; and starting with the next release (.NET 5), the product was renamed to simply ".NET". .net6 in 2021, .net7 in 2022, .net8 in 2023 ... the next release in this lineage is .NET 9. This lineage is where new features are actively being developed. Devs are encouraged to target .NET for new app development. Nowadays, the ".NET" moniker usually refers to recent versions of the netcore lineage. When you create a new app targeting .NET (not .NET Framework!), you're targeting this newer, modern, cross-platform API surface and runtime.
arion
arion8mo ago
sry on phone, have I tried changing "RED" to "Red"?
MODiX
MODiX8mo ago
arion
REPL Result: Success
var red = System.Drawing.Color.Red;
var red = System.Drawing.Color.Red;
Compile: 240.867ms | Execution: 22.168ms | React with ❌ to remove this embed.
MODiX
MODiX8mo ago
arion
REPL Result: Failure
var red = System.Drawing.Color.RED;
var red = System.Drawing.Color.RED;
Exception: CompilationErrorException
- 'Color' does not contain a definition for 'RED'
- 'Color' does not contain a definition for 'RED'
Compile: 215.580ms | Execution: 0.000ms | React with ❌ to remove this embed.
leowest
leowest8mo ago
GitHub
GitHub - ChrisDill/Raylib-cs: C# bindings for raylib, a simple and ...
C# bindings for raylib, a simple and easy-to-use library to learn videogames programming - ChrisDill/Raylib-cs
leowest
leowest8mo ago
if u see the examples in the readme they are pascal case so Black, White. etc as arion noted
leowest
leowest8mo ago
No description
arion
arion8mo ago
Ain't camel case like camelCase and Pascal that way? :thinking:
leowest
leowest8mo ago
:catlost: yes im just ded thx
arion
arion8mo ago
npnp lmao
blackSheep
blackSheepOP8mo ago
Yep, that worked. such simple thing. Can't believe I didn't notice something like this.
Unknown User
Unknown User8mo ago
Message Not Public
Sign In & Join Server To View
MODiX
MODiX8mo ago
see $structure for most C# usage
lowercase
UPPERCASE
PascalCase
camelCase
MACRO_CASE
snake_case
kebab-case
Train-Case
lowercase
UPPERCASE
PascalCase
camelCase
MACRO_CASE
snake_case
kebab-case
Train-Case
Want results from more Discord servers?
Add your server