✅ Adding Dependencies for a Script

I need to be able to run the example scripts given in the readme of the following library: https://github.com/Finzenku/Ps2IsoTools. I have been able to install .net on Linux, and have successfully installed the library into a project. However, I can't figure out how to properly import the library to allow for the example scripts to be run.
14 Replies
Angius
Angius12mo ago
If you're using a competent IDE, you can just write the code and use quick fixes to import the appropriate namespace If not, you'll have to import it manually with a using at the top of the file
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Gandhi Gaming 1869
Yeah, I'm just trying to run the example code they provided there. I'm not, at least yet, trying to at least write any significant code Right now the code I'm trying to run is the following
using Ps2IsoTools;

class TestClass{
static void Main(string[] args){
using (var reader = new UdfReader("/home/Downloads/Wallace & Gromit - The Curse of the Were-Rabbit (USA).iso")){

// Get list of all files
List<string> fullNames = reader.GetAllFileFullNames();

// FileIdentifiers are used to reference files on the ISO
FileIdentifier? fileId = reader.GetFileByName("file-name");

if (fileId is not null)
{
// // Read data from file
// using (BinaryReader br = new(reader.GetFileStream(fileId)))
// {
// Console.WriteLine(br.ReadString());
// }

// // Copy file from the ISO to your local drive
// reader.CopyFile(fileId, "path-to-copy-to");
System.Console.WriteLine(fileId.ToString());
}
}
}
}
using Ps2IsoTools;

class TestClass{
static void Main(string[] args){
using (var reader = new UdfReader("/home/Downloads/Wallace & Gromit - The Curse of the Were-Rabbit (USA).iso")){

// Get list of all files
List<string> fullNames = reader.GetAllFileFullNames();

// FileIdentifiers are used to reference files on the ISO
FileIdentifier? fileId = reader.GetFileByName("file-name");

if (fileId is not null)
{
// // Read data from file
// using (BinaryReader br = new(reader.GetFileStream(fileId)))
// {
// Console.WriteLine(br.ReadString());
// }

// // Copy file from the ISO to your local drive
// reader.CopyFile(fileId, "path-to-copy-to");
System.Console.WriteLine(fileId.ToString());
}
}
}
}
and I'm getting the errors /home/henry/ps2_editing/Program.cs(5,26): error CS0246: The type or namespace name 'UdfReader' could not be found (are you missing a using directive or an assembly reference?) [/home/henry/ps2_editing/ps2_editing.csproj] /home/henry/ps2_editing/Program.cs(11,2): error CS0246: The type or namespace name 'FileIdentifier' could not be found (are you missing a using directive or an assembly reference?) [/home/henry/ps2_editing/ps2_editing.csproj]
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Gandhi Gaming 1869
yeah it is within a csproj
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Gandhi Gaming 1869
here's the .csproj file for the project: `<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net6.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> </PropertyGroup> <ItemGroup> <PackageReference Include="Ps2IsoTools" Version="1.0.1" /> </ItemGroup> </Project>
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Angius
Angius12mo ago
It's there my dude
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Gandhi Gaming 1869
Is there a way to figure out what those statments should be without a configured IDE?
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Gandhi Gaming 1869
Yeah, that makes sense, I'll configure the IDE and add the necessary use staements.
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server
More Posts
✅ How to make installer for .net framework 4.7.2Hello, I am building a WPF plugin for AutoCAD. When i build solution i get 5 dlls, the main dll is ❔ Send mail using API in Blazor WebAppI am trying to use a form to send mail vai an API from .Net core . How can I implement the logic in ❔ StrafingSo I am kinda new to unity and used a tutorial for strafing. Strafing works, but it displays the wro❔ Difference between using readonly or { get; }?The only difference I can think of is that if we use `{ get; }` then we are converting from a field ❔ Avoid infinite recursion in STJ convertersThere are so-so many cases where I only want to customize reading up a type in System.Text.Json, but❔ how to export project to .exeHey I have a project I'm trying to export to .exe. I see a lot of videos but their layout looks diff❔ How to access a button from a different class?Hello. Recently, I was developing a project and decided to start splitting my code into separate fil✅ Trouble importing LoggerService namespace with ILoggerService in .NET Core APICould someone help me with this error? I can't import the LoggerService namespace no matter what I t✅ What's the easiest type of information storage?I'm new to C# and when I was starting out with Python, the first type of data storage I learned was Unable to create an object of type 'DBCSDBContext'. For the different patterns supported at design tHey I've developed an application using Entity Framework Core and PostgreSQL, and I've encountered a