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;
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
add a comment |
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
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
add a comment |
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
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
c# asp.net asp.net-mvc visual-studio-2010
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
add a comment |
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
add a comment |
6 Answers
6
active
oldest
votes
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...
Right-click and select Add Reference...
Find System.Configuration in the list of .Net Assemblies, select it, and click Ok...
The assembly should now appear in your references...
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
add a comment |
.Net framework of the referencing dll should be same as the .Net framework version of the Project in which dll is referred
add a comment |
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..."
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
add a comment |
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.
add a comment |
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?
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
add a comment |
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.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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...
Right-click and select Add Reference...
Find System.Configuration in the list of .Net Assemblies, select it, and click Ok...
The assembly should now appear in your references...
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
add a comment |
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...
Right-click and select Add Reference...
Find System.Configuration in the list of .Net Assemblies, select it, and click Ok...
The assembly should now appear in your references...
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
add a comment |
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...
Right-click and select Add Reference...
Find System.Configuration in the list of .Net Assemblies, select it, and click Ok...
The assembly should now appear in your references...
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...
Right-click and select Add Reference...
Find System.Configuration in the list of .Net Assemblies, select it, and click Ok...
The assembly should now appear in your references...
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
add a comment |
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
add a comment |
.Net framework of the referencing dll should be same as the .Net framework version of the Project in which dll is referred
add a comment |
.Net framework of the referencing dll should be same as the .Net framework version of the Project in which dll is referred
add a comment |
.Net framework of the referencing dll should be same as the .Net framework version of the Project in which dll is referred
.Net framework of the referencing dll should be same as the .Net framework version of the Project in which dll is referred
answered Apr 20 '17 at 5:54
Gayatri DingareGayatri Dingare
642
642
add a comment |
add a comment |
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..."
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
add a comment |
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..."
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
add a comment |
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..."
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..."
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
add a comment |
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
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Jun 27 '13 at 13:24
Jesse CarterJesse Carter
9,88033761
9,88033761
add a comment |
add a comment |
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?
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
add a comment |
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?
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
add a comment |
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?
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?
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
add a comment |
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
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Jun 28 '13 at 1:39
Alex VallejoAlex Vallejo
7011915
7011915
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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