Skip to content

Commit

Permalink
Do not force ShowProjectOutputs - can cause crash in some solutions w…
Browse files Browse the repository at this point in the history
…ith "Miscellaneous Files" entries

Add error for no Build parameters
Update Copyrights
  • Loading branch information
ninjaoxygen committed Jun 19, 2019
1 parent 85bd7c8 commit e3621c9
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
8 changes: 3 additions & 5 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* The MIT License
*
* Copyright © 2017 AVSP Ltd
* Copyright © 2017 - 2019 AVSP Ltd
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -50,13 +50,11 @@ private static int Run(SimpleArguments arguments)
return 1;
}

//@"C:\Dropbox\Code\CresNuget\BuildTest\BuildTest.sln"

VsBuilder builder = new VsBuilder();

builder.Run(options);
int result = builder.Run(options);

if (builder.Results.Failed)
if ((result != 0) || builder.Results.Failed)
{
Console.Error.WriteLine("ERROR: some builds failed, check output");
return 1;
Expand Down
2 changes: 1 addition & 1 deletion Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("AVSP Ltd")]
[assembly: AssemblyProduct("VsIdeBuild")]
[assembly: AssemblyCopyright("Copyright © 2017 Chris Poole")]
[assembly: AssemblyCopyright("Copyright © 2017 - 2019 Chris Poole")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
17 changes: 14 additions & 3 deletions VsIdeBuild/VsBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* The MIT License
*
* Copyright © 2017 AVSP Ltd
* Copyright © 2017 - 2019 AVSP Ltd
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -60,6 +60,8 @@ public class VsBuilder
/// <returns></returns>
public int Run(VsBuilderOptions options)
{
int returnValue = 0;

this.options = options;
this.Results = new VsBuilderResults();

Expand Down Expand Up @@ -96,7 +98,11 @@ public int Run(VsBuilderOptions options)
Console.WriteLine(GetProjectContexts());
}

ShowProjectOutputs();
if (options.ShowProjectOutputs)
{
Console.WriteLine("Showing project outputs...");
ShowProjectOutputs();
}

if (options.BuildAll)
{
Expand All @@ -108,6 +114,11 @@ public int Run(VsBuilderOptions options)
{
BuildSolutionConfiguration(options.BuildSolutionConfiguration);
}
else
{
Console.WriteLine("ERROR: neither BuildAll or BuildSolutionConfiguration was specified");
returnValue = 1;
}
}

Console.WriteLine("Closing Solution...");
Expand All @@ -116,7 +127,7 @@ public int Run(VsBuilderOptions options)
Console.WriteLine("Closing Visual Studio...");
CloseVS();

return 0;
return returnValue;
}

private void PostBuildChecks()
Expand Down
7 changes: 6 additions & 1 deletion VsIdeBuild/VsBuilderOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* The MIT License
*
* Copyright © 2017 AVSP Ltd
* Copyright © 2017 - 2019 AVSP Ltd
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -65,6 +65,11 @@ public class VsBuilderOptions
/// </summary>
public bool ShowProjectContexts { get; set; }

/// <summary>
/// Output ProjectOutputs, useful to get configuration information
/// </summary>
public bool ShowProjectOutputs { get; set; }

/// <summary>
/// Filepath of Visual Studio 2008 solution file
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ E-mail: chris@avsp.co.uk

## Copyright

VsIdeBuild is Copyright © 2017 AVSP Ltd
VsIdeBuild is Copyright © 2017 - 2019 AVSP Ltd

## Command line parameters:

Expand Down

0 comments on commit e3621c9

Please sign in to comment.