Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET 8 + 9 support #42

Merged
merged 4 commits into from
Jan 4, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/publish_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 9.0.x

- name: Setup NuGet
uses: NuGet/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 9.0.x

- name: Setup NuGet
uses: NuGet/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand Down
21 changes: 17 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,27 @@
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"name": ".NET Core Launch (net9)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/Tools.Net.Mongo/bin/Debug/net7.0/Tools.Net.Mongo.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Tools.Net.Mongo",
"program": "${workspaceFolder}/src/Tools.Net.Mongo/bin/Debug/net9.0/Tools.Net.Mongo.dll",
"args": ["migrate", "up", "-i", "mongodb://localhost:27017/demoDb"],
"cwd": "${workspaceFolder}/tests/Demo.App",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Launch (net8)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/Tools.Net.Mongo/bin/Debug/net8.0/Tools.Net.Mongo.dll",
"args": ["migrate", "up", "-i", "mongodb://localhost:27017/demoDb"],
"cwd": "${workspaceFolder}/tests/Demo.App",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Nicholas A DiChiaro
Copyright (c) 2025 Nicholas A DiChiaro

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

A Global Tool for the dotnet CLI to manage MongoDB databases in .NET.

[![Build Status](https://dev.azure.com/councildevelopment/Dot%20Net%20Mongo/_apis/build/status/ndichiaro.dotnet-mongo?branchName=main)](https://dev.azure.com/councildevelopment/Dot%20Net%20Mongo/_build/latest?definitionId=5&branchName=main) [![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/Tools.Net.Mongo)](https://www.nuget.org/packages/Tools.Net.Mongo)
[![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/Tools.Net.Mongo)](https://www.nuget.org/packages/Tools.Net.Mongo)

## Installation

Expand Down
18 changes: 15 additions & 3 deletions Tools.Net.Mongo.sln
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tools.Net.Mongo.Migrate.Test", "tests\Tools.Net.Mongo.Migrate.Test\Tools.Net.Mongo.Migrate.Test.csproj", "{5CCA4AD1-1FBA-4AEB-8BEC-57AE1DEB5293}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{EFAB0401-4CB4-465A-BF56-ABE20C41B23F}"
ProjectSection(SolutionItems) = preProject
azure-pipelines.yml = azure-pipelines.yml
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.App", "tests\Demo.App\Demo.App.csproj", "{FBE63628-47F2-4982-97A3-5DB2821C33EE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -120,6 +119,18 @@ Global
{5CCA4AD1-1FBA-4AEB-8BEC-57AE1DEB5293}.Release|x64.Build.0 = Release|Any CPU
{5CCA4AD1-1FBA-4AEB-8BEC-57AE1DEB5293}.Release|x86.ActiveCfg = Release|Any CPU
{5CCA4AD1-1FBA-4AEB-8BEC-57AE1DEB5293}.Release|x86.Build.0 = Release|Any CPU
{FBE63628-47F2-4982-97A3-5DB2821C33EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FBE63628-47F2-4982-97A3-5DB2821C33EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FBE63628-47F2-4982-97A3-5DB2821C33EE}.Debug|x64.ActiveCfg = Debug|Any CPU
{FBE63628-47F2-4982-97A3-5DB2821C33EE}.Debug|x64.Build.0 = Debug|Any CPU
{FBE63628-47F2-4982-97A3-5DB2821C33EE}.Debug|x86.ActiveCfg = Debug|Any CPU
{FBE63628-47F2-4982-97A3-5DB2821C33EE}.Debug|x86.Build.0 = Debug|Any CPU
{FBE63628-47F2-4982-97A3-5DB2821C33EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FBE63628-47F2-4982-97A3-5DB2821C33EE}.Release|Any CPU.Build.0 = Release|Any CPU
{FBE63628-47F2-4982-97A3-5DB2821C33EE}.Release|x64.ActiveCfg = Release|Any CPU
{FBE63628-47F2-4982-97A3-5DB2821C33EE}.Release|x64.Build.0 = Release|Any CPU
{FBE63628-47F2-4982-97A3-5DB2821C33EE}.Release|x86.ActiveCfg = Release|Any CPU
{FBE63628-47F2-4982-97A3-5DB2821C33EE}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -132,6 +143,7 @@ Global
{0607F346-C85F-43A3-A6F1-FD8E56063301} = {406327C4-8D8D-450D-8ECC-95FDDA4C8BB5}
{7665F48D-A7D4-4FB8-B689-2F0034E2D48A} = {406327C4-8D8D-450D-8ECC-95FDDA4C8BB5}
{5CCA4AD1-1FBA-4AEB-8BEC-57AE1DEB5293} = {406327C4-8D8D-450D-8ECC-95FDDA4C8BB5}
{FBE63628-47F2-4982-97A3-5DB2821C33EE} = {406327C4-8D8D-450D-8ECC-95FDDA4C8BB5}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FA94093C-46B8-4BAA-BF4B-61B8939037AF}
Expand Down
73 changes: 0 additions & 73 deletions azure-pipelines.yml

This file was deleted.

2 changes: 1 addition & 1 deletion src/Tools.Net.Cli.Driver/Tools.Net.Cli.Driver.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Tools.Net.Mongo.Core/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Nicholas A DiChiaro
Copyright (c) 2025 Nicholas A DiChiaro

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion src/Tools.Net.Mongo.Core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

A core library for managing MongoDB databases from a .NET application

[![Build Status](https://dev.azure.com/councildevelopment/Dot%20Net%20Mongo/_apis/build/status/ndichiaro.dotnet-mongo?branchName=main)](https://dev.azure.com/councildevelopment/Dot%20Net%20Mongo/_build/latest?definitionId=5&branchName=main) [![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/Tools.Net.Mongo.Core)](https://www.nuget.org/packages/Tools.Net.Mongo.Core)
[![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/Tools.Net.Mongo.Core)](https://www.nuget.org/packages/Tools.Net.Mongo.Core)

## Getting Started

Expand Down
6 changes: 3 additions & 3 deletions src/Tools.Net.Mongo.Core/Tools.Net.Mongo.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<Version>3.3.0</Version>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<Version>3.4.0</Version>
<PackageOutputPath>./nupkg</PackageOutputPath>

<Description>A core library for managing MongoDB databases from a .NET application.</Description>
<Title>.NET Mongo Core Library</Title>
<AssemblyName>Tools.Net.Mongo.Core</AssemblyName>
<Authors>Nick DiChiaro</Authors>
<Copyright>2023</Copyright>
<Copyright>2025</Copyright>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/ndichiaro/dotnet-mongo</PackageProjectUrl>
<RepositoryUrl>https://github.com/ndichiaro/dotnet-mongo</RepositoryUrl>
Expand Down
6 changes: 3 additions & 3 deletions src/Tools.Net.Mongo.Migrate/Tools.Net.Mongo.Migrate.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis" Version="3.2.1" />
<PackageReference Include="System.CodeDom" Version="4.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis" Version="4.12.0" />
<PackageReference Include="System.CodeDom" Version="9.0.0" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="Tools.Net.Mongo.Core" Version="3.3.0" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Tools.Net.Mongo/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Nicholas A DiChiaro
Copyright (c) 2025 Nicholas A DiChiaro

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions src/Tools.Net.Mongo/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"profiles": {
"Tools.Net.Mongo": {
"commandName": "Project",
"commandLineArgs": "migrate down -i mongodb://localhost:27017/twdDb",
"workingDirectory": "../Tools.Net.Mongo.Migrate"
"commandLineArgs": "migrate up -i mongodb://localhost:27017/twdDb",
"workingDirectory": "../tests/Demo.App"
}
}
}
6 changes: 3 additions & 3 deletions src/Tools.Net.Mongo/Tools.Net.Mongo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<Version>1.6.1</Version>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<Version>1.7.0</Version>
<PackAsTool>true</PackAsTool>
<ToolCommandName>dotnet-mongo</ToolCommandName>
<PackageOutputPath>./nupkg</PackageOutputPath>
Expand All @@ -12,7 +12,7 @@
<Title>.NET Mongo Tool</Title>
<AssemblyName>Tools.Net.Mongo</AssemblyName>
<Authors>Nick DiChiaro</Authors>
<Copyright>2023</Copyright>
<Copyright>2025</Copyright>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/ndichiaro/dotnet-mongo</PackageProjectUrl>
<RepositoryUrl>https://github.com/ndichiaro/dotnet-mongo</RepositoryUrl>
Expand Down
13 changes: 13 additions & 0 deletions tests/Demo.App/Demo.App.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Tools.Net.Mongo.Core" Version="3.3.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -21,9 +21,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions tests/Tools.Net.Mongo.Core.Test/Tools.Net.Mongo.Core.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="NSubstitute" Version="4.2.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="NSubstitute" Version="5.3.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading