针对多个版本的.NET Framework
假设我有一些code,将在理论上,对编制的任意的版本的.NET Framework。想想的Hello World,如果你喜欢。
Suppose I have some code that would, in theory, compile against any version of the .net framework. Think "Hello World", if you like.
如果我实际编译code,不过,我会得到一个运行违心的尤其的版本的可执行文件。
If I actually compile the code, though, I'll get an executable that runs against one particular version.
有没有什么办法来安排的事情,这样的编译的exe只是反对任何版本发现运行?我强烈怀疑,答案是否定的,但我很乐意被证明是错误的......
Is there any way to arrange things so that the compiled exe will just run against whatever version it finds? I strongly suspect that the answer is no, but I'd be happy to be proven wrong...
编辑:好吧,我去我们的楼梯口。我不知道,后来框架将愉快地运行在早期版本编译的exe。感谢所有的答复!
Well, I'll go to the foot of our stairs. I had no idea that later frameworks would happily run exe's compiled under earlier versions. Thanks for all the responses!
林不知道这是否是正确的,但我想尝试编译它的最低版本,更高版本应该可以运行低版本的exe文件的
Im not sure if this is correct, but i'd try to compile it for the lowest version, the higher versions should be able to run the lower versions exe's.