AutoCtor 2.9.0
dotnet add package AutoCtor --version 2.9.0
NuGet\Install-Package AutoCtor -Version 2.9.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AutoCtor" Version="2.9.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AutoCtor" Version="2.9.0" />
<PackageReference Include="AutoCtor"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AutoCtor --version 2.9.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AutoCtor, 2.9.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AutoCtor@2.9.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AutoCtor&version=2.9.0
#tool nuget:?package=AutoCtor&version=2.9.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
AutoCtor
AutoCtor is a Roslyn Source Generator that will automatically create a constructor for your class for use with constructor Dependency Injection.
How to Use
- Make the class
partial - Add
[AutoConstruct] - Remove the constructor
+[AutoConstruct]
public partial class AService
{
private readonly IDataContext _dataContext;
private readonly IDataService _dataService;
private readonly IExternalService _externalService;
private readonly ICacheService _cacheService;
private readonly ICacheProvider _cacheProvider;
private readonly IUserService _userService;
- public AService(
- IDataContext dataContext,
- IDataService dataService,
- IExternalService externalService,
- ICacheService cacheService,
- ICacheProvider cacheProvider,
- IUserService userService
- )
- {
- _dataContext = dataContext;
- _dataService = dataService;
- _externalService = externalService;
- _cacheService = cacheService;
- _cacheProvider = cacheProvider;
- _userService = userService;
- }
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on AutoCtor:
| Repository | Stars |
|---|---|
|
LykosAI/StabilityMatrix
Multi-Platform Package Manager for Stable Diffusion
|
|
|
moonheart/mementomori-helper
メメントモリ MementoMori 游戏助手 Game Assistant ゲームアシスタント
|
| Version | Downloads | Last Updated |
|---|---|---|
| 2.9.0 | 84 | 10/31/2025 |
| 2.8.2 | 457 | 10/14/2025 |
| 2.8.1 | 5,369 | 5/26/2025 |
| 2.8.0 | 2,250 | 4/22/2025 |
| 2.7.1 | 1,641 | 4/3/2025 |
| 2.7.0 | 638 | 3/29/2025 |
| 2.6.0 | 1,220 | 3/24/2025 |
| 2.5.2 | 2,626 | 3/2/2025 |
| 2.5.0 | 4,054 | 2/4/2025 |
| 2.4.5 | 5,811 | 11/27/2024 |
| 2.4.4 | 335 | 11/26/2024 |
| 2.4.3 | 16,519 | 9/21/2024 |
| 2.4.2 | 2,771 | 8/10/2024 |
| 2.4.1 | 7,808 | 7/25/2024 |
| 2.4.0 | 6,999 | 5/26/2024 |
| 2.3.0 | 4,948 | 4/15/2024 |
| 2.3.0-alpha.1 | 97 | 4/9/2024 |
| 2.2.0 | 10,962 | 3/13/2024 |
| 2.2.0-alpha.2 | 93 | 3/7/2024 |
| 2.2.0-alpha.1 | 95 | 3/7/2024 |
| 2.1.1 | 4,136 | 2/6/2024 |
| 2.1.0 | 4,021 | 12/29/2023 |
| 2.1.0-rc.1 | 192 | 11/4/2023 |
| 2.0.1-alpha.1 | 105 | 10/4/2023 |
| 2.0.0 | 4,939 | 9/12/2023 |
| 2.0.0-alpha.4 | 1,586 | 9/4/2023 |
| 2.0.0-alpha.3 | 129 | 9/4/2023 |
| 2.0.0-alpha.1 | 226 | 9/1/2023 |
| 1.3.0-initialize-1 | 196 | 8/15/2023 |
| 1.2.0 | 2,099 | 8/4/2023 |
| 1.1.1 | 3,907 | 5/28/2023 |
| 1.1.0 | 247 | 5/27/2023 |
| 1.0.0 | 7,873 | 3/29/2023 |
| 0.9.0 | 327 | 3/15/2023 |
| 0.8.0 | 1,358 | 1/18/2023 |
| 0.7.1 | 430 | 12/26/2022 |
| 0.7.0 | 386 | 12/26/2022 |
| 0.6.1 | 1,282 | 11/21/2022 |
| 0.6.0 | 415 | 11/19/2022 |
| 0.5.0 | 1,348 | 10/6/2022 |
| 0.4.0 | 1,906 | 7/22/2022 |
| 0.3.0 | 574 | 7/12/2022 |
| 0.2.2 | 542 | 7/12/2022 |
| 0.2.1 | 542 | 7/11/2022 |
| 0.2.0 | 528 | 7/11/2022 |
| 0.1.2 | 539 | 7/9/2022 |
| 0.1.1 | 524 | 7/9/2022 |
| 0.1.0 | 688 | 7/9/2022 |