diff --git a/data/templates/project/CSharp/SilverlightApplication.xpt b/data/templates/project/CSharp/SilverlightApplication.xpt new file mode 100644 index 0000000000..ad4ad337af --- /dev/null +++ b/data/templates/project/CSharp/SilverlightApplication.xpt @@ -0,0 +1,192 @@ + \ No newline at end of file diff --git a/src/Main/Base/Project/Src/Project/CompilableProject.cs b/src/Main/Base/Project/Src/Project/CompilableProject.cs index 74484ba962..cd5aca2550 100644 --- a/src/Main/Base/Project/Src/Project/CompilableProject.cs +++ b/src/Main/Base/Project/Src/Project/CompilableProject.cs @@ -207,6 +207,9 @@ namespace ICSharpCode.SharpDevelop.Project #region Starting (debugging) public override bool IsStartable { get { + if (IsSilverlightProject) { + return TestPageFileName.Length > 0; + } switch (this.StartAction) { case StartAction.Project: return OutputType == OutputType.Exe || OutputType == OutputType.WinExe; @@ -282,6 +285,10 @@ namespace ICSharpCode.SharpDevelop.Project public override ProcessStartInfo CreateStartInfo() { + if (IsSilverlightProject) { + string pagePath = "file:///" + Path.Combine(OutputFullPath, TestPageFileName); + return new ProcessStartInfo(pagePath); + } switch (this.StartAction) { case StartAction.Project: return CreateStartInfo(this.OutputAssemblyFullPath); @@ -350,6 +357,22 @@ namespace ICSharpCode.SharpDevelop.Project SetProperty("StartWorkingDirectory", string.IsNullOrEmpty(value) ? null : value); } } + + public bool IsSilverlightProject { + get { + string guids = GetEvaluatedProperty("ProjectTypeGuids") ?? ""; + return guids.Contains("A1591282-1198-4647-A2B1-27E5FF5F6F3B"); + } + } + + public string TestPageFileName { + get { + return GetEvaluatedProperty("TestPageFileName") ?? ""; + } + set { + SetProperty("TestPageFileName", string.IsNullOrEmpty(value) ? null : value); + } + } #endregion protected override void OnActiveConfigurationChanged(EventArgs e) diff --git a/src/Setup/Files.wxs b/src/Setup/Files.wxs index 5fc5842607..a6668134ca 100644 --- a/src/Setup/Files.wxs +++ b/src/Setup/Files.wxs @@ -1020,6 +1020,7 @@ +