Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
P2P refs choose first tfm in multi-targting reference, not closest one #535
In my solution, I have a multi-targeting project creating the following outputs:
You can repro this by loading the following clairernovotny/microsoft-authentication-library-for-dotnet@d41e237.
Build src\Microsoft.Identity.Client and then look at the properties of the test project below (and of the other sample projects.
@onovotny What I am seeing is that build actually selects the correct TFM, (change output level to detailed and see /reference arg to compiler) but the property pane does incorrectly show the path of the first target framework.
I presume that you have worse symptoms than a bad path in the properties pane by the description of "so unit tests run for now" in your workaround commit. However, when I make a unit test from the net45 app that asserts that a method which returns the TFM does what I expect, it works fine. Do you have a (hopefully simple) repro for this causing unit tests to fail?
One thing I'm now noticing on top of the property pane being incorrect is that IntelliSense is showing me completions based on the surface are of the first TFM and not the one that a real build would use. I presume that has the same root cause as the bad property pane value.