❔ Cannot import another project
The image is the file structure of the solution. I'm trying to use the PasswordMangerLibrary. But it isn't letting me.
Program.cs:
Manager.cs:
I feel like this is something really easy to fix but keep in mind i have a fever and i'm not fully operational 😅 .
23 Replies
the compiler is giving me "CS0246" if that gives any info
The type or namespace name 'PasswordManagerLibrary' could not be found (are you missing a using directive or an assembly reference?)
did you add a project reference?
ie what's is shown if you expand "> Dependencies" in the console app in your image
no i have not added a project reference, how i do that?
what ide are you using?
rider
its probably in the context menu if right-click on the consoleapp item in the tree
looks to be right but it then failed to load my project
what 'looks to be right'?
gave me this C:\Users\Alexander\Documents\Programming-git\csharp\PasswordManager\PasswordManager\PasswordManager.csproj at (9:5)
That i added the project reference when doing the context menu on dependencies
is says that this csproj code is not allowed
[MSB4004] The "ItemGroup" property is reserved, and cannot be modified.
show the whole csproj
never seen that before, though 😅
that's off the PasswordManagerConsoleApp
though i did some stuff after i posted this
But the main question is here, should i import another project or is it just better to have a normal directory within the main project???
what would be more of the "correct approach"
I dont think itemgroup is meant to be inside propertygroup
that's what the context menu thingy did, not me
but imma try moving it either way
that seems to work
nice!
but still do you know the answer to the question I wrote before?
This question
"it depends"
my case for thinking like this is that i want to make a Console version and a GUI version and i want the Manager to be one thing that both use
then sure, makes sense to have the logic in a separate project
well so everything seems to be working now, it's compiling and Program.cs is calling the Trying function with success
does this whole post get deleted or it it saved?
Thanks alot for the help tho! 👍
$close
Use the /close command to mark a forum thread as answered
i cannot do it, either permissions error or the bot was not responding.
neither modix or accord
$close
Use the /close command to mark a forum thread as answered
accord seems to be down
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.