I'm getting the “missing a using directive or assembly reference” and no clue what's going wrong

后端 未结 8 764
鱼传尺愫
鱼传尺愫 2020-11-29 06:29

I\'m trying to allow a user to enter data into a textbox that will be added to the web.config file. I\'ve added the relevent lines to the web.config file but when I make thi

相关标签:
8条回答
  • 2020-11-29 06:38

    The following technique worked for me:

    1) Right click on the project Solution -> Click on Clean solution

    2) Right click on the project Solution -> Click on Rebuild solution

    0 讨论(0)
  • 2020-11-29 06:40

    .Net framework of the referencing dll should be same as the .Net framework version of the Project in which dll is referred

    0 讨论(0)
  • 2020-11-29 06:43

    I have observed a quote ' in your 1st line and also at the end of your last line.

    'using System.Collections.Generic;
    

    Is this present in your original code or some formatting mistake?

    0 讨论(0)
  • 2020-11-29 06:49

    Your using statements appear to be correct.

    Are you, perhaps, missing the assembly reference to System.configuration.dll?

    Right click the "References" folder in your project and click on "Add Reference..."

    0 讨论(0)
  • 2020-11-29 06:51

    In some cases, when necessary using has been obviously added and studio can't see this namespace, studio restart can save the day.

    0 讨论(0)
  • 2020-11-29 06:52

    You probably don't have the System.Configuration dll added to the project references. It is not there by default, and you have to add it manually.

    Right-click on the References and search for System.Configuration in the .net assemblies.

    Check to see if it is in your references...

    enter image description here

    Right-click and select Add Reference...

    enter image description here

    Find System.Configuration in the list of .Net Assemblies, select it, and click Ok...

    enter image description here

    The assembly should now appear in your references...

    enter image description here

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