Skip to content

Commit

Permalink
update to 8.0.300 SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
brettfo committed May 23, 2024
1 parent 13bf811 commit dc5a2f6
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 5 deletions.
2 changes: 1 addition & 1 deletion nuget/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/*

# Install .NET SDK
ARG DOTNET_SDK_VERSION=8.0.202
ARG DOTNET_SDK_VERSION=8.0.300
ARG DOTNET_SDK_INSTALL_URL=https://dot.net/v1/dotnet-install.sh
ENV DOTNET_INSTALL_DIR=/usr/local/dotnet/current
ENV DOTNET_NOLOGO=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public async Task WithDirectoryPackagesProps()
</ItemGroup>
</Project>
"""),
("Directory.Build.props", "<Project />"),
("Directory.Packages.props", """
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
Expand All @@ -108,6 +109,7 @@ public async Task WithDirectoryPackagesProps()
expectedResult: new()
{
FilePath = "",
ExpectedProjectCount = 2,
Projects = [
new()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public async Task TestProps()
</ItemGroup>
</Project>
"""),
("Directory.Build.props", "<Project />"),
("Directory.Packages.props", """
<Project>
<PropertyGroup>
Expand All @@ -153,6 +154,7 @@ public async Task TestProps()
expectedResult: new()
{
FilePath = "",
ExpectedProjectCount = 2,
Projects = [
new()
{
Expand Down Expand Up @@ -205,6 +207,7 @@ public async Task TestRepo()
</ItemGroup>
</Project>
"""),
("Directory.Build.props", "<Project />"),
("Directory.Packages.props", """
<Project>
<PropertyGroup>
Expand Down Expand Up @@ -276,6 +279,7 @@ public async Task TestRepo()
expectedResult: new()
{
FilePath = "",
ExpectedProjectCount = 2,
Projects = [
new()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,14 @@ public static async Task<TemporaryDirectory> CreateWithContentsAsync(params Test
var parentDirectory = Path.GetDirectoryName(temporaryDirectory.DirectoryPath)!;

// prevent directory crawling
await File.WriteAllTextAsync(Path.Combine(parentDirectory, "Directory.Build.props"), "<Project />");
await File.WriteAllTextAsync(Path.Combine(parentDirectory, "Directory.Build.props"), """
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
</PropertyGroup>
</Project>
""");
await File.WriteAllTextAsync(Path.Combine(parentDirectory, "Directory.Build.targets"), "<Project />");
await File.WriteAllTextAsync(Path.Combine(parentDirectory, "Directory.Packages.props"), "<Project />");

foreach (var (path, contents) in fileContents)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ public async Task UpdateVersionAttribute_InDirectoryPackages_ForPackageVersion()
""",
additionalFiles:
[
("Directory.Build.props", "<Project />"),
("Directory.Packages.props", """
<Project>
<PropertyGroup>
Expand Down Expand Up @@ -739,6 +740,7 @@ public async Task UpdateExactMatchVersionAttribute_InDirectoryPackages_ForPackag
""",
additionalFiles:
[
("Directory.Build.props", "<Project />"),
("Directory.Packages.props", """
<Project>
<PropertyGroup>
Expand Down Expand Up @@ -1036,6 +1038,7 @@ public async Task UpdatePropertyValue_InDirectoryProps_ForPackageVersion()
""",
additionalFiles:
[
("Directory.Build.props", "<Project />"),
("Directory.Packages.props", """
<Project>
<PropertyGroup>
Expand Down Expand Up @@ -1103,6 +1106,7 @@ public async Task UpdateExactMatchPropertyValue_InDirectoryProps_ForPackageVersi
""",
additionalFiles:
[
("Directory.Build.props", "<Project />"),
("Directory.Packages.props", """
<Project>
<PropertyGroup>
Expand Down Expand Up @@ -1170,6 +1174,7 @@ public async Task UpdateVersionOverrideAttributeAndPropertyValue_InProjectFileAn
""",
additionalFiles:
[
("Directory.Build.props", "<Project />"),
("Directory.Packages.props", """
<Project>
<PropertyGroup>
Expand Down Expand Up @@ -1233,6 +1238,7 @@ public async Task UpdateVersionAttribute_InDirectoryProps_ForGlobalPackageRefere
""",
additionalFiles:
[
("Directory.Build.props", "<Project />"),
("Directory.Packages.props", """
<Project>
<PropertyGroup>
Expand Down Expand Up @@ -1290,6 +1296,7 @@ public async Task UpdatePropertyValue_InDirectoryProps_ForGlobalPackageReference
""",
additionalFiles:
[
("Directory.Build.props", "<Project />"),
("Directory.Packages.props", """
<Project>
<PropertyGroup>
Expand Down Expand Up @@ -1473,6 +1480,7 @@ public async Task UpdatePropertyValue_InProps_ForPackageVersion()
""",
additionalFiles:
[
("Directory.Build.props", "<Project />"),
// initial props files
("Directory.Packages.props", """
<Project>
Expand Down Expand Up @@ -1556,6 +1564,7 @@ public async Task UpdatePropertyValue_InProps_ThenSubstituted_ForPackageVersion(
""",
additionalFiles:
[
("Directory.Build.props", "<Project />"),
// initial props files
("Directory.Packages.props", """
<Project>
Expand Down Expand Up @@ -1641,6 +1650,7 @@ public async Task UpdatePropertyValues_InProps_ThenRedefinedAndSubstituted_ForPa
""",
additionalFiles:
[
("Directory.Build.props", "<Project />"),
// initial props files
("Directory.Packages.props", """
<Project>
Expand Down Expand Up @@ -1900,6 +1910,7 @@ public async Task NoUpdateForPeerDependenciesWhichAreHigherVersion()
""",
additionalFiles:
[
("Directory.Build.props", "<Project />"),
("Directory.Packages.props", """
<Project>
<PropertyGroup>
Expand Down Expand Up @@ -2174,6 +2185,7 @@ public async Task AddTransitiveDependencyByAddingPackageReferenceAndVersion()
""",
additionalFiles:
[
("Directory.Build.props", "<Project />"),
// initial props files
("Directory.Packages.props", """
<Project>
Expand Down Expand Up @@ -2246,6 +2258,7 @@ public async Task PinTransitiveDependencyByAddingPackageVersion()
""",
additionalFiles:
[
("Directory.Build.props", "<Project />"),
// initial props files
("Directory.Packages.props", """
<Project>
Expand Down Expand Up @@ -2481,6 +2494,7 @@ public async Task DirectoryPackagesPropsDoesCentralPackagePinningGetsUpdatedIfTr
""",
additionalFiles:
[
("Directory.Build.props", "<Project />"),
("Directory.Packages.props", """
<Project>
<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,12 +542,12 @@ private static ProjectRootElement CreateProjectRootElement(ProjectBuildFile buil
<PropertyGroup>
<!-- For Windows-specific apps -->
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
</PropertyGroup>
</Project>
""");

await File.WriteAllTextAsync(Path.Combine(tempDir.FullName, "Directory.Build.targets"), "<Project />");
await File.WriteAllTextAsync(Path.Combine(tempDir.FullName, "Directory.Packages.props"), "<Project />");

return tempProjectPath;
}
Expand Down
2 changes: 1 addition & 1 deletion nuget/helpers/lib/NuGetUpdater/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.202",
"version": "8.0.300",
"rollForward": "latestMinor"
}
}

0 comments on commit dc5a2f6

Please sign in to comment.