控制台应用程序 - 无法找到一个版本的运行时运行该应用程序(我有他们全部) [英] Console Application - Unable to find a version of the runtime to run this application (and I have them all)

查看:254
本文介绍了控制台应用程序 - 无法找到一个版本的运行时运行该应用程序(我有他们全部)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与其他人一样,我在使用,从我们的数据库中读取记录一个简单的控制台应用程序的问题。

Like others, I'm having an issue with a simple console application that reads records from our database.

这个小程序需要坐在我们的文件服务器上。它读取新记录,并转发总结过母公司。

This small program needs to sit on our file server. It reads new records and forwards a summary off to the parent company.

这将是运行每隔X分钟计划的任务。

This is going to be a scheduled task that runs every X minutes.

我不希望一个安装程序,因为我不希望服务器需要重新启动。

I do NOT want an Installer, because I don't want the server to require a reboot.

从截图中注意到我几乎所有的版本已经安装了框架和调试信息被复制到程序文件夹。

From the screenshot, notice I have almost all versions of the framework already installed and that the debug information is copied into the program folder.

这是该程序的调试版本,但没有其他的调试信息输出到窗口。

This is the debug version of the program, but no other debug information is being output to the window.

我已经试过大楼2.0,3.5和4.0。所有版本给我同样的错误消息。

I have tried building at 2.0, 3.5, and 4.0. All versions give me the same error message.

[更新]: 沃尔玛的问了评论

<?xml version="1.0"?>
<configuration>
<startup>

<supportedRuntime version="v2.0.50727"/></startup>
</configuration>

这是一个控制台应用程序,所以这是字面上整个的app.config 文件。我是典型的无能,当谈到这些的的.config 设置;但是,我似乎觉得我有这一个手柄! :)

This is a console app, so that is literally the entire app.config file. I am typically clueless when it comes to these .config settings; however, I seem to feel like I have a handle on this one! :)

推荐答案

我本来以为有人要操心我的坏法,当我把我的可执行文件在这里,但我也没在意的时候。我只是想获得它的工作。

I originally thought someone was going to fuss at me for bad technique when I put my executable here, but I didn't care at the time. I just wanted to get it to work.

的通知那里的可执行文件放在哪里?

Notice where the executable was placed?

这是在 C:\ Windows \ System32下文件夹

显然, System32下文件夹是为Windows命令。

Obviously, the System32 folder is meant for Windows commands.

那么,为什么我把我的小的可执行文件吗?由于该文件夹几乎肯定会被包含在Windows环境中的路径。

So, why did I place my small executable here? Because that folder is almost guaranteed to be included in the Windows Environment Path.

我知道有人最终会得到激怒了我,所以我想我今天把它移动到一个适当命名的新文件夹程序文件(x86)目录。

I knew someone was eventually going to get irritated with me, so I thought I'd move it today into a suitably named new folder in the Program Files (x86) directory.

嗯,我做到了,而现在,像变魔术一样,程序运行正常。

Well, I did that, and now, like magic, the program runs fine.

所以,我要去猜测,.NET Framework应用程序不允许在 System32下文件夹中运行。

So, I'm going to guess that .NET Framework applications are not permitted to run in the System32 folder.

我会,不过,喜欢听人告诉我究竟是什么了这一点,所以.NET Framework应用程序不能在这里了。

I would, however, like to hear people tell me what is exactly up with that and why .NET Framework applications can not get in here.

这篇关于控制台应用程序 - 无法找到一个版本的运行时运行该应用程序(我有他们全部)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