C
C#11mo ago
Gulla

Unity missing assembly after nuget import?

So I recently imported System.Management.Automation.dll from microsoft.powershell.sdk.6.1.2.nupkg (lastest version I think to have the compatible .net standard framework), and it recognized the
using System.Management.Automation;
using System.Management.Automation;
however it gave me this error: "Assembly 'Assets/Plugins/System.Management.Automation.dll' will not be loaded due to errors: Unable to resolve reference 'Microsoft.Management.Infrastructure'. Is the assembly missing or incompatible with the current platform? Reference validation can be disabled in the Plugin Inspector." How can I resolve this issue? Thanks in advance.
3 Replies
reflectronic
reflectronic11mo ago
i mean, you can't just import the one DLL, you need to add all of the dependencies too it is going to be really painful without being able to use NuGet, yeah
Buddy
Buddy11mo ago
you can't use NuGet in Unity (not directly). You must drop the DLL files and their dependencies in your asset folder, preferably in a subfolder under assets
Gulla
GullaOP11mo ago
thank, I figured it meant that I needed the Microsoft.Management.Infrastructure.dll. I got it from the Microsoft.Management.Infrastructure package thank also, I copied the DLL from the .net standard folder into a folder with all my other custom added DLL and the error disappeared
Want results from more Discord servers?
Add your server