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



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








10















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 this class all goes wrong.



I keep getting the are you missing a using directive or assembly refenrence error whenever I try to run my app. I have looked at the other times this question has been asked and can't seem to figure out where I'm going wrong. The thing is that I am extremely new to Visual Studio and am just left blank at what could be the answer.



Below here is the class file that's generating the error. I hope I've included everything you need to assist me. Thank you.



 using System.Collections.Generic;
using System.Linq;
using System.Configuration;


namespace WebConfigDemo

public class CompanyConfigSection : ConfigurationSection

[ConfigurationProperty("", IsRequired = true, IsDefaultCollection = true)]
public CompanyConfigCollection Companies

get

return (CompanyConfigCollection)this[""];

set

this[""] = value;



public class CompanyConfigElement : ConfigurationElement

[ConfigurationProperty("id", IsKey = true, IsRequired = true)]
public int Id

get

return (int)this["id"];

set

this["id"] = value;


[ConfigurationProperty("name", IsRequired = true)]
public string Name

get

return this["name"].ToString();

set

this["name"] = value;



'
public class CompanyConfigCollection : ConfigurationElementCollection

protected override ConfigurationElement CreateNewElement()

return new CompanyConfigElement();

protected override object GetElementKey(ConfigurationElement element)

return ((CompanyConfigElement)element).Id;


public class CompaniesConfig

private static readonly Dictionary<int, CompanyConfigElement>
Elements;
static CompaniesConfig()

Elements = new Dictionary<int, CompanyConfigElement>();
var section = (CompanyConfigSection)ConfigurationManager.GetSection ("companies");
foreach (CompanyConfigElement system in section.Companies)
Elements.Add(system.Id, system);

public static CompanyConfigElement GetCompany(int companyId)

return Elements[companyId];

public static List<CompanyConfigElement> Companies

get

return Elements.Values.ToList();



'


Any help is appreciated










share|improve this question



















  • 1





    Which line generates the error?

    – ic3b3rg
    Jun 27 '13 at 13:19











  • Can you tell us where are yu getting the error

    – Microsoft DN
    Jun 27 '13 at 13:40











  • You must several things:

    – fraballi
    May 26 '16 at 14:41











  • Guidance: 1) assembly loaded?, 2) assembly loaded matches with origin assembly?, 3) "using" directives pointing to old or none valid references?, 4) .csproj manifest includes source invalid?, 5) a search tool looking regex in the entire solution (every class library and project). 5) check project settings for net framework version build option (collaborate in teams bring on this kind of problen, you must agree net framew. build version in both sides) 6) After that clean and build each by separate and finally, include all references to the destination project/class library. I should work!

    – fraballi
    May 26 '16 at 14:48

















10















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 this class all goes wrong.



I keep getting the are you missing a using directive or assembly refenrence error whenever I try to run my app. I have looked at the other times this question has been asked and can't seem to figure out where I'm going wrong. The thing is that I am extremely new to Visual Studio and am just left blank at what could be the answer.



Below here is the class file that's generating the error. I hope I've included everything you need to assist me. Thank you.



 using System.Collections.Generic;
using System.Linq;
using System.Configuration;


namespace WebConfigDemo

public class CompanyConfigSection : ConfigurationSection

[ConfigurationProperty("", IsRequired = true, IsDefaultCollection = true)]
public CompanyConfigCollection Companies

get

return (CompanyConfigCollection)this[""];

set

this[""] = value;



public class CompanyConfigElement : ConfigurationElement

[ConfigurationProperty("id", IsKey = true, IsRequired = true)]
public int Id

get

return (int)this["id"];

set

this["id"] = value;


[ConfigurationProperty("name", IsRequired = true)]
public string Name

get

return this["name"].ToString();

set

this["name"] = value;



'
public class CompanyConfigCollection : ConfigurationElementCollection

protected override ConfigurationElement CreateNewElement()

return new CompanyConfigElement();

protected override object GetElementKey(ConfigurationElement element)

return ((CompanyConfigElement)element).Id;


public class CompaniesConfig

private static readonly Dictionary<int, CompanyConfigElement>
Elements;
static CompaniesConfig()

Elements = new Dictionary<int, CompanyConfigElement>();
var section = (CompanyConfigSection)ConfigurationManager.GetSection ("companies");
foreach (CompanyConfigElement system in section.Companies)
Elements.Add(system.Id, system);

