.NET build error
Having added the subsonic 2.2 subcommander sonic.exe as an external tool I can generate my DAL classes in my defined \dataaccess\generated\ folder but when I build the project I get an error in the following file:
C:\开发者_Python百科WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\subsonictest\bdf9ac02\aff68c1c\App_Code.2ygn7ole.0.cs in the following:
Code:
/// <summary>
/// Creates an object wrapper for the iData_sp_GenerateDataSQL Procedure
/// </summary>
public static StoredProcedure IDataSpGenerateDataSQL(string TABLE, string IDENTITYCOL)
{
SubSonic.StoredProcedure sp = new
SubSonic.StoredProcedure("iData_sp_GenerateDataSQL",
DataService.GetInstance("KLA"),
"PUZZLE\mnolan");
sp.Command.AddParameter("@TABLE", TABLE, DbType.AnsiString, null, null);
sp.Command.AddParameter("@IDENTITYCOL", IDENTITYCOL, DbType.AnsiString, null, null);
return sp;
}
The error message is - error CS1009 Unrecognized escape sequence
and shows the error is associated with the PUZZLE\mnolan string.
I can escape the sequence with '\' but this won't help because this is a temporary build file and is regenerated.
Thanks for the help,
Mike
Try :
@"PUZZLE\mnolan"
Backslashes are special characters in C# strings. The @ tells C# to treat them literally. You could double the backslash instead.
精彩评论