Releases: NetOfficeFw/vbamc
vbamc v2.0.1
v2.0.1
VbaCompiler v2.0.1 is a hotfix release which ensures Microsoft Office macro files
are generated correctly.
Fixes
- Ensures the generated macro project files are valid.
- Reverted OpenMcdf library update to maintain compatibility (kept at v2.4.1).
Installation
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.1v2.0.0
VbaCompiler v2.0.0 is a major release that brings support for .NET 10, modernizes dependencies, and improves performance.
What's New
- The
VbaCompilerlibrary andvbamctool work on .NET 8 and 10 runtimes. - Works on Linux, macOS, and Windows.
Installation
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.0Usage
Use vbamc tool to generate a PowerPoint macro-enabled presentation:
vbamc --module Module.vb --class MyClass.vb --name "VBA Project" --company "ACME" --file Presentation.ppamUsing VbaCompiler library
using 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
);Dependency Updates
- 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.
Infrastructure Enhancements
- 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.
Breaking Changes
This major release removes support for .NET 6 and .NET 7. The project now targets only .NET 8 and .NET 10.
Acknowledgments
Thank you to all contributors who helped make this release possible!
v1.8.0
v1.7.0
This release add new vbamc tool argument to set extended properties in the compiled documents.
Usage
Call vbamc with the argument --property with key value pair PropertyName=Value:
vbamc -m Module.vba -c Class.vba --property Generator=VbaCompiler
This will create extended property named Generator with value VbaCompiler in the compiled Office document.
v1.6.0
This release changes the VbaCompiler to compile the vbaProject.bin and the macro file to output streams instead of files.
Features
- The
VbaCompiler.CompileVbaProject(Stream)will save thevbaProject.bincontent to the stream - The
vbaCompiler.Compile*MacroFile()methods will accept streams
Breaking change
VbaCompilerno longer supports compiling files directly to file path
vbamc tool
- The
vbamctool will generate macro file in correct format based on the file extension
v1.5.1
v1.5.0
This is a release add new API to VbaCompiler to add extended properties to the macro file.
New features
- Add extended properties to the macro file using
VbaCompiler.ExtendedPropertiesproperty
Note
Extended properties are not exposed to the command linevbamctool.
v1.4.3
This is a release with small quality of life changes from @m-kovac.
You can now the the Version property of the add-in file and vbamc compiler and the library can be used in multithreaded scenarios as it won't use write-locks when reading image files for the Ribbon.
New features
- You can set the package version value by the
ProjectVersionargument #7
Improvements
v1.4.2
This release does not have any changes in command line vbamc tool.
Added
- To support compilation of custom addins, the
VbaCompilerlibrary allows the developer to set base directory to Ribbon customization files (thecustomUIfolder). #6 - The
VbaCompilerlibrary was updated to allows compiling PowerPoint add-in files on Windows platform and replacing the user profile path~/with the macOS directory separator. #5
Release notes for v1.4.0
Change the user profile path which will replace the ~/ expression in source code using the --user-profile-path parameter.
Warning Reverted change to the
--fileparameter from v1.3.0 release.
Parameter --file requires filename with extension now. This behavior is the same as for v1.2.0 release.
The vbamc compiler is now listed on NuGet https://www.nuget.org/packages/vbamc
Install it using command
dotnet tool install --global vbamc --version 1.4.1
vbamc v1.4.1
This release does not have any changes in command line vbamc tool.
Added
- The
VbaCompilerlibrary was updated to allows compiling PowerPoint add-in files on Windows platform and replacing the user profile path~/with the macOS directory separator. #5
Release notes for v1.4.0
Change the user profile path which will replace the ~/ expression in source code using the --user-profile-path parameter.
Warning Reverted change to the
--fileparameter from v1.3.0 release.
Parameter --file requires filename with extension now. This behavior is the same as for v1.2.0 release.
The vbamc compiler is now listed on NuGet https://www.nuget.org/packages/vbamc
Install it using command
dotnet tool install --global vbamc --version 1.4.1