public static CompanyConfigElement GetCompany(int companyId)

return Elements[companyId];

public static List<CompanyConfigElement> Companies

get

return Elements.Values.ToList();



'


Any help is appreciated










share|improve this question



















  • 1





    Which line generates the error?

    – ic3b3rg
    Jun 27 '13 at 13:19











  • Can you tell us where are yu getting the error

    – Microsoft DN
    Jun 27 '13 at 13:40











  • You must several things:

    – fraballi
    May 26 '16 at 14:41











  • Guidance: 1) assembly loaded?, 2) assembly loaded matches with origin assembly?, 3) "using" directives pointing to old or none valid references?, 4) .csproj manifest includes source invalid?, 5) a search tool looking regex in the entire solution (every class library and project). 5) check project settings for net framework version build option (collaborate in teams bring on this kind of problen, you must agree net framew. build version in both sides) 6) After that clean and build each by separate and finally, include all references to the destination project/class library. I should work!

    – fraballi
    May 26 '16 at 14:48













10












10








10


6






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 this class all goes wrong.



I keep getting the are you missing a using directive or assembly refenrence error whenever I try to run my app. I have looked at the other times this question has been asked and can't seem to figure out where I'm going wrong. The thing is that I am extremely new to Visual Studio and am just left blank at what could be the answer.



Below here is the class file that's generating the error. I hope I've included everything you need to assist me. Thank you.



 using System.Collections.Generic;
using System.Linq;
using System.Configuration;


namespace WebConfigDemo

public class CompanyConfigSection : ConfigurationSection

[ConfigurationProperty("", IsRequired = true, IsDefaultCollection = true)]
public CompanyConfigCollection Companies

get

return (CompanyConfigCollection)this[""];

set

this[""] = value;



public class CompanyConfigElement : ConfigurationElement

[ConfigurationProperty("id", IsKey = true, IsRequired = true)]
public int Id

get

return (int)this["id"];

set

this["id"] = value;


[ConfigurationProperty("name", IsRequired = true)]
public string Name

get

return this["name"].ToString();

set

this["name"] = value;



'
public class CompanyConfigCollection : ConfigurationElementCollection

protected override ConfigurationElement CreateNewElement()

return new CompanyConfigElement();

protected override object GetElementKey(ConfigurationElement element)

return ((CompanyConfigElement)element).Id;


public class CompaniesConfig

private static readonly Dictionary<int, CompanyConfigElement>
Elements;
static CompaniesConfig()

Elements = new Dictionary<int, CompanyConfigElement>();
var section = (CompanyConfigSection)ConfigurationManager.GetSection ("companies");
foreach (CompanyConfigElement system in section.Companies)
Elements.Add(system.Id, system);

public static CompanyConfigElement GetCompany(int companyId)

return Elements[companyId];

public static List<CompanyConfigElement> Companies

get

return Elements.Values.ToList();



'


Any help is appreciated










share|improve this question
















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 this class all goes wrong.



I keep getting the are you missing a using directive or assembly refenrence error whenever I try to run my app. I have looked at the other times this question has been asked and can't seem to figure out where I'm going wrong. The thing is that I am extremely new to Visual Studio and am just left blank at what could be the answer.



Below here is the class file that's generating the error. I hope I've included everything you need to assist me. Thank you.



 using System.Collections.Generic;
using System.Linq;
using System.Configuration;


namespace WebConfigDemo

public class CompanyConfigSection : ConfigurationSection

[ConfigurationProperty("", IsRequired = true, IsDefaultCollection = true)]
public CompanyConfigCollection Companies

get

return (CompanyConfigCollection)this[""];

set

this[""] = value;



public class CompanyConfigElement : ConfigurationElement

[ConfigurationProperty("id", IsKey = true, IsRequired = true)]
public int Id

get

return (int)this["id"];

set

this["id"] = value;


[ConfigurationProperty("name", IsRequired = true)]
public string Name

get

return this["name"].ToString();

set

this["name"] = value;



'
public class CompanyConfigCollection : ConfigurationElementCollection

protected override ConfigurationElement CreateNewElement()

return new CompanyConfigElement();

protected override object GetElementKey(ConfigurationElement element)

