Closed MisinformedDNA closed 3 years ago
See #92 Assuming you do not have earlier versions of VS, this is as intended. If you target an earlier runtime then grab an SDK/VS instance that expects a later runtime, it will try to use props, targets, etc. that don't exist and fail in weird and unclear ways. It would be like if I used a product that added method foo in version x, and I call foo but use an earlier version—it would have no idea what foo is.
Does that sound reasonable?
Sorry, I'm not following. MSBuildLocator targets net46;netcoreapp2.1
, so why would net5.0
work and not netcoreapp3.1
?
MSBuildLocator does support netcoreapp3.1, but if you want to target it, you need an MSBuild that was built with netcoreapp3.1 (or something older) in mind, or else it will try to use things netcoreapp3.1 doesn't know about. So if you have an older VS, SDK, etc., it can find those; it just won't find the 16.8 version because it's too new.
Are you able to target net5.0? If not, can you try downloading an older version of VS, say, 16.4, and checking that it finds it?
No I can target net5.0, I'm just not understanding. It's fine.
Similar to https://github.com/microsoft/MSBuildLocator/issues/17,
MSBuildLocator.QueryVisualStudioInstances()
returns zero results.Project is targeting
netcoreapp3.1
and I'm running within VS 16.8.4 (Enterprise).Packages:
NOTE: It works fine if I target
net5.0
.