C
C#ā€¢2y ago
Welles

Vscode and local reference to dll

So I built a package that I want to reference in vscode. I copied the DLL, added the reference de csproj and restored the project. Now the first time everything worked, however when updating the package with new methods and doing the same copy + restore, the new method is not found. Using omnisharp in a devcontainer. Seems like something is cached somewhere or something.
14 Replies
333fred
333fredā€¢2y ago
Possibly cached in the output folder. Is there a reason you can't use a ProjectReference or a real PackageReference?
Welles
Wellesā€¢2y ago
Well other package is a github repo where I'm adding methods to do a PR later. It's built in vs studio. My main project that uses the package is built in vscode in a devcontainer šŸ™‚ using packageReference btw copied the dll to .net6.0 folder and then added it to csproj
333fred
333fredā€¢2y ago
If you're using packagereference, I don't know why you're manually copying anything around
Welles
Wellesā€¢2y ago
well it's not a nuget package, so that might be my issue then it's a local built dll
333fred
333fredā€¢2y ago
If it's not a nuget package, you're not using packagereference
Welles
Wellesā€¢2y ago
I think I know what is happening haha
333fred
333fredā€¢2y ago
You're using Reference
Welles
Wellesā€¢2y ago
they have a nuget package as well haha omg <PackageReference Include="CardanoSharp.Blockfrost.Sdk" Version="0.0.1.0" /> but I want to use my own version as I'm changing stuff so reference it is
333fred
333fredā€¢2y ago
Well, then you can't use that PackageReference šŸ™‚
Welles
Wellesā€¢2y ago
gotcha! reference and hintpath then?
333fred
333fredā€¢2y ago
Yup Though ProjectReference would be better
Welles
Wellesā€¢2y ago
Ok still doessn't work. This weird... might be something I need to do in visual studio when building the dll Alright I need to do something in visual studio, method is not even there when I disassemble
333fred
333fredā€¢2y ago
This is why I'm suggesting using a projectreference Would make everything much simpler
Welles
Wellesā€¢2y ago
Yeah, got it to work finally, but indeed that might be better. I'll try it out. Thanks! šŸ™‚