Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWade Berrier <wade@mono-cvs.ximian.com>2007-03-08 01:14:19 +0300
committerWade Berrier <wade@mono-cvs.ximian.com>2007-03-08 01:14:19 +0300
commita158155808d5dd2eb1a902496728dfd2dc2456aa (patch)
treef808bbdb220cc0202af984e605ee927583311dc9 /Extras/AspNetAddIn/Project
parentaca6a41a900f040c062c675ecea5af04fe063a0d (diff)
Merged the following revisions from trunk:
asp.net editor fixes: 73390 73398 73403 73405 Other fixes: 73393 73394 73395 svn path=/branches/monodevelop/0.13/; revision=73916
Diffstat (limited to 'Extras/AspNetAddIn/Project')
-rw-r--r--Extras/AspNetAddIn/Project/AspNetAppProject.cs59
1 files changed, 51 insertions, 8 deletions
diff --git a/Extras/AspNetAddIn/Project/AspNetAppProject.cs b/Extras/AspNetAddIn/Project/AspNetAppProject.cs
index c089d52160..a84b6132ee 100644
--- a/Extras/AspNetAddIn/Project/AspNetAppProject.cs
+++ b/Extras/AspNetAddIn/Project/AspNetAppProject.cs
@@ -39,6 +39,7 @@ using MonoDevelop.Core.ProgressMonitoring;
using MonoDevelop.Projects;
using MonoDevelop.Projects.Parser;
using MonoDevelop.Projects.Serialization;
+using MonoDevelop.Projects.Deployment;
using AspNetAddIn.Parser.Tree;
using AspNetAddIn.Parser;
@@ -88,30 +89,80 @@ namespace AspNetAddIn
public AspNetAppProject ()
{
+ commonInit ();
}
public AspNetAppProject (string languageName)
: base (languageName)
{
+ commonInit ();
}
public AspNetAppProject (string languageName, ProjectCreateInformation info, XmlElement projectOptions)
: base (languageName, info, projectOptions)
{
+ commonInit ();
}
+
+ private void commonInit ()
+ {
+ //AspNetAppProjectConfiguration needs SourceDirectory set so it can append "bin" to determine the output path
+ Configurations.ConfigurationAdded += delegate (object ob, ConfigurationEventArgs args) {
+ AspNetAppProjectConfiguration conf = (AspNetAppProjectConfiguration) args.Configuration;
+ conf.SourceDirectory = BaseDirectory;
+ };
+ }
+
+ //AspNetAppProjectConfiguration needs SourceDirectory set so it can append "bin" to determine the output path
+ public override string FileName {
+ get {
+ return base.FileName;
+ }
+ set {
+ base.FileName = value;
+ foreach (AspNetAppProjectConfiguration conf in Configurations)
+ conf.SourceDirectory = BaseDirectory;
+ }
+ }
+
public override IConfiguration CreateConfiguration (string name)
{
AspNetAppProjectConfiguration conf = new AspNetAppProjectConfiguration ();
conf.Name = name;
conf.CompilationParameters = LanguageBinding.CreateCompilationParameters (null);
+ conf.SourceDirectory = BaseDirectory;
return conf;
}
#endregion
+ //custom version of GetDeployFiles which puts libraries in the bin directory
+ public override DeployFileCollection GetDeployFiles ()
+ {
+ DeployFileCollection files = new DeployFileCollection ();
+
+ //add files that are marked to 'deploy'
+ foreach (ProjectFile pf in ProjectFiles)
+ if (pf.BuildAction == BuildAction.FileCopy)
+ files.Add (new DeployFile (pf.FilePath, pf.RelativePath));
+
+ //add referenced libraries
+ DeployFileCollection dfc = GetReferenceDeployFiles (false);
+ foreach (DeployFile df in dfc)
+ df.RelativeTargetPath = Path.Combine ("bin", df.RelativeTargetPath);
+ files.AddRange (dfc);
+
+ //add the compiled output file
+ string outputFile = this.GetOutputFileName ();
+ if ( !string.IsNullOrEmpty (outputFile))
+ files.Add (new DeployFile (outputFile, Path.Combine ("bin", Path.GetFileName (outputFile)), TargetDirectory.ProgramFiles));
+
+ return files;
+ }
+
#region build/prebuild/execute
protected override void DoExecute (IProgressMonitor monitor, ExecutionContext context)
@@ -157,14 +208,6 @@ namespace AspNetAddIn
}
}
- protected override void DoPreBuild (IProgressMonitor monitor)
- {
- AspNetAppProjectConfiguration conf = (AspNetAppProjectConfiguration) ActiveConfiguration;
- conf.SourceDirectory = BaseDirectory;
-
- base.DoPreBuild (monitor);
- }
-
#endregion
#region File utility methods