C
C#4d ago
yourFriend

✅ When targeting multiple frameworks, which one runs when pressing Ctrl + F5 in VS Code?

Anyone knows which app runs when pressing Ctrl + F5 (Running without debugging) when targeting multiple frameworks in a console project? I have attached pic of project file, launch config file and build process which starts after pressing Ctrl + F5 in VS Code. I have both <TargetFrameworks>net9.0;net8.0</TargetFrameworks> in project file. While I have "launchConfigurationId": "TargetFramework=net8.0" in launch config file. Both net9.0 and net8.0 got build as I can see them in their respective directories that is debug\net9.0 and debug\net8.0. But I am not sure that which one ends up running.
No description
No description
No description
11 Replies
ero
ero4d ago
the first one in the list, it seems check with Environment.Version
Unknown User
Unknown User4d ago
Message Not Public
Sign In & Join Server To View
yourFriend
yourFriendOP4d ago
Thanks, that's exactly the case. It depends on which framework I write first in <TargetFrameworks></TargetFrameworks> in project file regardless of "launchConfigurationId" : "" in launch config file. In the end everything is fine until something works in one framework but not in others. 😂
yourFriend
yourFriendOP4d ago
No description
No description
Unknown User
Unknown User4d ago
Message Not Public
Sign In & Join Server To View
yourFriend
yourFriendOP4d ago
Yes, I press Ctrl + F5
Unknown User
Unknown User4d ago
Message Not Public
Sign In & Join Server To View
ero
ero4d ago
yeah that's what ctrl + f5 runs
Unknown User
Unknown User4d ago
Message Not Public
Sign In & Join Server To View
ero
ero4d ago
evidently not
Unknown User
Unknown User4d ago
Message Not Public
Sign In & Join Server To View

Did you find this page helpful?