© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
C
C#
•
3y ago
•
7 replies
Sher
❔ Read files from a library
I created a simle library using
.NET 7
. I have
.json
.json
and
.css
.css
files in this lib which I need to access during runtime
. I tried to use
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
But files get copied to the library output directory
, so the main project can
't read them
.
I can access files using full path to them
, but this way I will need to know the ralative path all the time
, which I don
't really like
.
How can fix the issue
?
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
reading files from a directory
C
C# / help
2y ago
❔ Read bits from a byte[] array
C
C# / help
3y ago
✅ referencing `WebApplication` from a class library
C
C# / help
3y ago
❔ Implementing security from a web library
C
C# / help
3y ago