我正在尝试添加服务引用,然后收到此错误。
“参数‘sectionGroupName’无效
参数名称:sectionGrouName”
- 项目运行.Net 3.5
- 当我将项目升级到 .Net 4.0 时,它就可以工作了!但这对我来说不是一个选择,因为其他参考资料使用 3.5
- 别人的机器VS运行3.5,可以顺利添加wcf。这意味着它只发生在我的机器上。
- 我尝试修复我的 .Net,但错误仍然存在。
- 检查了我的web.config和machine.config,没有名为sectionGroupName的无效参数。
- 清理临时文件。同样的错误。
请帮忙。谢谢。
我打电话时收到此错误'ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None).SectionGroups["sectionGroupName"]'
从中获取配置App.config
.
在 System.Configuration.MgmtConfigurationRecord.GetSectionGroup(String configKey)
在 TestMonitor.Program.Main(String[] args) 位置 E:\Temp\TestThreads\TestMonitor\Program.cs:行号 15
在 System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
在 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
我的决心就是移动'appSettings'
之后的部分'configSections'
部分。也许“configSections”必须是配置的第一个子部分。这确实很奇怪!
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)