Where is System.Reflection.dll assembly?

G

groovyjman21

Hi, I am using FXCop on my c# project and it is complaining about
signing the assembly with a strong name key. All the documentation I
can find says to do:

using System.Reflection;
....
[assembly:AssemblyKeyFileAttribute("foo.key")] namespace Foo

Which is fine, except that I need to add a reference in my Project to
the System.Reflection.dll assembly and I can't find it. I have .NET
2.0 Framework installed and can find all my other necessary assemblies
at C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\. Do I need to
download System.Reflection somewhere? I thought it was a core
assembly? Help!
 
G

Gabriel Lozano-Morán

1) System.Reflection is a namespace in the Microsoft Common Runtime Library
(mscorlib.dll), normally you don't need to add the reference to this
assembly unless you accidentally removed it.

2) Why exactly do you need the System.Reflection namespace for?

3) Also try to centralize assembly attributes in \Properties\AssemblyInfo.cs
that's what it is made for.

Gabriel Lozano-Morán
The .NET Aficionado
http://www.pointerx.net
 
G

groovyjman21

Thank you on all three counts, Gabriel!


1) System.Reflection is a namespace in the Microsoft Common Runtime Library
(mscorlib.dll), normally you don't need to add the reference to this
assembly unless you accidentally removed it.

2) Why exactly do you need the System.Reflection namespace for?

3) Also try to centralize assembly attributes in \Properties\AssemblyInfo..cs
that's what it is made for.

Gabriel Lozano-Morán
The .NET Aficionado
http://www.pointerx.net

Hi, I am using FXCop on my c# project and it is complaining about
signing the assembly with a strong name key. All the documentation I
can find says to do:

using System.Reflection;
...
[assembly:AssemblyKeyFileAttribute("foo.key")] namespace Foo

Which is fine, except that I need to add a reference in my Project to
the System.Reflection.dll assembly and I can't find it. I have .NET
2.0 Framework installed and can find all my other necessary assemblies
at C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\. Do I need to
download System.Reflection somewhere? I thought it was a core
assembly? Help!
 
G

Gabriel Lozano-Morán

Just ignore my question on why you need the System.Reflection namespace.

Also did you know that in Visual Studio 2005 it is possible to sign your
projects through the properties? This will inject the correct attributes in
AssemblyInfo.cs.

Right-click a project and select Properties and then click on the tab
"Signing".

Gabriel Lozano-Morán
The .NET Aficionado
http://www.pointerx.net

Thank you on all three counts, Gabriel!


1) System.Reflection is a namespace in the Microsoft Common Runtime
Library
(mscorlib.dll), normally you don't need to add the reference to this
assembly unless you accidentally removed it.

2) Why exactly do you need the System.Reflection namespace for?

3) Also try to centralize assembly attributes in
\Properties\AssemblyInfo.cs
that's what it is made for.

Gabriel Lozano-Morán
The .NET Aficionado
http://www.pointerx.net

Hi, I am using FXCop on my c# project and it is complaining about
signing the assembly with a strong name key. All the documentation I
can find says to do:

using System.Reflection;
...
[assembly:AssemblyKeyFileAttribute("foo.key")] namespace Foo

Which is fine, except that I need to add a reference in my Project to
the System.Reflection.dll assembly and I can't find it. I have .NET
2.0 Framework installed and can find all my other necessary assemblies
at C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\. Do I need to
download System.Reflection somewhere? I thought it was a core
assembly? Help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top