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

Design Time Builds failing if we have some derived properties in Implicit or leading imports #5319

Closed
Anipik opened this issue Apr 27, 2020 · 1 comment
Labels

Comments

@Anipik
Copy link

Anipik commented Apr 27, 2020

In case of multple TargetFrameworks, DesignTimeBuild uses msbuild setproperty function to set the TargetFramework property.

So this updates a property if it exists, otherwise it searches for the first unconditioned PropertyGroup in the project file to add the property to. This is always going to be after any implicit imports as well as explicitly leading imports. This appears to be the long-standing behavior of SetProperty. Contrast that to SetGlobalProperty, which will treat the property as global.

Hence any property derived from targetFramework in implicit imports and leading imports will not be evaluated correctly.

There is a detail repro here dotnet/runtime#33427 (comment)

cc @ericstj @ViktorHofer

similar issue OmniSharp/omnisharp-roslyn#1738

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

No branches or pull requests

3 participants