Could not load file or assembly 'CsvHelper, Version=30.0.0.0
Could not load file or assembly 'CsvHelper, Version=30.0.0.0, Culture=neutral, PublicKeyToken=8c4959082be5c823' or one of its dependencies. The system cannot find the file specified.
I'm getting the same error in 30.0.0.1. Maybe it's worth mentioning I'm using .NET 6.0. I also tried going back to versions 28 and 29. None of them copy the DLL to the output directory. It definitely got downloaded by nuget and put in the global cache, it's just not getting copied.
Getting the same on a .NET 7 project
Same here. The .dll is not generated into the bin/Debug folder after building the code. I see that the assembly is added as implicit on .Net7 dependencies. However, it doesn't load. Nuget targets version 30.0.1 but the assembly is 30.0.0. I tried an App.config with the matching but didn't work. Some suggestions?
Solved by adding
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
to the csproj
Solved by adding true to the csproj
Where in the csproj did you add that?
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net7.0</TargetFramework> <Nullable>enable</Nullable> <ImplicitUsings>enable</ImplicitUsings> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> </PropertyGroup> </Project>
@danielmartinezd I tried your fix for the issues but it didn't work for me.
I'm not sure if there is anything I can do about this. It sounds like a VS or NuGet bug.
My issue got resolved. Turns out i had a dangling Reference to old version in my startup project which was creating the issues.