I am building a .Net 6.0 library which is being loaded by another application located within an appliance. I have no control over the appliance or the loader app. This library requires references to the Microsoft.AspNetCore.App
shared framework. As this evidentially has not been added to the loader application, I get could not load assembly
errors for any packages from within the shared framework. Is there any way to force VS2022 to add the required dlls from the framework to the output folder on compile?
<PreserveCompilationContext>true</PreserveCompilationContext>
adds the reference dlls to the refs folder but not the runtime dlls required.
In the properties of the package in the library in VS, try to set
Include Assets
all .Then rebuild and test.
result: