-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
Description
I use Visual Studio 2022 Community on Windows OS to create some console & Winforms apps. I usually prepare "release packages" for the users of my apps - .zip files that the users can just extract and run the app without any additional installation aside of .NET Runtime. I often use additionalProbingPaths in runtimeconfig.json to have a dependencies subfolder in the app's main folder to store app's dependencies there.
When I have updated Visual Studio to 17.14.12, .NET SDK 8.0.19 has been installed on my computer and since then, my apps crash because they fail to recognize dependencies subfolder as one to look into despite it being mentioned in additionalProbingPaths:
Here is an example of a very simple Hello World app that crashes in such situation (it references Automapper simply for the sake of showing the issue).
I have confirmed that the issue doesn't occur on a laptop with Windows OS and .NET Runtime 8.0.11. Installing .NET Runtime 8.0.19 on the laptop introduces the issue.
This issue blocks me from testing my "release packages" on a computer with Visual Studio 2022 Community since it forces me to have .NET Runtime 8.0.19 installed.
Reproduction Steps
- Install .NET Runtime 8.0.19.
- Download
TestDependencies.zipattached above. - Extract it - it will create
TestDependenciesfolder with theTestDependencies.exeapp inside. - Open console in
TestDependenciesfolder. - Launch
TestDependencies.exein the console.
Expected behavior
"Hello, World!" should appear in the console.
Actual behavior
The app throws an exception as in the picture attached above
Regression?
It did work with .NET Runtime 8.0.11.
Known Workarounds
- Put all the dependencies in the main folder of the app? Unconvenient, especially when you have 30+ dependencies you don't want your non-technical app users to deal with.
- Uninstall Visual Studio 2022 Community each time you want to launch such an app? Even less convenient.
- Pay for Visual Studio 2022 Professional to choose older build version? No way...
Configuration
- .NET Runtime 8.0.19
- Windows 11 Home 24H2 26120.5751, x64
Other information
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status