Skip to content

Commit f5db1af

Browse files
authored
Merge pull request #1857 from nguerrera/fast-package-resolve
Speed up package asset resolution
2 parents b0433de + 430e180 commit f5db1af

File tree

51 files changed

+1006
-1052
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1006
-1052
lines changed

sdk.sln

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{09AD2F
5959
EndProject
6060
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Resources", "Resources", "{7D6CD7B6-0237-40DD-9911-44FF22292131}"
6161
ProjectSection(SolutionItems) = preProject
62-
src\Tasks\Common\Resources\Strings.Designer.cs = src\Tasks\Common\Resources\Strings.Designer.cs
6362
src\Tasks\Common\Resources\Strings.resx = src\Tasks\Common\Resources\Strings.resx
6463
EndProjectSection
6564
EndProject

src/Assets/Directory.Build.props

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!--
2+
Sometimes it is useful to play around with the test assets
3+
directly where you're authoring them, and they should never
4+
get the build customization from the rest of the repo.
5+
-->
6+
<Project />

src/Assets/Directory.Build.targets

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!--
2+
Sometimes it is useful to play around with the test assets
3+
directly where you're authoring them, and they should never
4+
get the build customization from the rest of the repo.
5+
-->
6+
<Project />
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Learn more about F# at http://fsharp.org
2+
3+
open System
4+
5+
[<EntryPoint>]
6+
let main argv =
7+
TestLibrary.Say.hello "F#"
8+
0 // return an integer exit code
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>netcoreapp2.0</TargetFramework>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<Compile Include="Program.fs" />
10+
</ItemGroup>
11+
12+
<ItemGroup>
13+
<ProjectReference Include="..\TestLibrary\TestLibrary.fsproj" />
14+
</ItemGroup>
15+
16+
</Project>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
namespace TestLibrary
2+
3+
module Say =
4+
let public hello name =
5+
printfn "Hello %s" name
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp2.0</TargetFramework>
5+
</PropertyGroup>
6+
7+
<ItemGroup>
8+
<Compile Include="Library.fs" />
9+
</ItemGroup>
10+
11+
</Project>

src/Assets/TestProjects/AppWithLibraryVB/TestLibrary/TestLibrary.vbproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
<Version>42.43.44.45-alpha</Version>
44
<OutputType>Library</OutputType>
55
<TargetFramework>netstandard1.5</TargetFramework>
6+
<RootNamespace />
67
</PropertyGroup>
78
</Project>

src/Tasks/Common/DiagnosticsHelper.cs

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -23,43 +23,6 @@ public DiagnosticsHelper(ILog log)
2323

2424
public ITaskItem[] GetDiagnosticMessages() => _diagnosticMessages.ToArray();
2525

26-
public ITaskItem Add(string diagnosticCode, string message, string filePath, DiagnosticMessageSeverity severity)
27-
=> Add(diagnosticCode, message, filePath, severity, startLine: 1, startColumn: 0);
28-
29-
public ITaskItem Add(string diagnosticCode, string message, string filePath, DiagnosticMessageSeverity severity, int startLine, int startColumn)
30-
=> Add(
31-
diagnosticCode,
32-
message,
33-
filePath,
34-
severity,
35-
startLine,
36-
startColumn,
37-
targetFrameworkMoniker: null,
38-
packageId: null);
39-
40-
public ITaskItem Add(
41-
string diagnosticCode,
42-
string message,
43-
string filePath,
44-
DiagnosticMessageSeverity severity,
45-
int startLine,
46-
int startColumn,
47-
string targetFrameworkMoniker,
48-
string packageId,
49-
bool logToMSBuild = true)
50-
=> Add(
51-
diagnosticCode,
52-
message,
53-
filePath,
54-
severity,
55-
startLine,
56-
startColumn,
57-
endLine: startLine,
58-
endColumn: startColumn,
59-
targetFrameworkMoniker: targetFrameworkMoniker,
60-
packageId: packageId,
61-
logToMSBuild: logToMSBuild);
62-
6326
public ITaskItem Add(
6427
string diagnosticCode,
6528
string message,

src/Tasks/Common/ItemUtilities.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public static string GetTargetPath(ITaskItem item)
134134

135135
var fileName = Path.GetFileName(sourcePath);
136136

137-
// Get locale subdirectory for satellite assemblies
137+
// Get subdirectory for satellite assemblies / runtime targets
138138
var destinationSubDirectory = item.GetMetadata("DestinationSubDirectory");
139139

140140
if (!string.IsNullOrWhiteSpace(destinationSubDirectory))

src/Tasks/Common/MetadataKeys.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,28 @@ internal static class MetadataKeys
5353

5454
// Conflict Resolution
5555
public const string OverriddenPackages = "OverriddenPackages";
56+
57+
// Package assets
58+
public const string NuGetIsFrameworkReference = "NuGetIsFrameworkReference";
59+
public const string NuGetPackageId = "NuGetPackageId";
60+
public const string NuGetPackageVersion = "NuGetPackageVersion";
61+
public const string NuGetSourceType = "NuGetSourceType";
62+
63+
// References
64+
public const string ExternallyResolved = "ExternallyResolved";
65+
public const string HintPath = "HintPath";
66+
public const string Private = "Private";
67+
public const string Pack = "Pack";
68+
69+
// Content files
70+
public const string PPOutputPath = "PPOutputPath";
71+
public const string CodeLanguage = "CodeLanguage";
72+
public const string CopyToOutput = "CopyToOutput";
73+
public const string BuildAction = "BuildAction";
74+
public const string OutputPath = "OutputPath";
75+
76+
// Resource assemblies
77+
public const string Culture = "Culture";
78+
public const string DestinationSubDirectory = "DestinationSubDirectory";
5679
}
5780
}

0 commit comments

Comments
 (0)