Add file to folder in C# project template

G

Guest

Hell
I try to make a project Template in C# but i can't add a template "dataAccess.cs" file to a folder "DALayer"
de project template looks like this

<VisualStudioProject><CSHARP ProjectType = "Web"><Build><Setting
OutputType = "Library
NoStandardLibraries = "false
Name = "Debug
DebugSymbols = "true
Optimize = "false
OutputPath = ".\bin
EnableASPXDebugging = "true
EnableUnmanagedDebugging = "false
DefineConstants = "DEBUG;TRACE
WarningLevel = "4
IncrementalBuild = "false
/><Confi
Name = "Release
DebugSymbols = "false
Optimize = "true
OutputPath = ".\bin
EnableASPXDebugging = "true
EnableUnmanagedDebugging = "false
DefineConstants = "TRACE
WarningLevel = "4
IncrementalBuild = "false
/></Settings></Build><Files><Include><Folder RelPath = "DALayer\" /><Fil
RelPath = "DALayer\dataAccess.cs
SubType = "Code
Link = "dataAccess.cs
BuildAction = "Compile
/><Folder RelPath = "BSLayer\" /><Folder RelPath = "UILayer\" /></Include></Files></CSHARP></VisualStudioProject

the file "dataAccess.cs" is added to template.in
i have edited also "GetCSharpTargetName" function in the default.js and it looks lik

function GetCSharpTargetName(strName, strProjectName

var strTarget = strName

switch (strName

case "readme.txt"
strTarget = "ReadMe.txt"
break
case "WebForm1.aspx"
strTarget = "WebForm1.aspx"
break
case "assemblyinfo.cs"
strTarget = "AssemblyInfo.cs"
break
case "Global.asax"
strTarget = "Global.asax"
break
case "Web.config"
strTarget = "Web.config"
break
case "dataAccess.cs"
strTarget = "DALayer\dataAccess.cs"
break


return strTarget;

the result is that DALayerdataAccess.cs is added, and if i use / it gives an error

Any help appreciated
bahadi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top