On Tue, 05 Aug 2003, Steve Loughran <[EMAIL PROTECTED]> wrote: > I see the default references are going to be trouble.
More trouble than I had expected. After making sure that there was no trailing ; I get this here [...] [csc] /usr/lib/System.dll is out of date [csc] /usr/lib/corlib.dll is out of date [csc] working from source directory /home/bodewig/ASF/jakarta/jakarta-ant/src/etc/testcases/taskdefs/optional [csc] /home/bodewig/ASF/jakarta/jakarta-ant/src/etc/testcases/taskdefs/optional/dotnet/example.cs is out of date [csc] /home/bodewig/ASF/jakarta/jakarta-ant/src/etc/testcases/taskdefs/optional/dotnet/example2.cs is out of date [csc] compiling 2 files [... SNIPPED ...] [csc] error CS0518: The predefined type `System.Object' is not defined and so on. First, obviously the /reference argument is not doing what I (being the C# neophyte I am) thought it would do (you describe it as CLASSPATH equivalent) - as its content is considered as something that may need a recompilation. When I drop the /nostdlib+ generated by includedefaultreferences="false", I get rid of these errors but the compilation fails as mcs now tries to write to the .dlls and fails (no permission to do so, of course). If I now also remove the /reference argument, things go OK until I hit error CS5001: Program /home/bodewig/ASF/jakarta/jakarta-ant/src/etc/testcases/taskdefs/optional/dotnet/build/ExampleCsc.exe does not have an entry point defined which is quite close to what I'd expect from the task to emit as well. I think this is a second problem that we can try to solve later. Now the main problem is that includedefaultreferences does two things, it controls the /nostdlib argument and it also controls an implicit set of references that will be added as argument. For Mono we do not want the second part as it references assemblies not present there. I feel a new attribute is getting close. adddefaultreferences that by default takes the same value as includedefaultreferences? (best viewed with a non-proportional font 8-) adddefaultreferences | includedefaultreferences | effect ===================================================================== true | true | /nostdlib+ and | | implicit /reference --------------------------------------------------------------------- true | false | /nostdlib- but | | implicit /reference --------------------------------------------------------------------- false | true | /nostdlib+ and no | | implicit /reference --------------------------------------------------------------------- false | false | /nostdlib- and no | | implicit /reference I don't think the second line makes sense, but anyway. Mono users would then use the third combination. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]