Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f672526
Worker Extension project incremental build support (#1749)
jviau Aug 16, 2023
fec9995
Merge main to feature/ext-proj (#1832)
jviau Aug 16, 2023
44388e0
Refactor SDK targets to address multiple writes and flaky builds (#1861)
jviau Sep 29, 2023
83fb288
Ensure ExtensionsCsProjDirectory is a full path (#1938)
jviau Oct 3, 2023
8f60c35
Pass RestoreSources to inner-build restore task (#1937)
jviau Oct 3, 2023
52c030e
Merge branch 'main' into jviau/merge-main
jviau Oct 3, 2023
6adb9d9
Rev SDK version to 1.16.0-preview1 (#1941)
jviau Oct 3, 2023
b9c2d6a
Merge branch 'feature/ext-proj' into jviau/merge-main
jviau Oct 4, 2023
7f10311
Merge pull request #1944 from Azure/jviau/merge-main
jviau Oct 4, 2023
a37a998
Skip func targets during design time build (#1954)
jviau Oct 10, 2023
e9c9fe5
Merge branch 'main' into merge-main
jviau Oct 23, 2023
409150b
Correct merge mistakes
jviau Oct 23, 2023
5a4f062
Merge pull request #1983 from jviau/merge-main
jviau Oct 24, 2023
d66f0cb
Merge branch 'main' into merge-main
jviau Nov 9, 2023
3835262
Update sln
jviau Nov 9, 2023
ae2ad67
Fix properties
jviau Nov 9, 2023
d5c017b
Merge branch 'main' into merge-main
jviau Nov 9, 2023
3ee21ed
Merge branch 'main' into merge-main
jviau Dec 4, 2023
7cad664
Merge pull request #2046 from jviau/merge-main
jviau Dec 4, 2023
9109d2d
update worker.config.json generation (#2122)
jviau Dec 5, 2023
363957b
[SDK] Remove properties from inner-build (#2161)
jviau Dec 21, 2023
8322d85
Merge branch 'main' into jviau/merge-main
jviau Jan 17, 2024
be13252
Merge pull request #2219 from Azure/jviau/merge-main
jviau Jan 18, 2024
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: 7 additions & 0 deletions DotNetWorker.sln
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ 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 @@ -344,6 +346,10 @@ 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 @@ -417,6 +423,7 @@ 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: 14 additions & 10 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
{
private const string ExtensionsProjectName = "WorkerExtensions.csproj";
internal const string ExtensionsProjectName = "WorkerExtensions.csproj";

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

RecreateDirectory(_outputPath);
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;
}
}

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

private void RecreateDirectory(string directoryPath)
Expand All @@ -46,13 +57,6 @@ 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
4 changes: 2 additions & 2 deletions sdk/Sdk/Sdk.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<MinorProductVersion>16</MinorProductVersion>
<PatchProductVersion>4</PatchProductVersion>
<MinorProductVersion>17</MinorProductVersion>
<VersionSuffix>-preview1</VersionSuffix>
<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