diff options
author | Wade Berrier <wade@mono-cvs.ximian.com> | 2007-03-08 01:14:19 +0300 |
---|---|---|
committer | Wade Berrier <wade@mono-cvs.ximian.com> | 2007-03-08 01:14:19 +0300 |
commit | a158155808d5dd2eb1a902496728dfd2dc2456aa (patch) | |
tree | f808bbdb220cc0202af984e605ee927583311dc9 /Extras/AspNetAddIn | |
parent | aca6a41a900f040c062c675ecea5af04fe063a0d (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')
-rw-r--r-- | Extras/AspNetAddIn/ChangeLog | 8 | ||||
-rw-r--r-- | Extras/AspNetAddIn/Project/AspNetAppProject.cs | 59 |
2 files changed, 59 insertions, 8 deletions
diff --git a/Extras/AspNetAddIn/ChangeLog b/Extras/AspNetAddIn/ChangeLog index 3258f1682b..e4b4946caa 100644 --- a/Extras/AspNetAddIn/ChangeLog +++ b/Extras/AspNetAddIn/ChangeLog @@ -1,3 +1,11 @@ +2007-02-25 Michael Hutchinson <m.j.hutchinson@gmail.com> + + * Project/AspNetAppProject.cs: + Remove DoPreBuild override as it's a deprecated build extension point. + Now set AspNetAppProjectConfiguration.SourceDirectory via a FileName + override, which is more robust. + Implement GetDeployFiles to handle ASP.NET bin folder. + 2007-02-21 Ankit Jain <jankit@novell.com> * Project/VerifyCodeBehindBuildStep.cs: Warn the user if 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 |