csc error

  • Thread starter Thread starter CSharper
  • Start date Start date
C

CSharper

When I try to compile a C# application using the command line code I
am getting the following error;

App.xaml.cs(line,column): error cs0246: The type or namespace name
'Application' could not be found

I tried looking for System.* under c:\windows\microsoft.net\framework
\v3.5 and there are no system.* dlls found, on the other hand I can
find them in v2.0

Am I suppose to use command line reference /r and specify all the dlls
required for this project against v2.0 or am I looking at wrong places
for v3.5?

Thanks.
 
CSharper said:
When I try to compile a C# application using the command line code I
am getting the following error;

App.xaml.cs(line,column): error cs0246: The type or namespace name
'Application' could not be found

I tried looking for System.* under c:\windows\microsoft.net\framework
\v3.5 and there are no system.* dlls found, on the other hand I can
find them in v2.0

Am I suppose to use command line reference /r and specify all the dlls
required for this project against v2.0 or am I looking at wrong places
for v3.5?

..NET 3.x uses the .NET 2.0 dlls plus some more (WCF, WPF, and so on).
 
CSharper said:
When I try to compile a C# application using the command line code I
am getting the following error;

App.xaml.cs(line,column): error cs0246: The type or namespace name
'Application' could not be found

I tried looking for System.* under c:\windows\microsoft.net\framework
\v3.5 and there are no system.* dlls found, on the other hand I can
find them in v2.0

Am I suppose to use command line reference /r and specify all the dlls
required for this project against v2.0 or am I looking at wrong places
for v3.5?

Thanks.


The V3 and V3.5 assemblies are located under "x:\Program Files\Reference
Assemblies\Microsoft\Framework\v3.0" and "x:\Program Files\Reference
Assemblies\Microsoft\Framework\v3.5" where x is your system drive.

Willy.
 
The V3 and V3.5 assemblies are located under  "x:\Program Files\Reference
Assemblies\Microsoft\Framework\v3.0" and "x:\Program Files\Reference
Assemblies\Microsoft\Framework\v3.5" where x is your system drive.

Willy.

Thank you very much and quick question, so do I need to individually
include the reference or can I do a wild card with /r:c:\program files
\reference assemblies\Microsoft\Framework\v3.5\*.dll

thanks.
 
The V3 and V3.5 assemblies are located under "x:\Program Files\Reference
Assemblies\Microsoft\Framework\v3.0" and "x:\Program Files\Reference
Assemblies\Microsoft\Framework\v3.5" where x is your system drive.

Willy.

Thank you very much and quick question, so do I need to individually
include the reference or can I do a wild card with /r:c:\program files
\reference assemblies\Microsoft\Framework\v3.5\*.dll

thanks.

You need to reference the exact assembly, no wild cards allowed here.
You also need to make sure you are using the right csc.exe (the one from
...\framework\v3.5), that is, this path must be your home path or you need to
set this directory in the path environment variable before the V2.0
directory path. Failing to do so will use the wrong csc.rsp file needed to
locate the correct framework assemblies.


Willy.
 
Thank you very much and quick question, so do I need to individually
include the reference or can I do a wild card with /r:c:\program files
\reference assemblies\Microsoft\Framework\v3.5\*.dll

thanks.

You need to reference the exact assembly, no wild cards allowed here.
You also need to make sure you are using the right csc.exe (the one from
..\framework\v3.5), that is, this path must be your home path or you need to
set this directory in the path environment variable before the V2.0
directory path. Failing to do so will use the wrong csc.rsp file needed to
locate  the correct framework assemblies.

Willy.- Hide quoted text -

- Show quoted text -

Excellent, thank you very much.
 
Back
Top