Skip to content
Merged
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
7 changes: 0 additions & 7 deletions DotNetWorker.sln
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Worker.Extensions.Shared.Te
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Worker.Extensions.Http.AspNetCore.Analyzers", "extensions\Worker.Extensions.Http.AspNetCore.Analyzers\Worker.Extensions.Http.AspNetCore.Analyzers.csproj", "{7B6C2920-7A02-43B2-8DA0-7B76B9FAFC6B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Net7Worker", "samples\Net7Worker\Net7Worker.csproj", "{BE1F79C3-24FA-4BC8-BAB2-C1AD321B13FF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DependentAssemblyWithFunctions.NetStandard", "test\DependentAssemblyWithFunctions.NetStandard\DependentAssemblyWithFunctions.NetStandard.csproj", "{198DA072-F94F-4585-A744-97B3DAC21686}"
EndProject
Global
Expand Down Expand Up @@ -346,10 +344,6 @@ Global
{D8E79B53-9A44-46CC-9D7A-E9494FC8CAF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D8E79B53-9A44-46CC-9D7A-E9494FC8CAF4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D8E79B53-9A44-46CC-9D7A-E9494FC8CAF4}.Release|Any CPU.Build.0 = Release|Any CPU
{BE1F79C3-24FA-4BC8-BAB2-C1AD321B13FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BE1F79C3-24FA-4BC8-BAB2-C1AD321B13FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BE1F79C3-24FA-4BC8-BAB2-C1AD321B13FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BE1F79C3-24FA-4BC8-BAB2-C1AD321B13FF}.Release|Any CPU.Build.0 = Release|Any CPU
{B6342174-5436-4846-B43C-39D8E34AE5CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B6342174-5436-4846-B43C-39D8E34AE5CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6342174-5436-4846-B43C-39D8E34AE5CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -423,7 +417,6 @@ Global
{D8E79B53-9A44-46CC-9D7A-E9494FC8CAF4} = {AA4D318D-101B-49E7-A4EC-B34165AEDB33}
{B6342174-5436-4846-B43C-39D8E34AE5CF} = {FD7243E4-BF18-43F8-8744-BA1D17ACF378}
{7B6C2920-7A02-43B2-8DA0-7B76B9FAFC6B} = {A7B4FF1E-3DF7-4F28-9333-D0961CDDF702}
{BE1F79C3-24FA-4BC8-BAB2-C1AD321B13FF} = {9D6603BD-7EA2-4D11-A69C-0D9E01317FD6}
{198DA072-F94F-4585-A744-97B3DAC21686} = {B5821230-6E0A-4535-88A9-ED31B6F07596}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
Expand Down
24 changes: 10 additions & 14 deletions sdk/Sdk/ExtensionsCsprojGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Microsoft.Azure.Functions.Worker.Sdk
{
internal class ExtensionsCsprojGenerator
{
internal const string ExtensionsProjectName = "WorkerExtensions.csproj";
private const string ExtensionsProjectName = "WorkerExtensions.csproj";

private readonly IDictionary<string, string> _extensions;
private readonly string _outputPath;
Expand All @@ -31,20 +31,9 @@ public void Generate()
{
var extensionsCsprojFilePath = Path.Combine(_outputPath, ExtensionsProjectName);

string csproj = GetCsProjContent();
if (File.Exists(extensionsCsprojFilePath))
{
string existing = File.ReadAllText(extensionsCsprojFilePath);
if (string.Equals(csproj, existing, StringComparison.Ordinal))
{
// If contents are the same, only touch the file to update timestamp.
File.SetLastWriteTimeUtc(extensionsCsprojFilePath, DateTime.UtcNow);
return;
}
}

RecreateDirectory(_outputPath);
File.WriteAllText(extensionsCsprojFilePath, csproj);

WriteExtensionsCsProj(extensionsCsprojFilePath);
}

private void RecreateDirectory(string directoryPath)
Expand All @@ -57,6 +46,13 @@ private void RecreateDirectory(string directoryPath)
Directory.CreateDirectory(directoryPath);
}

private void WriteExtensionsCsProj(string filePath)
{
string csprojContent = GetCsProjContent();

File.WriteAllText(filePath, csprojContent);
}

internal string GetCsProjContent()
{
string extensionReferences = GetExtensionReferences();
Expand Down
2 changes: 1 addition & 1 deletion sdk/Sdk/Sdk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<MinorProductVersion>17</MinorProductVersion>
<PatchProductVersion>1</PatchProductVersion>
<PatchProductVersion>2</PatchProductVersion>
<TargetFrameworks>netstandard2.0;net472</TargetFrameworks>
<PackageId>Microsoft.Azure.Functions.Worker.Sdk</PackageId>
<Description>This package provides development time support for the Azure Functions .NET Worker.</Description>
Expand Down
Loading