100 Replies
@leowest
ok
so is this for u or some school home work?
i now rebuilded my class lab
ye smth like that
for school?
ye
if its for school I would assume ur techer told u what net to use no?
its discover urself type
.net 8 is the newest, .net framework is what usually is used in school
i set it up as net6 if version error will come up ill change it
ok so you set up 1 Console app as .net 6
then you setup 1 class library as .net 6
then on console app
i have those two dll files
u right click Dependencies
Biton.dll use the Unit4.dll
and add project reference
]
add them both?
so in my example I create Biton6 and Biton62
you case is Biton and Unit4
if Biton uses Unit4
then on Biton you add Unit4 as project refrence
and on Console app u add Biton as reference
or however your order is
im adding them like that ye?
so I have 3 projects
in my solution
you create all the projects so its better to reference the project
not the dll
the unit4 code is like unkwon
how i do that?
like i need to send the teacher the dll file not the project
yes I understand that
u will send the teacher your resulting folder that you compile/build
so are all the 3 projects in the same solution?
i have the Biton and just a random project and tthe unit4 is smth the teacher gave us and i dont have the source code
its just a refrance for us
ok so the way you have things
u would only reference biton
unit4 u would drag and drop to the console app solution explorer
Ok
wdym
like how i do that i have only the dll file of unit4
u do that to unit4.dll
copy paste
this ?
yes
ok
there is no Copy
so now right click COnsoleProject
Add project reference
and reference Biton
i cant see add project refrance
i have add refrance Web Refrance
u dont see that
Reference
ok
first item should be projects right
so u can check biton
ye
ok
now you can use biton on your COnsole Project
and when u build console project it will build everything to the same folder
so when you run COnsole in debug does it work
i think it doesnt work
right click biton and select build
ok
ive done it
still dont work
ok what is the code inside Biton
u want me to send the file?
dont call this number its not mine
remove code then
I already seen it
kk
so it looks ok when u build Biton
does it succeed
ye
1>Done building project "Biton.csproj".
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Build started at 19:37 and took 00.613 seconds ==========
ok
and on your console it still does not can u show me the solution explorer with the references open
it should look like this
loadin the image
Console one
Biton is right
u have project in it?
see my image above
it needs to look like that
biton is right but I dont see your COnsole project
the assembly is tehre cuz of the unit 4 idk how u got that project
no read what I am saying
I want to see the COnsole one
the Biton is RIGHT
u have not reference the project there like mine
so it doesn't know biton
um
remove that
removed
then right click References add project reference and select biton
did you create .net framework console project?
ye
ah I see that is why its different
your dll is .net 6
why did u make a console project that is .net framework
that makes no sense
school said
ok then u do have a .net requirement when I ask u said u dont
ok let me change mine sec
Ok
btw i really appreciate ur help
its all good 😉
can i send u the class lab and ull make the dll file and ull send me or this to much to ask ? Xd
so yeah
u do that and it will show like u had before
my bad because .net framework is different so I wasn't sure we were on the same page
so now the problem is u need your library to be .net framework as well otherwise it wont recognize it im sure
ohhhh
make sense
unless u make it mmm target .netstandard
but u dont have to you probably need ti all to be .net framework due to what u said above
one sec iom doin smth
so after u change it to .net framework
add it as a project reference to your console
you should be able to use the methods just fine
then all u do is run
and u should see all files in your output folder like this
do i need to build ?
yes
MAN UR LEGEND
it works now?
ye
ty so much man
so the problem is
schools these days mainly teach people on old .net framework
its legacy
that it was .net like the project
so its a bit confusing when u mix it with newer .net
can i ask u where u from?
so always keep in mind what framework you're using
brazil
oh cool
$close 😉
Use the /close command to mark a forum thread as answered
ty so much