return ((CompanyConfigElement)element).Id;


public class CompaniesConfig

private static readonly Dictionary<int, CompanyConfigElement>
Elements;
static CompaniesConfig()

Elements = new Dictionary<int, CompanyConfigElement>();
var section = (CompanyConfigSection)ConfigurationManager.GetSection ("companies");
foreach (CompanyConfigElement system in section.Companies)
Elements.Add(system.Id, system);

public static CompanyConfigElement GetCompany(int companyId)

return Elements[companyId];

public static List<CompanyConfigElement> Companies

get

return Elements.Values.ToList();



'


Any help is appreciated







c# asp.net asp.net-mvc visual-studio-2010






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 27 '16 at 8:35







Scubacode

















asked Jun 27 '13 at 13:18









ScubacodeScubacode

761114




761114







  • 1





    Which line generates the error?

    – ic3b3rg
    Jun 27 '13 at 13:19











  • Can you tell us where are yu getting the error

    – Microsoft DN
    Jun 27 '13 at 13:40











  • You must several things:

    – fraballi
    May 26 '16 at 14:41











  • Guidance: 1) assembly loaded?, 2) assembly loaded matches with origin assembly?, 3) "using" directives pointing to old or none valid references?, 4) .csproj manifest includes source invalid?, 5) a search tool looking regex in the entire solution (every class library and project). 5) check project settings for net framework version build option (collaborate in teams bring on this kind of problen, you must agree net framew. build version in both sides) 6) After that clean and build each by separate and finally, include all references to the destination project/class library. I should work!

    – fraballi
    May 26 '16 at 14:48












  • 1





    Which line generates the error?

    – ic3b3rg
    Jun 27 '13 at 13:19











  • Can you tell us where are yu getting the error

    – Microsoft DN
    Jun 27 '13 at 13:40











  • You must several things:

    – fraballi
    May 26 '16 at 14:41











  • Guidance: 1) assembly loaded?, 2) assembly loaded matches with origin assembly?, 3) "using" directives pointing to old or none valid references?, 4) .csproj manifest includes source invalid?, 5) a search tool looking regex in the entire solution (every class library and project). 5) check project settings for net framework version build option (collaborate in teams bring on this kind of problen, you must agree net framew. build version in both sides) 6) After that clean and build each by separate and finally, include all references to the destination project/class library. I should work!

    – fraballi
    May 26 '16 at 14:48







1




1





Which line generates the error?

– ic3b3rg
Jun 27 '13 at 13:19





Which line generates the error?

– ic3b3rg
Jun 27 '13 at 13:19













Can you tell us where are yu getting the error

– Microsoft DN
Jun 27 '13 at 13:40





Can you tell us where are yu getting the error

– Microsoft DN
Jun 27 '13 at 13:40













You must several things:

– fraballi
May 26 '16 at 14:41





You must several things:

– fraballi
May 26 '16 at 14:41













Guidance: 1) assembly loaded?, 2) assembly loaded matches with origin assembly?, 3) "using" directives pointing to old or none valid references?, 4) .csproj manifest includes source invalid?, 5) a search tool looking regex in the entire solution (every class library and project). 5) check project settings for net framework version build option (collaborate in teams bring on this kind of problen, you must agree net framew. build version in both sides) 6) After that clean and build each by separate and finally, include all references to the destination project/class library. I should work!

– fraballi
May 26 '16 at 14:48





Guidance: 1) assembly loaded?, 2) assembly loaded matches with origin assembly?, 3) "using" directives pointing to old or none valid references?, 4) .csproj manifest includes source invalid?, 5) a search tool looking regex in the entire solution (every class library and project). 5) check project settings for net framework version build option (collaborate in teams bring on this kind of problen, you must agree net framew. build version in both sides) 6) After that clean and build each by separate and finally, include all references to the destination project/class library. I should work!

– fraballi
May 26 '16 at 14:48












6 Answers
6






active

oldest

votes


















19














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






