VContainerAnalyzer 0.3.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package VContainerAnalyzer --version 0.3.2
                    
NuGet\Install-Package VContainerAnalyzer -Version 0.3.2
                    
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="VContainerAnalyzer" Version="0.3.2">
  <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="VContainerAnalyzer" Version="0.3.2" />
                    
Directory.Packages.props
<PackageReference Include="VContainerAnalyzer">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
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 VContainerAnalyzer --version 0.3.2
                    
#r "nuget: VContainerAnalyzer, 0.3.2"
                    
#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 VContainerAnalyzer@0.3.2
                    
#: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=VContainerAnalyzer&version=0.3.2
                    
Install as a Cake Addin
#tool nuget:?package=VContainerAnalyzer&version=0.3.2
                    
Install as a Cake Tool

VContainerAnalyzer

Test NuGet

Roslyn Analyzer for detecting coding errors in Unity projects using VContainer.

This is in a very early stage of development. Please use with caution.

Also note that ECS is not yet supported.

Setup

Unity Package Manager

VContainerAnalyzer can be set up via Unity Package Manager by following the steps below.

  1. Open the Package Manager in the UnityEditor.
  2. Select the + button in the upper left corner.
  3. Select Add package from git URL.
  4. Enter https://github.com/VeyronSakai/VContainerAnalyzer.git?path=VContainerAnalyzer.Unity/Assets/Plugins/VContainerAnalyzer and Select Add button.
  5. 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
Code PreserveAttributeAnalyzer

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.

Contribution

Bugs and new feature suggestions are welcome in issues and Pull Requests.

If you have made changes to the Analyzer itself, please run the make all command and commit the differences in the dll files generated and include them in the pull request.


Analyzer based on the Roslyn Analyzer Template.

There are no supported framework assets in this package.

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 167 1/7/2025
0.5.7 215 4/30/2024
0.5.6 180 4/22/2024
0.5.5 176 4/22/2024
0.5.4 152 4/19/2024
0.5.3 163 4/19/2024
0.5.2 172 4/19/2024
0.5.1 155 4/18/2024
0.5.0 156 4/18/2024
0.4.2 185 4/17/2024
0.4.1 198 4/14/2024
0.4.0 172 4/14/2024
0.3.3 180 4/10/2024
0.3.2 192 4/10/2024
0.3.1 200 4/10/2024
0.2.6 191 4/9/2024
0.2.5 197 4/9/2024
0.2.4 207 4/9/2024
0.2.3 236 4/9/2024
0.2.2 244 4/9/2024
Loading failed