app.config “Could not find schema information” after converting to Visual Studio 2010 / .Net 4.0

前端 未结 4 680
陌清茗
陌清茗 2020-12-30 21:08

After upgrading my project to Visual Studio 2010 and .Net 4.0, my app.config file generates these messages upon building the project:

  • Could not find schema inf
相关标签:
4条回答
  • 2020-12-30 21:45

    I changed the schema from DotNetConfig to DotNetConfig35 and it took care of the issue. This is available in the properties of the app.config file.

    Right clicking the app.config file in solution explorer gives the properties of the file, right clicking in the edit window of the app.config file itself gives the properties of the XML document.

    0 讨论(0)
  • 2020-12-30 21:48

    Try to kill the process in Task Manager next time, if it's already running.

    P.S: It might be running at a remote machine.

    Update: Since there is no solution I repeat my advice... Stop down voting. Maybe it's a bug but it might be related to un-terminated debug process. Just examine the Task Manager and kill xyz.vhost.exe of fx2.0, if any.

    0 讨论(0)
  • 2020-12-30 21:52

    Remove the following section in app.config:

    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/> 
    </startup>
    
    0 讨论(0)
  • 2020-12-30 21:53

    Are you sure the conversion went ok? Maybe the correct target framework wasn't configured. Open your project properties and check if the target framework is actually .NET Framework 4 or .NET Framework 4 Client Profile.

    0 讨论(0)
提交回复
热议问题