> And just checking: are you using the 1.1 version of csc, or the 2.0
> one?
>
> Marc
This is a good question. Actually, I'm using a csc.exe located in the
same folder as the .CS file. When I pointed to the CSC.exe file
located in c:\windows\Microsoft.NET\Framework\v1.1.4322\ , the
compiling works fine! Could it be that the absence of a csc.exe.config
in the local folder causes the csc to look all over the place for the
referenced namespaces, and come up with conflicts?
Whatever the case, I'm back on track.
Thanks, Marc.
--Brent
Pavel Minaev - 11 May 2008 22:50 GMT
> This is a good question. Actually, I'm using a csc.exe located in the
> same folder as the .CS file. When I pointed to the CSC.exe file
> located in c:\windows\Microsoft.NET\Framework\v1.1.4322\ , the
> compiling works fine! Could it be that the absence of a csc.exe.config
> in the local folder causes the csc to look all over the place for the
> referenced namespaces, and come up with conflicts?
Not really. It's just that csc always references some assemblies (in
particular, mscorlib) from the corresponding version of .NET
Framework, and then also those that you explicitly specify. In your
case, it would seem that this results in both mscorlib from 1.1 and
mscorlib from 2.0 being referenced, hence the clash.
.NET 1.1 and 2.0 do play nice with each other in a sense that they can
be installed side by side, and programs will run using whatever
version of .NET they were built with. But if you're compiling with csc
2.0, you should really be referencing 2.0 assemblies, not 1.1 ones.