admin管理员组

文章数量:1644433

第一次装了C# ,想运行一下程序。可是解决了一些缺少Reference的问题之后,虽然程序可以运行了,但会停下出现一下提示:

“创建 userSettings/ThermometerApplication.Settings1 的配置节处理程序时出错: 未能加载文件或程序集“System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”或它的某一个依赖项。系统找不到指定的文件。”

出现问题的程序是这一段

public string comPort {
      
            get {
                return ((string)(this["comPort"]));
            }
            set {
                this["comPort"] = value;
            }

 

一直以为是system.data的问题或是版本不对,又反复更新了System.Data.Linq.dll的版本。结果还是不行。重装了VS2008,痛苦的折疼了两天。

重要发现在工程文件的app.config里面:<section name="ThermometerApplication.Settings1" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />

把这个里面的版本号改成和system 一致的2.0.0.0就可以运行了。唉,就这事啊!

 

本文标签: 加载文件程序VersionSystem