[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pnet-developers] Handling Windows-isms in a CLI API
From: |
Marcus |
Subject: |
[Pnet-developers] Handling Windows-isms in a CLI API |
Date: |
Sat, 29 Jan 2005 21:01:49 -0600 |
User-agent: |
KMail/1.7.92 |
I am working on an program similar to MSBuild and trying to provide the same
API for compatibility. I have run across a problem where the API assumes that
the filesystem is organized like Windows, and I do not know how to handle it
in Unix-like systems.
Someone writing an MSBuild client, would typically write this:
Engine myEngine = new Engine(@"c:\windows\microsoft.net\framework\v2.0.12345")
This sets the C# property myEngine.BinPath property to "c:
\windows\microsoft.net\framework\v2.0.12345", which is the path to
MSBuild.exe. MSBuild also has "properties", and the constructor also sets the
built-in MSBuild property MSBuildBinPath to the above string.
If the only purpose of BinPath/MSBuildBinPath were to locate MSBuild.exe, this
might not be a big problem, but the main use of this property is to locate
various build-related files, such as Microsoft.CSharp.targets. In other
words, this API assumes that MSBuild.exe and the XML file
Microsoft.CSharp.targets can be found in the same directory (i.e. the one
specified in the ctor above). Certainly Linux people will balk at putting
these files in places like /usr/local/bin.
I would appreciate some suggestions on how to handle this.
Marcus
- [Pnet-developers] Handling Windows-isms in a CLI API,
Marcus <=