简体   繁体   English

如果尝试下载我的独立应用程序时出现错误:无法找到运行该应用程序的运行时版本

[英]Getting error if trying to download my standalone app: Unable to find a version of the runtime to run this application

在此处输入图片说明

  • I use VS 2010 C# Express 我使用VS 2010 C#Express
  • The file is digitally signed (signed/verified with signtool) 文件已进行数字签名(使用signtool签名/验证)
  • Target framework: .NET Framework 4 Client Profile 目标框架:.NET Framework 4客户端配置文件
  • .NET Framework 4 Client Profile is installed 已安装.NET Framework 4客户端配置文件
  • I'm uploading the exe to a simple static html page 我正在将exe上传到一个简单的静态html页面
  • If I (or anyone) click on the download link get the message above 如果我(或任何人)单击下载链接,则获得上面的消息
  • Right-click -> Save Target As... works OK 右键单击->将目标另存为...,可以正常工作
  • I can run the file without issues after downloading 下载后我可以运行文件而不会出现问题

I'd venture to guess that the problem is not within the executable itself but somewhere in the delivery of it into the web page or in the delivery of it back down to the end user; 我敢猜测这个问题不在于可执行文件本身,而在于将其交付到网页中或将其交付给最终用户的某个地方。 especially considering the program will run without issue once it's downloaded. 特别是考虑到该程序一旦下载便可以正常运行。

Have you completely vetted that process? 您是否已完全审核该过程? You mention 'simple static html page' - elaborate on that a bit and you might get more suggestions that will lead you toward a proper solution. 您提到“简单的静态html页面”-对此进行详细说明,您可能会得到更多建议,这些建议将引导您寻求正确的解决方案。 Web server used? 使用Web服务器? Technology involved? 涉及技术? Personal machine running apache or the like? 个人机上运行apache之类的? or some website generator? 或一些网站生成器? or something like Wordpress? 或类似Wordpress的东西? or some other web hosting company and their products? 或其他网络托管公司及其产品? If the problem lies therein, then further details would be nice to have to help you deduce what is causing issue. 如果问题出在其中,那么必须提供更多详细信息来帮助您推断导致问题的原因。

As I'm sure you're aware, that particular error message appears to be presented mostly to products that utilize products created with or included libraries requiring .NET 2.0, 3.0, or 3.5 - since they are (by default) no longer pre-installed on newer systems released with Windows 8+ ... a simple test to rule out the possibility would be to simply install the .NET 3.5 installer and see if the problem magically goes away - if it does, then you may need to do a bit of further research on the 'delivery mechanism' - read, web server used - technology it requires - etc ... 正如我敢肯定,你知道,会出现特定的错误消息被大多呈现给利用与创造的产品或需要.NET 2.0,3.0,或3.5包含的库的产品-因为它们是(默认)不再预安装在随Windows 8+发行的较新系统上 ...一个简单的测试即可排除可能性,那就是简单地安装.NET 3.5安装程序,然后看问题是否神奇消失了-如果可以,则您可能需要有关“交付机制”的进一步研究-阅读,使用的Web服务器-所需的技术-等等...

If that's way off ... perhaps this is an x86 vs x64 problem? 如果还可以...也许这是x86 vs x64问题? 32bit app running on 64bit OS? 在64位操作系统上运行的32位应用程序? something along those lines? 遵循这些原则? A simple test would be to create 2 executables: one that is configured to build all output as x86 and one to build all output as x64 - see if both behave the same or if there is a difference, and move forward from there. 一个简单的测试是创建2个可执行文件:一个配置为将所有输出构建为x86,另一个配置为将所有输出构建为x64-查看两者的行为是否相同或存在差异,然后从那里继续前进。

I believe that in this situation, you will need to play around and run a few tests before getting to the bottom of it. 我认为,在这种情况下,您需要进行一些尝试并进行一些测试,然后再进行深入研究。 Good luck to you. 祝你好运。

May I ask why you are targeting .NET 4.0 Client Platform specifically? 请问为什么您要专门针对.NET 4.0客户端平台? Why not go ahead and target to one of the 4.5 versions? 为什么不继续针对4.5版本之一? Is there a requirement to target a discontinued release of .NET ? 是否有针对.NET停止发行的要求?

Within that link and this one under the 'Additional Information' section , there are statements that indicate an 'in place update' to .NET 4.0 is made to migrate an already installed .NET 4.0 Client Platform to the .NET 4.0 Full Install -- there doesn't appear to be anything written to indicate that 4.0 gets installed by the 4.5 installer, if it's not already installed on the system. 在该链接以及“其他信息”部分下的该链接中,有一些语句指示对.NET 4.0进行“就地更新”,以将已安装的.NET 4.0客户端平台迁移到.NET 4.0完整安装-如果尚未在系统上安装4.0,则似乎没有任何内容表明它已由4.5安装程序安装。

Therefore, all machines with .NET 4.5 installed would have replaced the mentioned 'target framework' of .NET that you're building with something that no longer exists on those machines ... which I believe might account for the popup error received. 因此,所有安装了.NET 4.5的计算机都将用这些计算机上不再存在的东西替换您正在构建的.NET的“目标框架” ...我相信这可能是导致收到的弹出错误的原因。 Can you, at least, try to target one of the 4.5 versions of .NET and update the executable to download on your server? 您至少可以尝试针对4.5的.NET版本之一,并更新可执行文件以在您的服务器上下载吗? Try again and see if the error goes away? 再试一次,看看错误是否消失了? If it does, then the problem that you are facing pertains to .NET Client Platform not (or longer due to 4.5 update) being installed on the client machines. 如果是这样,则您所面临的问题与客户端计算机上未安装(或由于4.5更新而导致的更长).NET客户端平台有关。

If that's the case and .NET 4.0 needs to be targeted, then you might need to target the Full 4.0 version instead of the Client Profile version. 如果是这种情况,并且需要定位.NET 4.0,那么您可能需要定位到Full 4.0版本而不是Client Profile版本。 Or just move to one of the 4.5 versions. 或只是移至4.5版本之一。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 找不到运行该应用程序的运行时版本 - Unable to find a version of the runtime to run this application 控制台应用程序-无法找到运行该应用程序的运行时版本 - Console Application - Unable to find a version of the runtime to run this application “无法找到运行此应用程序的运行时版本”,适用于64位Windows上的32位应用程序 - “Unable to find a version of runtime to run this application” for 32bit app on 64bit Windows .Net Framework-“无法找到运行该应用程序的运行时版本” - .Net framework - “unable to find a version of the runtime to run this application” 控制台应用程序 - 无法找到运行此应用程序的运行时版本(我拥有它们) - Console Application - Unable to find a version of the runtime to run this application (and I have them all) 当程序集位于“C:\Windows\System32”内时,我得到“无法找到运行此应用程序的运行时版本” - When assembly is inside 'C:\Windows\System32' i get 'Unable to find a version of the runtime to run this application' 尝试卸载应用程序但出现错误 - Trying to uninstall an application but getting an error 尝试添加额外的 OAuth 提供程序。 获取“错误 NU1101:无法找到 package 'Provider'” - Trying to add additional OAuth Provider. Getting "error NU1101: Unable to find package 'Provider'" 尝试运行ASP .Net Core 2.1 Web应用程序时出现错误502.5 - Getting error 502.5 when trying to run a ASP .Net Core 2.1 Web application 仍然出现错误-无法下载。 无法打开该网站 - Still getting the error - Unable to download. Unable to open this internet site
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM