Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/NuGet.BuildTasks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportAfter.targets4
-rw-r--r--src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportBefore.props2
-rw-r--r--src/Microsoft.NuGet.Build.Tasks/NuGetPackageObject.cs2
-rw-r--r--src/Microsoft.NuGet.Build.Tasks/ResolveNuGetPackageAssets.cs23
4 files changed, 23 insertions, 8 deletions
diff --git a/src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportAfter.targets b/src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportAfter.targets
index 49fcee2..3d99ea8 100644
--- a/src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportAfter.targets
+++ b/src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportAfter.targets
@@ -11,13 +11,13 @@ Copyright (c) .NET Foundation. All rights reserved.
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
- <NuGetTargets Condition="'$(NuGetTargets)'==''">$(MSBuildExtensionsPath)\Microsoft\NuGet\$(VisualStudioVersion)\Microsoft.NuGet.targets</NuGetTargets>
+ <NuGetTargets Condition="'$(NuGetTargets)'==''">$(MSBuildExtensionsPath)\Microsoft\NuGet\Microsoft.NuGet.targets</NuGetTargets>
</PropertyGroup>
<Import Condition="Exists('$(NuGetTargets)') and '$(SkipImportNuGetBuildTargets)' != 'true'" Project="$(NuGetTargets)" />
<!-- Import NuGet.targets for Restore -->
<PropertyGroup>
- <NuGetRestoreTargets Condition="'$(NuGetRestoreTargets)'==''">$(MSBuildExtensionsPath)\..\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets</NuGetRestoreTargets>
+ <NuGetRestoreTargets Condition="'$(NuGetRestoreTargets)'==''">$(MSBuildExtensionsPath)\NuGet.targets</NuGetRestoreTargets>
</PropertyGroup>
<Import Condition="Exists('$(NuGetRestoreTargets)')" Project="$(NuGetRestoreTargets)" />
</Project>
diff --git a/src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportBefore.props b/src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportBefore.props
index 5a202bd..0dea8c0 100644
--- a/src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportBefore.props
+++ b/src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportBefore.props
@@ -11,7 +11,7 @@ Copyright (c) .NET Foundation. All rights reserved.
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
- <NuGetProps Condition="'$(NuGetProps)'==''">$(MSBuildExtensionsPath)\Microsoft\NuGet\$(VisualStudioVersion)\Microsoft.NuGet.props</NuGetProps>
+ <NuGetProps Condition="'$(NuGetProps)'==''">$(MSBuildExtensionsPath)\Microsoft\NuGet\Microsoft.NuGet.props</NuGetProps>
</PropertyGroup>
<Import Condition="Exists('$(NuGetProps)') and '$(SkipImportNuGetProps)' != 'true'" Project="$(NuGetProps)" />
</Project>
diff --git a/src/Microsoft.NuGet.Build.Tasks/NuGetPackageObject.cs b/src/Microsoft.NuGet.Build.Tasks/NuGetPackageObject.cs
index b4add3c..703a648 100644
--- a/src/Microsoft.NuGet.Build.Tasks/NuGetPackageObject.cs
+++ b/src/Microsoft.NuGet.Build.Tasks/NuGetPackageObject.cs
@@ -48,7 +48,7 @@ namespace Microsoft.NuGet.Build.Tasks
public string GetFullPathToFile(string relativePath)
{
- relativePath = relativePath.Replace('/', '\\');
+ relativePath = relativePath.Replace('/', Path.DirectorySeparatorChar);
return Path.Combine(_fullPackagePath.Value, relativePath);
}
}
diff --git a/src/Microsoft.NuGet.Build.Tasks/ResolveNuGetPackageAssets.cs b/src/Microsoft.NuGet.Build.Tasks/ResolveNuGetPackageAssets.cs
index f4a7f17..beceac3 100644
--- a/src/Microsoft.NuGet.Build.Tasks/ResolveNuGetPackageAssets.cs
+++ b/src/Microsoft.NuGet.Build.Tasks/ResolveNuGetPackageAssets.cs
@@ -471,7 +471,7 @@ namespace Microsoft.NuGet.Build.Tasks
private string GetPath(string packageName, string packageVersion, string packageRelativePath, string file)
{
- return Path.Combine(GetNuGetPackagePath(packageName, packageVersion, packageRelativePath), file.Replace('/', '\\'));
+ return Path.Combine(GetNuGetPackagePath(packageName, packageVersion, packageRelativePath), file.Replace('/', Path.DirectorySeparatorChar));
}
/// <summary>
@@ -808,6 +808,19 @@ namespace Microsoft.NuGet.Build.Tasks
items.Add(pdbItem);
}
+
+ // handle Mono mdb debug symbols
+ var mdbFileName = item.ItemSpec + ".mdb";
+
+ if (_fileExists(mdbFileName))
+ {
+ var mdbItem = new TaskItem(mdbFileName);
+
+ // CopyMetadataTo also includes an OriginalItemSpec that will point to our original item, as we want
+ item.CopyMetadataTo(mdbItem);
+
+ items.Add(mdbItem);
+ }
}
}
@@ -829,7 +842,7 @@ namespace Microsoft.NuGet.Build.Tasks
if (!string.IsNullOrEmpty(destinationSubDirectory))
{
- item.SetMetadata("DestinationSubDirectory", destinationSubDirectory + "\\");
+ item.SetMetadata("DestinationSubDirectory", destinationSubDirectory + Path.DirectorySeparatorChar);
}
}
@@ -891,7 +904,8 @@ namespace Microsoft.NuGet.Build.Tasks
continue;
}
- SplitPackageName(library.Key, out string name, out string version);
+ string name, version;
+ SplitPackageName(library.Key, out name, out version);
allPackageNames.Add(name);
}
@@ -945,7 +959,8 @@ namespace Microsoft.NuGet.Build.Tasks
{
foreach (var package in target)
{
- SplitPackageName(package.Key, out string id, out string version);
+ string id, version;
+ SplitPackageName(package.Key, out id, out version);
var libraryObject = (JObject)lockFile["libraries"][package.Key];