C
C#5mo ago
tanuki!

✅ CopyLocalLockFileAssemblies in csproj not being respected?

i'm building an addin for autodesk revit which uses different versions of net depending on its version - .net framework 4.8 for older versions, and .net 8 for the latest. i converted my project to an sdk-style project so that i can target any revit version i'd like and use the correct .net version. this worked for the framework builds, but since .net 8 doesn't copy nuget dlls to the build dir anymore, i added <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> to my .csproj file and everything worked when i built my dll for .net 8. now, in an effort to restructure my project, i moved the .csproj file to a separate src/ProjectName folder (previously in the root folder). for some reason, this broke the behavior that i was relying on earlier. the .net framework builds work alright, but building for .net 8 results in the plugin failing to load due to it being unable to find those dlls in the place it's expecting them. how can i re-enable copying dlls to the build dir for debug/release builds?
3 Replies
tanuki!
tanuki!OP5mo ago
publishing the plugin and copying the dlls to the build dir does work, but i'd rather not have to do that
reflectronic
reflectronic5mo ago
generally for this type of scenario you would use <EnableDynamicLoading>true</EnableDynamicLoading>
tanuki!
tanuki!OP5mo ago
unfortunately that didn't work for my use case. thankfully, i found my issue: apparently <UseCommonOutputDirectory> was causing the dlls to not be copied. my issue is solved, but i appreciate the suggestion :3
Want results from more Discord servers?
Add your server