share|improve this answer

























  • Yes, this is probably the reason why.

    – Abijeet Patro
    Jun 27 '13 at 13:23











  • You also can read this msdn.microsoft.com/en-us/library/vstudio/wkze6zky.aspx

    – Lucas
    Jun 27 '13 at 13:58











  • ok, so system.configuration dll will already be there?

    – Scubacode
    Jun 27 '13 at 18:08











  • Guidance: 1) assembly loaded?, 2) assembly loaded matches with origin assembly?, 3) "using" directives pointing to old or none valid references?, 4) .csproj manifest includes source invalid?, 5) a search tool looking regex in the entire solution (every class library and project). 5) check project settings for net framework version build option (collaborate in teams bring on this kind of problen, you must agree net framew. build version in both sides) 6) After that clean and build each by separate and finally, include all references to the destination project/class library. I should work!

    – fraballi
    May 26 '16 at 14:49


















4














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






share|improve this answer






























    0














    You using statements appear 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..."






    share|improve this answer























    • Will the system.configuration.dll already be there? sorry, such a noob. Does Visual Studio create the dll for you?

      – Scubacode
      Jun 27 '13 at 18:05











    • @Scubacode Looks like John Kraft has provided some great images on where to find the assembly!

      – Samuel Parkinson
      Jun 28 '13 at 8:26


















    0














    This problem would be caused by your application missing a reference to an external dll that you are trying to use code from. Usually Visual Studio should give you an idea about which objects that it doesn't know what to do with so that should be a step in the right direction.



    You need to look in the solution explorer and right click on project references and then go to add -> and look up the one you need. It's most likely the System.Configuration assembly as most people have pointed out here while should be under the Framework option in the references window. That should resolve your issue.






    share|improve this answer






























      0














      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?






      share|improve this answer























      • no it's not, new to this site and got a pop up saying to add them in so it would format correctly in my question

        – Scubacode
        Jun 27 '13 at 18:04


















      0














      I had the same problem earlier today. I could not figure out why the class file I was trying to reference was not being seen by the compiler. I had recently changed the namespace of the class file in question to a different but already existing namespace. (I also had using references to the class's new and previous namespaces where I was trying to instantiate it)



      Where the compiler was telling me I was missing a reference when trying to instantiate the class, I right clicked and hit "generate class stub". Once Visual Studio generated a class stub for me, I coped and pasted the code from the old class file into this stub, saved the stub and when I tried to compile again it worked! No issues.



      Might be a solution specific to my build, but its worth a try.






      share|improve this answer























        Your Answer






        StackExchange.ifUsing("editor", function ()
        StackExchange.using("externalEditor", function ()
        StackExchange.using("snippets", function ()
        StackExchange.snippets.init();
        );
        );
        , "code-snippets");

        StackExchange.ready(function()
        var channelOptions =
        tags: "".split(" "),
        id: "1"
        ;
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function()
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled)
        StackExchange.using("snippets", function()
        createEditor();
        );

        else
        createEditor();

        );

        function createEditor()
        StackExchange.prepareEditor(
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader:
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        ,
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        );



        );













        draft saved

        draft discarded


















        StackExchange.ready(
        function ()
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f17344295%2fim-getting-the-missing-a-using-directive-or-assembly-reference-and-no-clue-wh%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        6 Answers
        6






        active

        oldest

        votes








        6 Answers
        6






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        19














        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






        share|improve this answer

























        • Yes, this is probably the reason why.

          – Abijeet Patro
          Jun 27 '13 at 13:23











        • You also can read this msdn.microsoft.com/en-us/library/vstudio/wkze6zky.aspx

          – Lucas
          Jun 27 '13 at 13:58











        • ok, so system.configuration dll will already be there?

          – Scubacode
          Jun 27 '13 at 18:08











        • Guidance: 1) assembly loaded?, 2) assembly loaded matches with origin assembly?, 3) "using" directives pointing to old or none valid references?, 4) .csproj manifest includes source invalid?, 5) a search tool looking regex in the entire solution (every class library and project). 5) check project settings for net framework version build option (collaborate in teams bring on this kind of problen, you must agree net framew. build version in both sides) 6) After that clean and build each by separate and finally, include all references to the destination project/class library. I should work!

          – fraballi
          May 26 '16 at 14:49















        19














        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






        share|improve this answer

























        • Yes, this is probably the reason why.

          – Abijeet Patro
          Jun 27 '13 at 13:23











        • You also can read this msdn.microsoft.com/en-us/library/vstudio/wkze6zky.aspx

          – Lucas
          Jun 27 '13 at 13:58











        • ok, so system.configuration dll will already be there?

          – Scubacode
          Jun 27 '13 at 18:08











        • Guidance: 1) assembly loaded?, 2) assembly loaded matches with origin assembly?, 3) "using" directives pointing to old or none valid references?, 4) .csproj manifest includes source invalid?, 5) a search tool looking regex in the entire solution (every class library and project). 5) check project settings for net framework version build option (collaborate in teams bring on this kind of problen, you must agree net framew. build version in both sides) 6) After that clean and build each by separate and finally, include all references to the destination project/class library. I should work!

          – fraballi
          May 26 '16 at 14:49













        19












        19








        19







        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






        share|improve this answer















        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







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jun 27 '13 at 18:37

























        answered Jun 27 '13 at 13:22









        John KraftJohn Kraft

        5,73642849




        5,73642849












        • Yes, this is probably the reason why.

          – Abijeet Patro
          Jun 27 '13 at 13:23











        • You also can read this msdn.microsoft.com/en-us/library/vstudio/wkze6zky.aspx

          – Lucas
          Jun 27 '13 at 13:58











        • ok, so system.configuration dll will already be there?

          – Scubacode
          Jun 27 '13 at 18:08











        • Guidance: 1) assembly loaded?, 2) assembly loaded matches with origin assembly?, 3) "using" directives pointing to old or none valid references?, 4) .csproj manifest includes source invalid?, 5) a search tool looking regex in the entire solution (every class library and project). 5) check project settings for net framework version build option (collaborate in teams bring on this kind of problen, you must agree net framew. build version in both sides) 6) After that clean and build each by separate and finally, include all references to the destination project/class library. I should work!

          – fraballi
          May 26 '16 at 14:49

















        • Yes, this is probably the reason why.

          – Abijeet Patro
          Jun 27 '13 at 13:23











        • You also can read this msdn.microsoft.com/en-us/library/vstudio/wkze6zky.aspx

          – Lucas
          Jun 27 '13 at 13:58











        • ok, so system.configuration dll will already be there?

          – Scubacode
          Jun 27 '13 at 18:08











        • Guidance: 1) assembly loaded?, 2) assembly loaded matches with origin assembly?, 3) "using" directives pointing to old or none valid references?, 4) .csproj manifest includes source invalid?, 5) a search tool looking regex in the entire solution (every class library and project). 5) check project settings for net framework version build option (collaborate in teams bring on this kind of problen, you must agree net framew. build version in both sides) 6) After that clean and build each by separate and finally, include all references to the destination project/class library. I should work!

          – fraballi
          May 26 '16 at 14:49
















        Yes, this is probably the reason why.

        – Abijeet Patro
        Jun 27 '13 at 13:23





        Yes, this is probably the reason why.

        – Abijeet Patro
        Jun 27 '13 at 13:23













        You also can read this msdn.microsoft.com/en-us/library/vstudio/wkze6zky.aspx

        – Lucas
        Jun 27 '13 at 13:58





        You also can read this msdn.microsoft.com/en-us/library/vstudio/wkze6zky.aspx

        – Lucas
        Jun 27 '13 at 13:58













        ok, so system.configuration dll will already be there?

        – Scubacode
        Jun 27 '13 at 18:08





        ok, so system.configuration dll will already be there?

        – Scubacode
        Jun 27 '13 at 18:08













        Guidance: 1) assembly loaded?, 2) assembly loaded matches with origin assembly?, 3) "using" directives pointing to old or none valid references?, 4) .csproj manifest includes source invalid?, 5) a search tool looking regex in the entire solution (every class library and project). 5) check project settings for net framework version build option (collaborate in teams bring on this kind of problen, you must agree net framew. build version in both sides) 6) After that clean and build each by separate and finally, include all references to the destination project/class library. I should work!

        – fraballi
        May 26 '16 at 14:49





        Guidance: 1) assembly loaded?, 2) assembly loaded matches with origin assembly?, 3) "using" directives pointing to old or none valid references?, 4) .csproj manifest includes source invalid?, 5) a search tool looking regex in the entire solution (every class library and project). 5) check project settings for net framework version build option (collaborate in teams bring on this kind of problen, you must agree net framew. build version in both sides) 6) After that clean and build each by separate and finally, include all references to the destination project/class library. I should work!

        – fraballi
        May 26 '16 at 14:49













        4














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






        share|improve this answer



























          4














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






          share|improve this answer

























            4












            4








            4







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






            share|improve this answer













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







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Apr 20 '17 at 5:54









            Gayatri DingareGayatri Dingare

            642




            642





















                0














                You using statements appear 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..."






                share|improve this answer























                • Will the system.configuration.dll already be there? sorry, such a noob. Does Visual Studio create the dll for you?

                  – Scubacode
                  Jun 27 '13 at 18:05











                • @Scubacode Looks like John Kraft has provided some great images on where to find the assembly!

                  – Samuel Parkinson
                  Jun 28 '13 at 8:26















                0














                You using statements appear 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..."






                share|improve this answer























                • Will the system.configuration.dll already be there? sorry, such a noob. Does Visual Studio create the dll for you?

                  – Scubacode
                  Jun 27 '13 at 18:05











                • @Scubacode Looks like John Kraft has provided some great images on where to find the assembly!

                  – Samuel Parkinson
                  Jun 28 '13 at 8:26













                0












                0








                0







                You using statements appear 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..."






                share|improve this answer













                You using statements appear 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..."







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jun 27 '13 at 13:23









                Samuel ParkinsonSamuel Parkinson

                2,0422037




                2,0422037












                • Will the system.configuration.dll already be there? sorry, such a noob. Does Visual Studio create the dll for you?

                  – Scubacode
                  Jun 27 '13 at 18:05











                • @Scubacode Looks like John Kraft has provided some great images on where to find the assembly!

                  – Samuel Parkinson
                  Jun 28 '13 at 8:26

















                • Will the system.configuration.dll already be there? sorry, such a noob. Does Visual Studio create the dll for you?

                  – Scubacode
                  Jun 27 '13 at 18:05











                • @Scubacode Looks like John Kraft has provided some great images on where to find the assembly!

                  – Samuel Parkinson
                  Jun 28 '13 at 8:26
















                Will the system.configuration.dll already be there? sorry, such a noob. Does Visual Studio create the dll for you?

                – Scubacode
                Jun 27 '13 at 18:05





                Will the system.configuration.dll already be there? sorry, such a noob. Does Visual Studio create the dll for you?

                – Scubacode
                Jun 27 '13 at 18:05













                @Scubacode Looks like John Kraft has provided some great images on where to find the assembly!

                – Samuel Parkinson
                Jun 28 '13 at 8:26





                @Scubacode Looks like John Kraft has provided some great images on where to find the assembly!

                – Samuel Parkinson
                Jun 28 '13 at 8:26











                0














                This problem would be caused by your application missing a reference to an external dll that you are trying to use code from. Usually Visual Studio should give you an idea about which objects that it doesn't know what to do with so that should be a step in the right direction.



                You need to look in the solution explorer and right click on project references and then go to add -> and look up the one you need. It's most likely the System.Configuration assembly as most people have pointed out here while should be under the Framework option in the references window. That should resolve your issue.






                share|improve this answer



























                  0














                  This problem would be caused by your application missing a reference to an external dll that you are trying to use code from. Usually Visual Studio should give you an idea about which objects that it doesn't know what to do with so that should be a step in the right direction.



                  You need to look in the solution explorer and right click on project references and then go to add -> and look up the one you need. It's most likely the System.Configuration assembly as most people have pointed out here while should be under the Framework option in the references window. That should resolve your issue.






                  share|improve this answer

























                    0












                    0








                    0







                    This problem would be caused by your application missing a reference to an external dll that you are trying to use code from. Usually Visual Studio should give you an idea about which objects that it doesn't know what to do with so that should be a step in the right direction.



                    You need to look in the solution explorer and right click on project references and then go to add -> and look up the one you need. It's most likely the System.Configuration assembly as most people have pointed out here while should be under the Framework option in the references window. That should resolve your issue.






                    share|improve this answer













                    This problem would be caused by your application missing a reference to an external dll that you are trying to use code from. Usually Visual Studio should give you an idea about which objects that it doesn't know what to do with so that should be a step in the right direction.



                    You need to look in the solution explorer and right click on project references and then go to add -> and look up the one you need. It's most likely the System.Configuration assembly as most people have pointed out here while should be under the Framework option in the references window. That should resolve your issue.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jun 27 '13 at 13:24









                    Jesse CarterJesse Carter

                    9,88033761




                    9,88033761





















                        0














                        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?






                        share|improve this answer























                        • no it's not, new to this site and got a pop up saying to add them in so it would format correctly in my question

                          – Scubacode
                          Jun 27 '13 at 18:04















                        0














                        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?






                        share|improve this answer























                        • no it's not, new to this site and got a pop up saying to add them in so it would format correctly in my question

                          – Scubacode
                          Jun 27 '13 at 18:04













                        0












                        0








                        0







                        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?






                        share|improve this answer













                        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?







                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Jun 27 '13 at 13:42









                        Microsoft DNMicrosoft DN

                        7,00373759




                        7,00373759












                        • no it's not, new to this site and got a pop up saying to add them in so it would format correctly in my question

                          – Scubacode
                          Jun 27 '13 at 18:04

















                        • no it's not, new to this site and got a pop up saying to add them in so it would format correctly in my question

                          – Scubacode
                          Jun 27 '13 at 18:04
















                        no it's not, new to this site and got a pop up saying to add them in so it would format correctly in my question

                        – Scubacode
                        Jun 27 '13 at 18:04





                        no it's not, new to this site and got a pop up saying to add them in so it would format correctly in my question

                        – Scubacode
                        Jun 27 '13 at 18:04











                        0














                        I had the same problem earlier today. I could not figure out why the class file I was trying to reference was not being seen by the compiler. I had recently changed the namespace of the class file in question to a different but already existing namespace. (I also had using references to the class's new and previous namespaces where I was trying to instantiate it)



                        Where the compiler was telling me I was missing a reference when trying to instantiate the class, I right clicked and hit "generate class stub". Once Visual Studio generated a class stub for me, I coped and pasted the code from the old class file into this stub, saved the stub and when I tried to compile again it worked! No issues.



                        Might be a solution specific to my build, but its worth a try.






                        share|improve this answer



























                          0














                          I had the same problem earlier today. I could not figure out why the class file I was trying to reference was not being seen by the compiler. I had recently changed the namespace of the class file in question to a different but already existing namespace. (I also had using references to the class's new and previous namespaces where I was trying to instantiate it)



                          Where the compiler was telling me I was missing a reference when trying to instantiate the class, I right clicked and hit "generate class stub". Once Visual Studio generated a class stub for me, I coped and pasted the code from the old class file into this stub, saved the stub and when I tried to compile again it worked! No issues.



                          Might be a solution specific to my build, but its worth a try.






                          share|improve this answer

























                            0












                            0








                            0







                            I had the same problem earlier today. I could not figure out why the class file I was trying to reference was not being seen by the compiler. I had recently changed the namespace of the class file in question to a different but already existing namespace. (I also had using references to the class's new and previous namespaces where I was trying to instantiate it)



                            Where the compiler was telling me I was missing a reference when trying to instantiate the class, I right clicked and hit "generate class stub". Once Visual Studio generated a class stub for me, I coped and pasted the code from the old class file into this stub, saved the stub and when I tried to compile again it worked! No issues.



                            Might be a solution specific to my build, but its worth a try.






                            share|improve this answer













                            I had the same problem earlier today. I could not figure out why the class file I was trying to reference was not being seen by the compiler. I had recently changed the namespace of the class file in question to a different but already existing namespace. (I also had using references to the class's new and previous namespaces where I was trying to instantiate it)



                            Where the compiler was telling me I was missing a reference when trying to instantiate the class, I right clicked and hit "generate class stub". Once Visual Studio generated a class stub for me, I coped and pasted the code from the old class file into this stub, saved the stub and when I tried to compile again it worked! No issues.



                            Might be a solution specific to my build, but its worth a try.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Jun 28 '13 at 1:39









                            Alex VallejoAlex Vallejo

                            7011915




                            7011915



























                                draft saved

                                draft discarded
















































                                Thanks for contributing an answer to Stack Overflow!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid


                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.

                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f17344295%2fim-getting-the-missing-a-using-directive-or-assembly-reference-and-no-clue-wh%23new-answer', 'question_page');

                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Top Tejano songwriter Luis Silva dead of heart attack at 64

                                政党

                                天津地下鉄3号線