VbaCompiler v2.0.2 updates the OpenMcdf library to v3 and improves the reliability of compiled VBA source code.
- Updated OpenMcdf library to v3.1.0 for improved CFB file format handling.
- Ensures the compiled VBA source code matches the original content.
Install as a .NET tool:
dotnet tool install --global vbamc --version 2.0.2Upgrade from previous version:
dotnet tool update --global vbamcAdd VbaCompiler library to your project:
dotnet add package NetOfficeFw.VbaCompiler --version 2.0.2VbaCompiler v2.0.1 is a hotfix release which ensures Microsoft Office macro files are generated correctly.
- Ensures the generated macro project files are valid.
- Reverted OpenMcdf library update to maintain compatibility (kept at v2.4.1).
Install as a .NET tool:
dotnet tool install --global vbamc --version 2.0.1Upgrade from previous version:
dotnet tool update --global vbamcAdd VbaCompiler library to your project:
dotnet add package NetOfficeFw.VbaCompiler --version 2.0.1VbaCompiler v2.0.0 is a major release that brings support for .NET 10, modernizes dependencies, and improves performance.
- The
VbaCompilerlibrary andvbamctool work on .NET 8 and 10 runtimes. - Works on Linux, macOS, and Windows.
Install as a .NET tool:
dotnet tool install --global vbamc --version 2.0.0Upgrade from previous version:
dotnet tool update --global vbamcAdd VbaCompiler library to your project:
dotnet add package NetOfficeFw.VbaCompiler --version 2.0.0Use vbamc tool to generate a PowerPoint macro-enabled presentation:
vbamc --module Module.vb --class MyClass.vb --name "VBA Project" --company "ACME" --file Presentation.ppamusing DocumentFormat.OpenXml.Packaging;
using vbamc;
var compiler = new VbaCompiler();
compiler.ProjectId = Guid.NewGuid();
compiler.ProjectName = "My Macro Project";
compiler.CompanyName = "ACME";
compiler.AddModule("Module.vb");
compiler.AddClass("MyClass.vb");
// Generate the vbaProject.bin file
var vbaProjectPath = compiler.CompileVbaProject("obj", "vbaProject.bin");
// Generate Excel macro file
var macroFilePath = compiler.CompileExcelMacroFile(
"bin",
"MyMacro.xlsm",
vbaProjectPath,
SpreadsheetDocumentType.MacroEnabledWorkbook
);- OpenMcdf 3.1.0: Updated to the latest version of OpenMcdf library for improved CFB (Compound File Binary) file format handling.
- DocumentFormat.OpenXml 3.3.0: Latest version provides better Office Open XML document processing.
- NetOfficeFw.VbaCompression 3.0.1: Updated compression library for VBA project files.
- Microsoft.SourceLink.GitHub 8.0.0: Enhanced debugging experience with up-to-date source linking.
- Modernized CI/CD: Updated release workflow with Trusted Publishing for more secure package distribution.
- Artifact attestation: Enhanced security with artifact attestation in the release process.
- Automated dependency updates: Configured Dependabot for GitHub Actions to keep CI/CD dependencies current.
This major release removes support for .NET 6 and .NET 7. The project now targets only .NET 8 and .NET 10.
Thank you to all contributors who helped make this release possible!