This repository was archived by the owner on Oct 16, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717// DEALINGS IN THE SOFTWARE.
1818
1919using System ;
20- using System . Collections ;
21- using System . Collections . Generic ;
22- using System . IO ;
2320using ICSharpCode . Core ;
2421using ICSharpCode . SharpDevelop . Gui ;
2522
@@ -30,15 +27,22 @@ namespace ICSharpCode.SharpDevelop.Project.PortableLibrary
3027 /// </summary>
3128 public class CheckPortableLibraryInstalled : AbstractCommand
3229 {
30+ public static string CouldNotFindToolsDescription {
31+ get {
32+ return StringParser . Parse (
33+ "${res:PortableLibrary.CouldNotFindTools}" + Environment . NewLine + Environment . NewLine
34+ + "${res:PortableLibrary.ToolsInstallationHelp}" ) ;
35+ }
36+ }
37+
38+ public static string DownloadUrl {
39+ get { return "http://go.microsoft.com/fwlink/?LinkId=210823" ; }
40+ }
41+
3342 public override void Run ( )
3443 {
3544 if ( ! ProfileList . IsPortableLibraryInstalled ( ) ) {
36- using ( ToolNotFoundDialog dlg = new ToolNotFoundDialog (
37- StringParser . Parse (
38- "${res:PortableLibrary.CouldNotFindTools}" + Environment . NewLine + Environment . NewLine +
39- "${res:PortableLibrary.ToolsInstallationHelp}" ) ,
40- "http://go.microsoft.com/fwlink/?LinkId=210823"
41- ) ) {
45+ using ( ToolNotFoundDialog dlg = new ToolNotFoundDialog ( CouldNotFindToolsDescription , DownloadUrl ) ) {
4246 // our message is long, so make the window bigger than usual
4347 dlg . Width += 70 ;
4448 dlg . Height += 70 ;
Original file line number Diff line number Diff line change 3434using Microsoft . Build . Construction ;
3535using Microsoft . Build . Evaluation ;
3636using Microsoft . Build . Exceptions ;
37+ using ICSharpCode . SharpDevelop . Project . PortableLibrary ;
3738using MSBuild = Microsoft . Build . Evaluation ;
3839
3940namespace ICSharpCode . SharpDevelop . Project
@@ -1243,6 +1244,11 @@ public MSBuildBasedProject(ProjectLoadInformation loadInformation)
12431244 } else {
12441245 throw ;
12451246 }
1247+ } else if ( ex . ErrorCode == "MSB4019" && ex . BaseMessage . Contains ( "Microsoft.Portable." ) && ! ProfileList . IsPortableLibraryInstalled ( ) ) {
1248+ throw new ToolNotFoundProjectLoadException ( ex . Message , ex ) {
1249+ Description = CheckPortableLibraryInstalled . CouldNotFindToolsDescription ,
1250+ LinkTarget = CheckPortableLibraryInstalled . DownloadUrl
1251+ } ;
12461252 } else {
12471253 throw ;
12481254 }
You can’t perform that action at this time.
0 commit comments