novotnyllc / MSBuildSdkExtras

Extra properties for MSBuild SDK projects
MIT License
347 stars 42 forks source link

Unity & Mono support #112

Closed konraddysput closed 6 years ago

konraddysput commented 6 years ago

Hey,

Readme doesn't present any information about targeting Unity and Mono. Is there any way to prepare library to support these environment? Right now our customers using .NET Standard solution in Mono and Unity but we have a lot try/catch for these environments.

Thanks

clairernovotny commented 6 years ago

Unity and Mono do not currently have separate target framework's within NuGet. There's nothing I can do here until they do.

AArnott commented 5 years ago

Unity doesn't support NuGet anyway, from what I hear. But it would be a lightyear ahead if we could build a package that has a unity target framework folder anyway just so unity customers wouldn't have to enlist in our source code and compile it themselves or deal with downloading a .dll some other way.

clairernovotny commented 5 years ago

What would you suggest? NuGets tfm’s are hard coded and it’s really hard to make up one. I tried that approach once and it didn’t end well.

AArnott commented 5 years ago

We can write to any folder we want in a nuget package, so that part seems easy enough. I'm less familiar with the TargetFrameworks property sub-build, but I thought MSBuild.Sdk.Extras already adds to the set of allowed values there in order to get PCLs to work. As for getting nuget to install into a unity project, ya, that's not the goal here.

So I'm not sure what's left to research. But you're obviously the expert in this area, @onovotny. What do you think?

In fact, even if we couldn't pack the unity-targeting DLL, if we could just compile it as one of the several TFMs we build in a multi-targeting project, that would be a much better development experience than what I'm seeing in the MessagePack repo today.

konraddysput commented 5 years ago

@AArnott this is one of our case. We want to add precompilation condition to support Unity from our library in one .NET Standard solution. All we need is to use in few places UnityEngine.dll. The same problem we had for Mono application. We want to add much more information about Mono/Unity specific attributes in our library but now we can't.