[英]Running Windows service built against .net framework 1.0 in Windows Server 2012 R2
I have a .net Windows service built using .net framework 1.0 and using all .net 1.0 assembly references.我有一个使用 .net framework 1.0 并使用所有 .net 1.0 程序集引用构建的 .net Windows 服务。 Now I would like to run that service on a Windows Server 2012 R2, but it does not support .net 1.0.现在我想在 Windows Server 2012 R2 上运行该服务,但它不支持 .net 1.0。 Is there any way to run this service on Windows Server 2012 R2?有没有办法在 Windows Server 2012 R2 上运行这个服务?
I tried to redirect assemblies to .net 2.0 assemblies using assembly redirect in app.config but I'm still receiving error 1053 while starting services and this could be because loading incorrect assemblies.我尝试使用 app.config 中的程序集重定向将程序集重定向到 .net 2.0 程序集,但在启动服务时仍然收到错误 1053,这可能是因为加载了错误的程序集。 Is there any other way to fix this?有没有其他方法可以解决这个问题?
What you are trying to do will not work, which has been stated previously in the comments.您尝试执行的操作将不起作用,这已在之前的评论中说明。
Your only two options are:你只有两个选择:
Since you stated that recompiling the code is an option, in my opinion that is by far your best option for many reasons, not the least of which being able to use a supported framework on a supported OS.由于您表示重新编译代码是一种选择,在我看来,出于多种原因,这是迄今为止您的最佳选择,其中最重要的是能够在受支持的操作系统上使用受支持的框架。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.