Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExcludeSourcesInSummaryFile property to filter Sources #40

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/MSBuildSummaryFiles.Tasks.UnitTests/BuildTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Microsoft.Build.Utilities.ProjectCreation;
using Shouldly;
using System;
using System.Collections.Generic;
using System.IO;
using Xunit;

Expand Down Expand Up @@ -45,6 +46,24 @@ public void SingleTargetingBuild()
CompareSummaryFiles(nameof(SingleTargetingBuild), buildSummaryFilePath);
}

[Fact]
public void ExcludeAllSources()
{
var globalProperties = new Dictionary<string, string>();
globalProperties.Add("ExcludeSourcesInSummaryFile", "*");

CreateSdkStyleProject("netstandard2.0")
.Save(GetTempProjectFile("ProjectA", "Strings.resx"))
.TryBuild(restore: true, globalProperties: globalProperties, out bool result, out BuildOutput buildOutput)
.TryGetPropertyValue("BuildSummaryFilePath", out string buildSummaryFilePath);

result.ShouldBeTrue(buildOutput.GetConsoleLog());

buildSummaryFilePath.ShouldNotBeNullOrEmpty();

CompareSummaryFiles(nameof(ExcludeAllSources), buildSummaryFilePath);
}

[Fact]
public void NuGetPackageInAllOutputs()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
netstandard2.0:
constants:
- DEBUG
- NETSTANDARD
- NETSTANDARD1_0_OR_GREATER
- NETSTANDARD1_1_OR_GREATER
- NETSTANDARD1_2_OR_GREATER
- NETSTANDARD1_3_OR_GREATER
- NETSTANDARD1_4_OR_GREATER
- NETSTANDARD1_5_OR_GREATER
- NETSTANDARD1_6_OR_GREATER
- NETSTANDARD2_0
- NETSTANDARD2_0_OR_GREATER
- TRACE
outputs:
- ProjectA.deps.json
- ProjectA.dll
- ProjectA.pdb
references:
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/Microsoft.Win32.Primitives.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/mscorlib.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/netstandard.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.AppContext.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Collections.Concurrent.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Collections.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Collections.NonGeneric.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Collections.Specialized.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.ComponentModel.Composition.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.ComponentModel.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.ComponentModel.EventBasedAsync.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.ComponentModel.Primitives.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.ComponentModel.TypeConverter.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Console.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Core.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Data.Common.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Data.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Diagnostics.Contracts.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Diagnostics.Debug.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Diagnostics.FileVersionInfo.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Diagnostics.Process.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Diagnostics.StackTrace.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Diagnostics.TextWriterTraceListener.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Diagnostics.Tools.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Diagnostics.TraceSource.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Diagnostics.Tracing.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Drawing.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Drawing.Primitives.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Dynamic.Runtime.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Globalization.Calendars.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Globalization.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Globalization.Extensions.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.IO.Compression.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.IO.Compression.FileSystem.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.IO.Compression.ZipFile.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.IO.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.IO.FileSystem.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.IO.FileSystem.DriveInfo.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.IO.FileSystem.Primitives.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.IO.FileSystem.Watcher.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.IO.IsolatedStorage.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.IO.MemoryMappedFiles.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.IO.Pipes.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.IO.UnmanagedMemoryStream.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Linq.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Linq.Expressions.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Linq.Parallel.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Linq.Queryable.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Net.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Net.Http.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Net.NameResolution.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Net.NetworkInformation.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Net.Ping.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Net.Primitives.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Net.Requests.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Net.Security.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Net.Sockets.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Net.WebHeaderCollection.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Net.WebSockets.Client.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Net.WebSockets.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Numerics.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.ObjectModel.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Reflection.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Reflection.Extensions.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Reflection.Primitives.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Resources.Reader.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Resources.ResourceManager.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Resources.Writer.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Runtime.CompilerServices.VisualC.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Runtime.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Runtime.Extensions.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Runtime.Handles.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Runtime.InteropServices.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Runtime.InteropServices.RuntimeInformation.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Runtime.Numerics.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Runtime.Serialization.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Runtime.Serialization.Formatters.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Runtime.Serialization.Json.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Runtime.Serialization.Primitives.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Runtime.Serialization.Xml.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Security.Claims.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Security.Cryptography.Algorithms.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Security.Cryptography.Csp.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Security.Cryptography.Encoding.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Security.Cryptography.Primitives.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Security.Cryptography.X509Certificates.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Security.Principal.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Security.SecureString.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.ServiceModel.Web.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Text.Encoding.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Text.Encoding.Extensions.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Text.RegularExpressions.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Threading.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Threading.Overlapped.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Threading.Tasks.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Threading.Tasks.Parallel.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Threading.Thread.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Threading.ThreadPool.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Threading.Timer.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Transactions.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.ValueTuple.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Web.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Windows.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Xml.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Xml.Linq.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Xml.ReaderWriter.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Xml.Serialization.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Xml.XDocument.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Xml.XmlDocument.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Xml.XmlSerializer.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Xml.XPath.dll
- (NuGetPackageRoot)/netstandard.library/2.0.3/build/netstandard2.0/ref/System.Xml.XPath.XDocument.dll
Loading
Loading