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

BuiltProjectOutputGroup target is missing dependency on target that sets AppConfig property #5433

Open
tmat opened this issue Jun 16, 2020 · 1 comment
Labels

Comments

@tmat
Copy link
Member

tmat commented Jun 16, 2020

As a result BuiltProjectOutputGroup may not include the generated .config file, depending on the order in which targets are executed.

BuiltProjectOutputGroup target includes the .config file by reading AppConfig property:

<_BuiltProjectOutputGroupOutputIntermediate Include="$(AppConfig)" Condition="'$(AddAppConfigToBuildOutputs)'=='true'">

this property is set in GenerateBindingRedirectsUpdateAppConfig but BuiltProjectOutputGroup does not depend on this target.

@rainersigwald
Copy link
Member

Notes:

$(AppConfig) can also be defined in PrepareForBuild

https://github.com/microsoft/msbuild/blob/9eb5d09e6cd262375e37a15a779d56ab274167c8/src/Tasks/Microsoft.Common.CurrentVersion.targets#L1119-L1122

But that looks only at @(None)/@(Content). The missing case is when there's no checked-in app.config file, but ResolveAssemblyReferences/GenerateBindingRedirects creates one.

There's a potential compat/perf problem with the straightforward fix: pulling RAR (and ResolveProjectReferences) into this target which was previously super fast could be bad. This needs to be thought through--can we just do it? Does it need conditions? Entirely opt-in, or not during design time, or ???

@AR-May AR-May added the triaged label Feb 21, 2024
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