NINA is the executable WPF application. It owns application startup, dependency composition, the main window shell, and the app-specific view models and views that sit on top of the reusable libraries.
Build shape from NINA.csproj:
- Target framework:
net10.0-windows - Output type:
WinExe - Runtime:
win-x64, self-contained - WPF enabled
The startup path is code-driven and easy to trace:
App.xaml.csLoads command-line options, initializes user settings, loads the active profile from theProfileServiceapplication resource, configures logging/notifications, optionally shows profile selection, creates the composed main view model, showsMainWindow, and starts theEarthRotationParameterUpdater.CompositionRoot.csCreates the dependency graph throughIoCBindings, eagerly resolves major view models/controllers, initializes the Canon EDSDK wrapper, and buildsMainWindowVM.Utility/IoCBindings.csRegisters the concrete service graph usingMicrosoft.Extensions.DependencyInjection. This is the central place where mediators, factories, view models, plugin loader, and cross-project services are wired together.MainWindow.xaml(.cs)Hosts the shell window and persists window placement across sessions.
In practice, NINA is the composition root for the whole application even though most implementation detail lives in referenced projects.
ViewModel/Contains app-specific orchestration view models such asApplicationVM,DockManagerVM,ImagingVM,OptionsVM,SkyAtlasVM,VersionCheckVM,Plugins/PluginsVM,Sequencer/SequenceNavigationVM,FramingAssistant/FramingAssistantVM,FlatWizard/FlatWizardVM, andImageHistory/ImageHistoryVM.View/Contains the WPF views for the shell and feature areas. The folder is large because most end-user UI is declared here in XAML.Resources/Ships application-level resource dictionaries, styles, icons, and images.Database/ShipsInitial/*.sqlandMigration/*.sql.NINA.Core.Database.NINADbContextexpects these files to exist under the application base directory at runtime.Sequencer/Examples/Ships built-in sequence template JSON files.External/andUtility/Ship native DLLs and helper executables such asexiftool.exethat other projects call at runtime.
NINA depends on almost every library project in the solution:
- Domain and utilities:
NINA.Core,NINA.Astrometry,NINA.Profile - Imaging and equipment:
NINA.Image,NINA.Equipment,NINA.MGEN,NINA.PlateSolving - UI support:
NINA.WPF.Base,NINA.CustomControlLibrary - Extensibility and sequencing:
NINA.Plugin,NINA.Sequencer
This project should not become the home for reusable abstractions. If a type is not shell-specific, the existing codebase usually places it in one of the library projects above.
Two app-level coordinators are worth knowing before changing UI composition:
ViewModel/DockManagerVM.csBuilds the dockable panel list, then waits forIPluginLoader.Load()and appends plugin-providedIDockableVMinstances.ViewModel/Sequencer/SequenceNavigationVM.csWaits forIPluginLoader.Load(), builds aSequencerFactoryfrom plugin/core sequence entities, then creates both the simple and advanced sequencer view models.
This means plugin loading affects both the docking layout and the sequencer palette.
NINA.csproj is also the place where the application decides which non-code artifacts are copied into the build output:
- database initialization/migration scripts
- native camera/device DLLs under
External/x64 - localization and documentation assets
- sequencer example templates
- helper executables in
Utility
If a new feature depends on a runtime file, the code change is usually not enough; the file also has to be added to NINA.csproj, and packaging may need updates in NINA.Setup.
- Register new services in
Utility/IoCBindings.cs; keep constructor wiring out of arbitrary call sites. - Put app shell orchestration here, but move reusable logic down into the library projects when possible.
- If a new feature adds a dockable panel, sequence surface, or plugin-visible service, check both the DI registrations and the consumers in
DockManagerVMorSequenceNavigationVM. - If a change needs files at runtime, update both
NINA.csprojand, when installer output matters, the WiX projects.