问题
I'm trying to create a clearcase dynamic view using CAL in C# using the following code.
private static ClearCase.ClearTool ct;
string viewName = "tmp_view";
string cmd = "mkview –tag "+ viewName + " –stream " + selectedStream +"@"+ projectVob + " \\\\<Network Shared Path>\\"+ viewName +".vws";
ct.CmdExec(cmd);
On execution, ct.CmdExec method throws exception saying viewTag must be specified.
For the same cmd string I'm able to create a view using cleartool command prompt.
Can you please tell me why I'm unable to create a view in C#?
回答1:
It is possible that you didn't used -tag
but –tag
: replace '–
' (minus) by '-
' (hyphen minus).
Note: same for –stream
: use -stream
.

(plus , minus , hyphen-minus)
See What's the toughest bug you ever found and fixed? :
- "Hyphen-minus" is the regular familiar character on keyboards,
ASCII 45
andU+002D
, (ab)used in both "5-4=1
" and "vice-versa
".- The actual minus sign, which is longer, is
U+2212
and is not in ASCII.
It is typical of IBM documentation which, unfortunately, use minus (the long '–'): any copy-paste coming from their page doesn't work immediately.
来源:https://stackoverflow.com/questions/13834503/create-clearcase-dynamic-view-using-cal-in-c-sharp