msbuild - How to use different Build Paths and Debug profiles for different configurations in Visual Studio 2022 .net projects -

I'm making the move fromFramework to developing usingCore, but can't figure out how the b

I'm making the move from Framework to developing using Core, but can't figure out how the build and debug system works for Core projects.

I have different build needs. I am dveeloping a plugin of an application that had two exes. For simplicity, let's call them AppModeOne and AppModeTwo. Also, I need to build a release version. So let's say I have a Build Configuration called "Release", one called "AppModeOneDebug" and the other "AppModeTwoDebug." The former is a build for deployment, the latter two will launch in debug mode, but launch the AppModeOneDebug.exe or similar for mode2.

In .framework apps, if you changed the build configuration at the top, the properties page for the project would change. So, you could set separate exes for Mode 1 or 2 and also different build locations (the app plugin folder for the debug configs and a separate folder for the Release Build).

However, in apps, if I change the config, the project properties seem to persist across all configs.

Secondly, I can set up separate Debug Launch Profiles via the UI, but there appears to be no way to select which one is mapped against which config.

Sure I'm missing something, but intuitive UI design appears to be going backwards recently! Any ideas?

EDIT: Here's a video of the issue:

And someone requested a gif instead:

EDIT 2: I thought I'd cracked it via this MS article here:

learn.microsoft

However, all the options are greyed out for me:

I'm making the move from Framework to developing using Core, but can't figure out how the build and debug system works for Core projects.

I have different build needs. I am dveeloping a plugin of an application that had two exes. For simplicity, let's call them AppModeOne and AppModeTwo. Also, I need to build a release version. So let's say I have a Build Configuration called "Release", one called "AppModeOneDebug" and the other "AppModeTwoDebug." The former is a build for deployment, the latter two will launch in debug mode, but launch the AppModeOneDebug.exe or similar for mode2.

In .framework apps, if you changed the build configuration at the top, the properties page for the project would change. So, you could set separate exes for Mode 1 or 2 and also different build locations (the app plugin folder for the debug configs and a separate folder for the Release Build).

However, in apps, if I change the config, the project properties seem to persist across all configs.

Secondly, I can set up separate Debug Launch Profiles via the UI, but there appears to be no way to select which one is mapped against which config.

Sure I'm missing something, but intuitive UI design appears to be going backwards recently! Any ideas?

EDIT: Here's a video of the issue: https://youtu.be/ASIZ1LAUZuE

And someone requested a gif instead:

EDIT 2: I thought I'd cracked it via this MS article here:

learn.microsoft

However, all the options are greyed out for me:

Share Improve this question edited Mar 14 at 15:52 stigzler asked Mar 7 at 15:06 stigzlerstigzler 1,0033 gold badges15 silver badges36 bronze badges 5
  • Hi, do you mean in .framework apps, the Build tab in properties page will be synchronized once creating the build configuration at the top? Please see the screenshot And in apps, it will not be synchronized? – Dou Xu-MSFT Commented Mar 10 at 3:28
  • Hi Dou. I think so. I made a video comparing .framework behaviour with behaviour to illustrate the build issue: youtu.be/ASIZ1LAUZuE. Can post one of the debug issue if needed. – stigzler Commented Mar 11 at 18:58
  • Hi stigzler, due to some limitations, i failed to check the video you shared on YouTube. If i understand correctly, looks like .NET project Property Page UI has changed. Build configuration is not synced to Property Page. However, if you build the two modes, the corresponding debug or release configuration will be matched. If possible, could you please share a gif instead? – Dou Xu-MSFT Commented Mar 12 at 8:48
  • 1 Hi - have updated OP with the gif you requested. – stigzler Commented Mar 14 at 15:37
  • Hi stigzler, it looks like the generic properties of .NET applications are not specific to any particular configuration. It is not displayed on the UI that it is set according to the configuration. For example, it will implicitly generate a Debug or Release folder in the output folder of the Base output path property, depending on your configuration. – Dou Xu-MSFT Commented Mar 21 at 1:50
Add a comment  | 

1 Answer 1

Reset to default 0

From reading the document Set properties based on configurations, i think there are two types of properties both for solution and projects.

  • “common properties” - that are “configuration independent properties”. These properties are not specific to any particular configuration or platform.

  • “configuration properties” - that are “configuration dependent properties”. These properties allow you to customize the behavior of your project based on different build configurations.

e.g

I have the same issue with the Base output path: all the options are greyed. Looks like Base output path is classified as common properties. However, it will automatically generate Debug or Release folder in output folder(MyOutput) if i switch configuration.

Besides, i would suggest you can also report this issue at Visual Studio Forum to double confirm that if all the options are greyed out is by design. That will allow you to directly interact with the appropriate product group, and make it more convenient for the product group to collect and categorize your issue.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744921377a4601154.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信