$(BUILD_ARTIFACTSTAGINGDIRECTORY)\dotnet-sdk-2.1.4-win-x64.zip
$(BUILD_ARTIFACTSTAGINGDIRECTORY)\dotnet-sdk-2.1.4-win-x64.latest
.\src\Microsoft.ApplicationInsights.AspNetCore\Microsoft.ApplicationInsights.AspNetCore.csproj
f.ItemSpec))
{
using (ZipArchive archive = ZipFile.OpenRead(inputFilePath))
{
string inputFileName = Path.GetFileName(inputFilePath);
if (true == ArchiveFileNameAsRootFolder && true == Overwrite)
{
DirectoryInfo archiveDirectory = new DirectoryInfo(Path.Combine(OutputPath, inputFileName));
if (true == archiveDirectory.Exists)
{
Log.LogMessage ("Archive root folder already exists, deleting path:{0}", archiveDirectory.FullName);
archiveDirectory.Delete(recursive: true);
}
}
foreach (ZipArchiveEntry entry in archive.Entries)
{
string path = ArchiveFileNameAsRootFolder
? Path.Combine(OutputPath, inputFileName, entry.FullName)
: Path.Combine(OutputPath, entry.FullName);
FileInfo fileInfo = new FileInfo(path);
DirectoryInfo directoryInfo = new DirectoryInfo(fileInfo.DirectoryName);
if (false == directoryInfo.Exists)
{
//Log.LogMessage ("Creating directory for archive entry, path:{0}", directoryInfo.FullName);
directoryInfo.Create();
}
//Log.LogMessage("Extracting entry to path:{0}", path);
entry.ExtractToFile(path, Overwrite);
}
}
}
]]>
f.ItemSpec))
{
Log.LogMessage("Fixing {0}", inputFilePath);
string filePath = inputFilePath;
if (filePath.EndsWith(".dll", StringComparison.OrdinalIgnoreCase))
{
filePath = filePath.Substring(0, filePath.Length - 3) + "xml";
}
if (filePath.EndsWith(".xml", StringComparison.OrdinalIgnoreCase))
{
string[] files = null;
int starIndex = filePath.IndexOf('*');
if (starIndex >= 0)
{
string dir = filePath.Substring(0, starIndex);
if (string.IsNullOrEmpty(dir))
{
dir = ".";
}
string file = Path.GetFileName(filePath.Substring(starIndex));
files = Directory.GetFiles(dir, file, SearchOption.AllDirectories);
}
else
{
files = new[] { filePath };
}
foreach (string fileName in files)
{
if (File.Exists(fileName))
{
Log.LogMessage("Processing XML: {0}", fileName);
string text = File.ReadAllText(fileName);
text = text.Replace("", "");
File.WriteAllText(fileName, text);
}
}
}
}
]]>
Microsoft
MsSharedLib72