C
C#16mo ago
Pillow

❔ Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly

Full error:
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'xTile, Version=2.0.4.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'xTile, Version=2.0.4.0, Culture=neutral, PublicKeyToken=null'
at ToasterMapCLI.ToasterMapCLI.Main(String[] args)
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'xTile, Version=2.0.4.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'xTile, Version=2.0.4.0, Culture=neutral, PublicKeyToken=null'
at ToasterMapCLI.ToasterMapCLI.Main(String[] args)
the part of the csproj for it
<ItemGroup>
<Reference Include="xTile" HintPath="C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\xTile.dll" />
</ItemGroup>
<ItemGroup>
<Reference Include="xTile" HintPath="C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\xTile.dll" />
</ItemGroup>
that dll exists, both in the hintpath and the compiled folders though
15 Replies
Pillow
PillowOP16mo ago
compiling via dotnet publish -c Release -r win-x64 --self-contained true btw does anyone have any ideas?
blueberriesiftheywerecats
Try copy paste that dll to your project
Pillow
PillowOP16mo ago
Where exactly? Like just beside the csproj or
blueberriesiftheywerecats
You can create smth like libs folder for it inside your project
Pillow
PillowOP16mo ago
do I then reference that dll?
Pillow
PillowOP16mo ago
same issue
<ItemGroup>
<Reference Include="xTile">
<HintPath>libs\xTile.dll</HintPath>
<Private>true</Private>
<CopyLocal>true</CopyLocal>
</Reference>
</ItemGroup>
<ItemGroup>
<Reference Include="xTile">
<HintPath>libs\xTile.dll</HintPath>
<Private>true</Private>
<CopyLocal>true</CopyLocal>
</Reference>
</ItemGroup>
blueberriesiftheywerecats
Try ../../libs...
Pillow
PillowOP16mo ago
same thing
blueberriesiftheywerecats
Stack Overflow
Can't use an external DLL : FileNotFoundException
I have 2 projects. The first one just generates a DLL. The second one needs the first DLL. But when I call a method from the DLL, I have a FileNotFoundException, with this message : BDD, Version=...
Pillow
PillowOP16mo ago
it is in the same directory as the dll, it gets copied there on build
SinFluxx
SinFluxx16mo ago
I can't tell if this is talking about the same issue? https://github.com/dotnet/sdk/issues/9594
GitHub
"Could not load file or assembly" when trying to reference a librar...
@VictorioBerra commented on Sun May 06 2018 Could not load file or assembly when trying to reference a library from a middle-man library. dotnet --version = 2.1.105 General If I have a netcoreapp2 ...
Pillow
PillowOP16mo ago
possibly project 2, but that's 5 years old so probably fixed?
blueberriesiftheywerecats
Can you give me project and dll, i will try today later? Or maybe only dll
Accord
Accord16mo ago
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.
Want results from more Discord servers?
Add your server