Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProjectReference support #5

Open
FiniteReality opened this issue Feb 18, 2020 · 3 comments
Open

ProjectReference support #5

FiniteReality opened this issue Feb 18, 2020 · 3 comments

Comments

@FiniteReality
Copy link
Owner

This is an absolute must because it makes MSBuild in .NET Core so much nicer to work with.

https://github.com/microsoft/msbuild/blob/master/documentation/ProjectReference-Protocol.md

Assuming this is up to date, we could reference it while implementing ProjectReference support for our own projects. We should be careful to not trip up everything else though.

@FiniteReality
Copy link
Owner Author

Looks like ProjectReference mostly just works in our case, at least for native<->native dependencies.

I likely still need to write my own reference resolver to augment ResolveAssemblyReferences, because the built-in one expects .NET assemblies, which, well, won't work with native libraries 😛

@FiniteReality
Copy link
Owner Author

@(AdditionalIncludeDirectory) should be exposed to references so that a library which uses them can safely be used by dependents, e.g.:

  • MyApplication (include A)
    • MySubLibrary (Include B)
      • MySubSubLibrary (Include C)

MyApplication should have access to A, B and C, while MySubLibrary should have B and C.

@FiniteReality
Copy link
Owner Author

So as it turns out, as long as you manually specify ReferenceOutputAssembly="false", OutputItemType="None" and CopyToOutputDirectory="PreserveNewest", .NET applications can reference native libraries (and probably applications too) just fine. Neat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant