sdk icon indicating copy to clipboard operation
sdk copied to clipboard

AssemblyName.exe.withSupportedRuntime.config files generated after migration to SDK style projects

Open payn-git opened this issue 2 years ago • 2 comments

Issue Description

We have exe type projects which are part of our pipeline which during compilation produce AssemblyName.exe and AssemblyName.exe.config files. After migrating those projects to SDK style projects while target type or frameworks didn't change. System started to generated additional files with "exe.withSupportedRuntime.config" which are not expected by integration pipeline and build will fail.

Steps to Reproduce

compile SDK style exe type project which is defined for NET Framework 48

Attaching binary log from compilation of same project which is defined as old style and SDK to see how different output are produced.

Expected Behavior

exe.withSupportedRuntime.config files are not generated

Actual Behavior

exe.withSupportedRuntime.config is generated

Analysis

none

Versions & Configurations

Build Engine version 16.11.2+f32259642 for .NET Framework, Win 10 64bit. Project_NonSDKStyleProject.zip

payn-git avatar Aug 11 '22 19:08 payn-git

This seems like an SDK concept: https://github.com/dotnet/sdk/blame/main/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.GenerateSupportedRuntime.targets Moving there.

Forgind avatar Aug 11 '22 23:08 Forgind

It looks like this file is generated in the intermediate output directory. I wouldn't suggest having a build pipeline which fails based on what is written to the intermediate output folder. This might change over time and it's also not surprising that it changes when you switch to SDK style projects.

dsplaisted avatar Sep 21 '22 21:09 dsplaisted

This issue can be closed

payn-git avatar Jan 12 '23 14:01 payn-git

There is another problem: When using automatic binding redirects, then those redirects don't get into the exe.withSupportedRuntime.config. If I add the "Publihed Items" for an exe project in a Visual Studio Installer Setup Project, then this config is used (missing the binding redirects).

Lumoryel avatar Apr 25 '23 09:04 Lumoryel