c# - Running .NET 2.0 4.0 machine without app.config?
问题描述
I am building an application targeted mostly towards Windows 10, but I would also like to include some legacy support for XP+.
I know this is possible by configuring an app.config file with the "startup useLegacyV2RuntimeActivationPolicy" tag. However I do not want to include a dependency, as that would require me to either A:have an installer that extracts both files or B:have to release the application as an archive. Both of these options are reasonable, but if at all possible I would like it to be a nice and clean, completely portable, packaged in one executable application.
Speaking of packaged, that leads me to option C. I am aware that I cannot simply add this app.config file as an embedded resource and have the LegacyV2Runtime tag still be active (or maybe I can who knows, I just assumed it would not work). So assuming that's out the window, I previously recall an application that was able to pack all the files Dll's into the executable, and it worked very very well. I do not believe it was ILSpy, as I think it worked with Native code. I am struggling to find this application, but assuming I do find it, would windows possibly recognize the app.config file?
If this does not work, then I guess my next preferred route would be to create an Installer executable. My only languages are .NET and a bit of java, so I'm not sure what language would be ideal to create this in that support XP-Win 10. Any suggestions? Thanks!
解决方案
推荐阅读
- android - 如何将数据处理与 Activity 分开
- react-native - React Native Flatlist ListHeaderComponent 不起作用
- spring - 如何在 Vue 中获取模型属性?
- c - 欧拉 10,素数和到 2000000
- java - 尝试将请求方法作为删除时不支持 GET 方法
- categorical-data - 每当我尝试在我的数据框中编码 categorical_features 时,我都会遇到关键错误
- javascript - reveal.js:ReferenceError:导航器未在全新安装时定义
- node.js - “吉普错误!堆栈”与 NodeJS,但安装了 XCode 命令行工具
- c++ - C++ 如何在后台进程上模拟鼠标点击?
- html - 为什么导航栏表现不佳?