[Mono-list] Use Windows or Linux paths to system references when building with VS2010 for Linux?
Robert Jordan
robertj at gmx.net
Tue Dec 28 08:36:52 EST 2010
On 28.12.2010 06:25, CodeSlinger wrote:
>
> When I use VS2010 to create a new C# 4.0 command line application, by
> default, I get references to the below assemblies all of which are located
> in the "C:\Program Files (x86)\Reference
> Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client" directory
> and are also marked "Strong Name=True" so are also in the GAC. If I build on
> Windows I can run the pgm on Linux mono 2.8 just fine.
>
> Microsoft.CSharp
> System
> System.Core
> System.Data
> System.Data.DataSetExtensions
> System.Xml
> System.Xml.Linq
>
> My question is - should I be referencing system assembly dlls from the
> /usr/mono/lib/mono/gac and 4.0 directories on Linux instead of the ones on
> Windows or does it not make a difference since they are in the GAC?
It makes no difference.
Compile-time references are not persisted by their full path name. This
means that it doesn't matter where you've referenced the assemblies
from as long as they will exist at run-time (either in the GAC or
in application's directory).
That's why your app is still working despite the fact that you've
referenced assemblies from Framework\.NETFramework\v4.0\Profile\Client,
a path that doesn't exist under Linux.
Robert
More information about the Mono-list
mailing list