Quick Start
NuGet Packages
The Bulletcode.NET NuGet packages are hosted in a private repository at nuget.bulletcode.com. To use it, create a file called nuget.config
at the solution root and add the following package source:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.bulletcode.com" value="https://nuget.bulletcode.com/api/v2/" />
</packageSources>
</configuration>
Visual Studio will prompt for credentials when accessing the repository, and will store them in the Windows Credentials Manager.
The framework consists of the following packages:
- Bulletcode.Common — contains code which is common for web and desktop applications, including internationalization, validation, dependency injection, logging, etc.
- Bulletcode.Desktop — contains platform-independent code for desktop applications, including the API client, services and view models, and the platform-independent part of the desktop application builder and shell
- Bulletcode.Desktop.Wpf — contains code for desktop applications using WPF, including custom controls, converters, behaviors, and the plaftorm-dependent part of the application builder and shell
- Bulletcode.Web.Core — contains back-end code for web applications, including authentication and authorization, models and services for user management and event logging, error handling, etc.
- Bulletcode.Web.Front — contains front-end code for web applications, including asset management, custom tag helpers and view components, styles and scripts, etc.
The Bulletcode.Web.Core and Bulletcode.Web.Front packages can be used independently, i.e. a web application without a UI can use only the core package, and the front package can be added to an application which doesn’t use the core package. However, to fully leverage some features, such as grid views, it’s best to use both packages together. The Bulletcode.Common library provides some interfaces which are shared between both packages.
One of the goals of Bulletcode.NET is to minimize external dependencies. The Bulletcode libraries depend on standard .NET Core libraries, ASP.NET Core MVC (in Bulletcode.Web.Core and Bulletcode.Web.Front), WPF and XAML Behaviors (in Bulletcode.Desktop.Wpf), Entity Framework Core and Azure SDK (in Bulletcode.Web.Core).
The only third-party dependencies are NGettext (in Bulletcode.Common) for reading .mo
translation files and MailKitLite (in Bulletcode.Web.Core) for sending emails.
NPM Packages
Bulletcode.NET uses Node.js as a tool for scripting and automating development. The following open-source NPM packages created by both Bulletcode and third parties are used for developing applications using the Bulletcode.NET framework:
- vite and sass — for processing JavaScript and CSS assets
- bc-css-framework — for creating stylesheets for responsive and accessible web applications
- leaner — a thin, reactive wrapper for DOM, used for creating interactive client-side components
- bc-tools-dotnet — a collection of command line tools and Vite plugins
- bc-font-utils and lucide-static — for creating icon web fonts from SVG images
More information about these packages and tools can be found in the Internationalization and Assets chapters.
Development
The Bulletcode.NET framework is often developed alongside with applications using it, and it’s often useful to be able to test and debug these applications using a development version of the framework, without having to publish it to the NuGet repository.
The bc-switch
command, which is part of the bc-tools-dotnet NPM package, can be used to switch references to framework libraries between the officially released NuGet packages and the local development version.
To use the command, create a switch.config.js
file with the following contents:
export default {
prefix: 'Bulletcode',
targetPath: '../bc-dotnet',
};
The targetPath
is the relative path of the directory containing the framework, so it’s assumed that both the application and the framework are checked out in the same parent directory.
The bc-switch
command can be added to the scripts
section of the package.json
file, so that the solution can be switched to the development or production version of the framework using the following simple commands:
npm run switch:projects
npm run switch:packages