Tofaa
Have public static values accessible thru the class that inherited this class
I understand the title is rather silly but i couldnt word it properly to fit a title. I come from a java background, and am currently making something where i require an exposed api interface and also code-generated values inside the interface. For clutter reasons I'd like to seperate the interface and the static methods. In java for example
In the code above i can easily access A.VALUE_ONE without exposing AImpl and VariousAs, but theres no way (atleast from what i can tell) to replicate such behaviour in c#.
29 replies
Help using generics and maps
I've been trying to make a basic listener consumer system for a Minecraft server implementation im making in c# from scratch. I come from a java background so c# is fairly similar but im stuck on trying to make a generic map of an unknown type at runtime.
I'm trying to rewrite this to c#.
I have
Any help would be fantastic, thank you :D
32 replies
❔ ✅ Nuget doesnt find any packages
PS C:\Users\tofik\Desktop\Github\Blossom> dotnet add package Raylib-CsLo --version 4.2.0.9
Determining projects to restore...
Writing C:\Users\tofik\AppData\Local\Temp\tmp81F6.tmp
info : X.509 certificate chain validation will use the default trust store selected by .NET for code signing.
info : X.509 certificate chain validation will use the default trust store selected by .NET for timestamping.
info : Adding PackageReference for package 'Raylib-CsLo' into project 'C:\Users\tofik\OneDrive\Desktop\Github\Blossom\Blossom.csproj'.
info : Restoring packages for C:\Users\tofik\Desktop\Github\Blossom\Blossom.csproj...
error: NU1101: Unable to find package Raylib-CsLo. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages
error: Package 'Raylib-CsLo' is incompatible with 'all' frameworks in project 'C:\Users\tofik\OneDrive\Desktop\Github\Blossom\Blossom.csproj'.
PS C:\Users\tofik\OneDrive\Desktop\Github\Blossom>
For some reason it doesnt find anything, VS itself also doesnt find anything but the microsoft packages, same with rider
12 replies
❔ ✅ Error MSB4018 : The "ResolvePackageAssets" task failed unexpectedly. When building.
Full Stacktrace:
Use build tool: C:\Program Files\dotnet\sdk\8.0.100-preview.5.23303.2\MSBuild.dll
CONSOLE: MSBuild version 17.7.0-preview-23281-03+4ce2ff1f8 for .NET
CONSOLE: Build started 02.08.2023 19:54:44.
CONSOLE: Project "C:\Users\tofik\AppData\Local\Temp\Topocix.proj" on node 1 (default targets).
CONSOLE: ControllerTarget:
CONSOLE: Run controller from C:\Program Files\JetBrains\Rider\r2r\2023.2.0R\53AFC7C05396A24E65EC4950CAD773F\JetBrains.Platform.MsBuildTask.v17.dll
0>Microsoft.NET.RuntimeIdentifierInference.targets(314,5): Message NETSDK1057 : You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
0>Microsoft.PackageDependencyResolution.targets(266,5): Error MSB4018 : The "ResolvePackageAssets" task failed unexpectedly.
NuGet.Packaging.Core.PackagingException: Unable to find fallback package folder 'C:\Users\tofik\AppData\Roaming\Godot\mono\GodotNuGetFallbackFolder'.
at NuGet.Packaging.FallbackPackagePathResolver..ctor(String userPackageFolder, IEnumerable
1 fallbackPackageFolders)
at Microsoft.NET.Build.Tasks.NuGetPackageResolver.CreateResolver(IEnumerable
1 packageFolders)
at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheWriter..ctor(ResolvePackageAssets task)
at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader.CreateReaderFromDisk(ResolvePackageAssets task, Byte[] settingsHash)
at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader..ctor(ResolvePackageAssets task)
at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups()
at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore()
at Microsoft.NET.Build.Tasks.TaskBase.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)28 replies