locked
Error in app.config RRS feed

  • Question

  • User81789783 posted

    i m facing below exception in console application

    An unhandled exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll

    Additional information: Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.

    here is app.config

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      
      
      <configSections>
            <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
            <section name="entityFramework"
              type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
              requirePermission="false"/>
        </configSections>
      <connectionStrings>

        <add name="NinjaDatabase" connectionString="Data Source=.;Initial Catalog=NinjaDatabase;Integrated Security=true" providerName="System.Data.SqlClient"/>

        <!--<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-ForEF-20200630045341.mdf;Initial Catalog=aspnet-ForEF-20200630045341;Integrated Security=True" providerName="System.Data.SqlClient" />-->
      </connectionStrings>
        <startup> 
            <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/>
        </startup>
        <entityFramework>
            <providers>
                <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
            </providers>
        </entityFramework>
    </configuration>

    Thnaks

    Sunday, October 25, 2020 10:24 AM

All replies

  • User81789783 posted

    i faced this issue after adding below line

    gacutil.exe /i EntityFramework.dll on vs command prompt

    Sunday, October 25, 2020 11:26 AM
  • User1120430333 posted

    An unhandled exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll

    Additional information: Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.

    Where is the netstandard.dll that should be sitting in the Bin folder that the program is looking for and cannot find? You're being told the version number and the PKT of the netstandard.dll that the program expects to find. You need to get the DLL in the Bin folder so .NET can find it.

    Monday, October 26, 2020 12:15 AM
  • User81789783 posted

    where can i get netstandard.dll ??

    Monday, October 26, 2020 4:11 AM
  • User1120430333 posted

    where can i get netstandard.dll ??

    https://www.nuget.org/packages/NETStandard.Library/

    Monday, October 26, 2020 5:54 AM
  • User81789783 posted

    Please note down i m using vs 2015 and find below error after installing

    Install-Package : Could not install package 'Microsoft.NETCore.Platforms 1.1.0'. You are trying to install th
    is package into a project that targets '.NETFramework,Version=v4.5.1', but the package does not contain any a
    ssembly references or content files that are compatible with that framework. For more information, contact th
    e package author.

    Monday, October 26, 2020 6:35 AM
  • User1120430333 posted

    I will assume you installed the right version of the DLL that is showing  in the exception message? You installed the version of the needed DLL that the  Nuget documentation is showing how to give the version number to install?

    Monday, October 26, 2020 8:03 AM
  • User81789783 posted

    can u describe further  i m unable to get u

    Monday, October 26, 2020 8:09 AM
  • User1120430333 posted

    can u describe further  i m unable to get u

    What is the version number of the library  the program is looking for that is showing in the exception message? You should clearly be able to read it and understand its purpose  of one version of something  as opposed to another version of the same thing signified by the version number of each thing, 

    If the program wants version 99 of a DLL, then you can't  install version 100 of the DLL expecting that version 100 is going to work. Version  100 is not going to work.

    You install the library that the program wants using Nuget by its version number. It is clearly being shown how to do it with the Nuget documentation that was supplied to you.

    You should be able to figure this out. 

    Monday, October 26, 2020 11:45 AM
  • User81789783 posted

    I tried to solve my problem my scatrch again and run below command

    Enable-migrations

    It gives below error

    Could not load file or assembly 'netstandard ,versions 2.1.0.0 culturr ....,......


    Tuesday, October 27, 2020 9:19 AM
  • User1120430333 posted

    I tried to solve my problem my scatrch again and run below command

    Enable-migrations

    It gives below error

    Could not load file or assembly 'netstandard ,versions 2.1.0.0 culturr ....,......


    Again, the application is looking for the netstandard.dll version 2.1.0.0 to be in the Bin folder and the DLL is not there.

    https://www.nuget.org/packages/NETStandard.Library/

    I don't understand why you cannot look at the Nuget Install-package command that is installing netstandard for version 2.0.3 and create a command to install version 2.1.0.0.

    I don't understand what is so hard for you to do it. Maybe, you just don't know how to do it.

    https://docs.microsoft.com/en-us/nuget/consume-packages/install-use-packages-powershell

    Tuesday, October 27, 2020 4:24 PM