Closed futuremotiondev closed 4 months ago
It is as 2nd half of the message says . You are missing an assembly reference. Something like this in your csproj: https://github.com/HinTak/Font-Validator/blob/aa6d6bc0f1b5eb257877a998f97dbb323f7ddabb/Compat/Compat.csproj#L32
This is really basic c# knowledge at the entry level, and better suited for stackoverflow, for example... nothing to do with sharpfont.
It is as 2nd half of the message says . You are missing an assembly reference. Something like this in your csproj: https://github.com/HinTak/Font-Validator/blob/aa6d6bc0f1b5eb257877a998f97dbb323f7ddabb/Compat/Compat.csproj#L32
This is really basic c# knowledge at the entry level, and better suited for stackoverflow, for example... nothing to do with sharpfont.
Your comment is irrelevant as the OP installed the library from NuGet. The project that you linked adds the reference manually without using NuGet at all. When using NuGet, the reference to the installed package should be added automatically.
@lr-devx unless night actually modifies and updates the cproj, I can't see how your comment is relevant...
@fmotion1 To address your issue, it seems that this happens with SharpFont 3.0.0 and later. When using V2.5.3, I do have the namespace available. This works for the time being until it gets fixed (if it will ever) or just add the reference manually as @HinTak said.
@lr-devx unless night actually modifies and updates the cproj, I can't see how your comment is relevant...
I'm pointing out that your answer doesn't (or partially) resolve the issue as installing the package from NuGet should work as much as adding the library manually. That much hustle is unnecessary.
My main point is that the CS0246 error and addressing messages about missing reference, is quite generic c# knowledge/experience, and not specific to sharpfont. There are probably dozens of discussions on stackoverflow, and more appropriate there. Unless you are suggesting that sharpfont is mis-packaged for nuget.
I apologize for placing this issue in the wrong forum. I am indeed new to C#, but trying to learn as much as I can every day. I appreciate the comments from everyone here despite the fact that my question is probably a bit too basic to be raised here.
I always was under the impression that if I install the NuGet package, the dependencies get installed along with that installation as @lr-devx said.
I'll make the change to my csproj
file and move forward.
Thanks all.
I am fairly new to C# and I'm trying to get a simple console app set up to use SharpFont. I installed the NuGet packages
SharpFont 4.0.1
andSharpFont.Dependencies 2.6.0
:But when I add
using SharpFont;
, I get:Here's a screenshot:
What am I doing wrong? Why isn't the
using
statement resolving?If anyone more experienced can help, it would be greatly appreciated.