VContainerAnalyzer 0.6.0
dotnet add package VContainerAnalyzer --version 0.6.0
NuGet\Install-Package VContainerAnalyzer -Version 0.6.0
<PackageReference Include="VContainerAnalyzer" Version="0.6.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="VContainerAnalyzer" Version="0.6.0" />
<PackageReference Include="VContainerAnalyzer"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add VContainerAnalyzer --version 0.6.0
#r "nuget: VContainerAnalyzer, 0.6.0"
#:package VContainerAnalyzer@0.6.0
#addin nuget:?package=VContainerAnalyzer&version=0.6.0
#tool nuget:?package=VContainerAnalyzer&version=0.6.0
VContainerAnalyzer
Roslyn Analyzer for detecting coding errors in Unity projects using VContainer.
This is in a very early stage of development. Please use with caution.
Setup
Unity Package Manager
VContainerAnalyzer can be set up via Unity Package Manager by following the steps below.
- Open the Package Manager in the UnityEditor.
- Select the + button in the upper left corner.
- Select
Add package from git URL
. - Enter
https://github.com/VeyronSakai/VContainerAnalyzer.git?path=VContainerAnalyzer.Unity/Assets/Plugins/VContainerAnalyzer#0.5.8
and SelectAdd
button. - Add
VContainer.Analyzer
to the Assembly Definition References of the asmdef to which you want to apply Analyzer.
.unitypackage
VContainerAnalyzer can be set up by using the .unitypackage available at Releases.
Rules
VContainer0001
Topic | Value |
---|---|
Id | VContainer0001 |
Severity | Error |
Enabled | True |
Category | Usage |
An error occurs if the constructor of a class registered by the Register()
or RegisterEntryPoint()
or UseEntryPoints()
methods in the Lifetime class does not have an Attribute that extends PreserveAttribute
such
as InjectAttribute
.
See the VContainer documentation for more information.
Analysis is not supported for System class inheriting from Unity.Entities.SystemBase. This is because VContainer's ECS support is beta. Also, currently the analysis is performed without considering link.xml.
VContainer0002
Topic | Value |
---|---|
Id | VContainer0002 |
Severity | Warning |
Enabled | True |
Category | Usage |
Warning occurs when using Property/Field Injection.
public class FieldInjectionSandbox
{
[Inject] private IService _field;
}
public class PropertyInjectionSandbox
{
[Inject] private IService Property { get; set; }
}
See the VContainer documentation for more information.
Contribution
Bugs and new feature suggestions are welcome in issues and Pull Requests.
Analyzer based on the Roslyn Analyzer Template.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.6.0 | 111 | 1/7/2025 |
0.5.7 | 180 | 4/30/2024 |
0.5.6 | 141 | 4/22/2024 |
0.5.5 | 135 | 4/22/2024 |
0.5.4 | 116 | 4/19/2024 |
0.5.3 | 123 | 4/19/2024 |
0.5.2 | 130 | 4/19/2024 |
0.5.1 | 126 | 4/18/2024 |
0.5.0 | 118 | 4/18/2024 |
0.4.2 | 145 | 4/17/2024 |
0.4.1 | 159 | 4/14/2024 |
0.4.0 | 132 | 4/14/2024 |
0.3.3 | 151 | 4/10/2024 |
0.3.2 | 153 | 4/10/2024 |
0.3.1 | 156 | 4/10/2024 |
0.2.6 | 149 | 4/9/2024 |
0.2.5 | 156 | 4/9/2024 |
0.2.4 | 166 | 4/9/2024 |
0.2.3 | 194 | 4/9/2024 |
0.2.2 | 200 | 4/9/2024 |
0.2.1 | 158 | 4/9/2024 |
0.2.0 | 176 | 4/9/2024 |
0.1.5 | 197 | 4/8/2024 |
0.1.4 | 204 | 4/8/2024 |
0.1.3 | 156 | 4/8/2024 |
0.1.0 | 199 | 4/7/2024 |