Building to Windows 10 (UWP)

I have an unity application that is is built to UWP( windows 10) and run in Hololens. I have some code that needs an external package that i install in the generated project(s) with nuget. This will update the project.json file. The problem is when i rebuild from unity. The project.json file is reset.
How can i change the content in the generated project.json(so it won’t be reset to default), ideally from Unity.?

(I have tried to add the dlls from the nuget package to assets\plugin, but then i get a serialization error when building the generated solution to master build from the UWP visual studio solution)

What is the best practise adding external nuget packages?

The fun part is Microsoft already abandoned project.json support, and reverted back to the old csproj format. So I suspect there’s probably no clear long term answer for this unless you found a way to make this work using csproj instead of project.json.

The project.json usually works fine for me, it’s only manually added references that will be reset (which seems logical).

What’s the exact error that you get when you try to add the .dll to the plugins folder? Have you configured the settings correctly?

The two dll i have added is Microsoft.IdentityModel.Clients.ActiveDirectory and Microsoft.IdentityModel.Clients.ActiveDirectory.Platform they come from the nuget package Microsoft.IdentityModel.Clients.ActiveDirectory. In the generated visual studio projects, it works fine building to Debug and Release. By selecting Master i get the error: Error generating serialization code for the root type Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationResultEx: Cannot find type System.Uri in module CommonLanguageRuntimeLibrary.

The root cause for the problem was the dlls added in asset\plugins. To solve the problem with the serialization i needed to check the Don’t process checkbox in the platform settings for the dll in unity before building to uwp.