C
C#ā€¢3y 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ā€¢3y ago
Possibly cached in the output folder. Is there a reason you can't use a ProjectReference or a real PackageReference?
Welles
WellesOPā€¢3y 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ā€¢3y ago
If you're using packagereference, I don't know why you're manually copying anything around
Welles
WellesOPā€¢3y ago
well it's not a nuget package, so that might be my issue then it's a local built dll
333fred
333fredā€¢3y ago
If it's not a nuget package, you're not using packagereference
Welles
WellesOPā€¢3y ago
I think I know what is happening haha
333fred
333fredā€¢3y ago
You're using Reference
Welles
WellesOPā€¢3y 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ā€¢3y ago
Well, then you can't use that PackageReference šŸ™‚
Welles
WellesOPā€¢3y ago
gotcha! reference and hintpath then?
333fred
333fredā€¢3y ago
Yup Though ProjectReference would be better
Welles
WellesOPā€¢3y 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ā€¢3y ago
This is why I'm suggesting using a projectreference Would make everything much simpler
Welles
WellesOPā€¢3y ago
Yeah, got it to work finally, but indeed that might be better. I'll try it out. Thanks! šŸ™‚
Want results from more Discord servers?
Add your server