我有一個4.0開發的WCF應用程序。它使用文件路徑的設置(例如日誌文件的路徑)。當我想建立一個3.5版本,它給了我一個ConfigurationErrorException其內容爲:從.NET 4.0項目創建.NET 3.5版本
「出錯創建userSettings/WCF_SmartStatsHost.Properties.Settings配置節處理程序:無法加載文件或程序集「系統, (C:\ Users \ Pierre \ Documents \ Visual Studio 2010 \ Projects \ WCF_SmartStats \ WCF_SmartStatsHost \ bin \版本= 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089'或其依賴項之一。系統找不到指定的文件。調試」
我已經檢查和複查的文件路徑等,但它看起來像它有點不止於此技術。
這裏是堆棧跟蹤:
at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at System.Configuration.ClientSettingsStore.ReadSettings(String sectionName, Boolean isUserScoped)
at System.Configuration.LocalFileSettingsProvider.GetPropertyValues(SettingsContext context, SettingsPropertyCollection properties)
at System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider)
at System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName)
at System.Configuration.SettingsBase.get_Item(String propertyName)
at System.Configuration.ApplicationSettingsBase.GetPropertyValue(String propertyName)
at System.Configuration.ApplicationSettingsBase.get_Item(String propertyName)
at WCF_SmartStatsHost.Properties.Settings.get_LogPath() in C:\Users\Pierre\Documents\Visual Studio 2010\Projects\WCF_SmartStats\WCF_SmartStatsHost\Properties\Settings.Designer.cs:line 32
at WCF_SmartStatsHost.Host_Logging.CreateActivityLog(String message) in C:\Users\Pierre\Documents\Visual Studio 2010\Projects\WCF_SmartStats\WCF_SmartStatsHost\Host_Logging.cs:line 17
at WCF_SmartStatsHost.Host_Processor.Start() in C:\Users\Pierre\Documents\Visual Studio 2010\Projects\WCF_SmartStats\WCF_SmartStatsHost\Host_Processor.cs:line 24
at WCF_SmartStatsHost.Host_Program.Main(String[] args) in C:\Users\Pierre\Documents\Visual Studio 2010\Projects\WCF_SmartStats\WCF_SmartStatsHost\Host_Program.cs:line 20
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
任何幫助,將不勝感激。
謝謝,將檢查它 – pierrepret22 2011-04-07 11:25:59