|
| 1 | +# v2.0.0 |
| 2 | + |
| 3 | +VbaCompiler v2.0.0 is a major release that brings support for .NET 10, modernizes dependencies, and improves performance. |
| 4 | + |
| 5 | +### What's New |
| 6 | +- The `VbaCompiler` library and `vbamc` tool work on .NET 8 and 10 runtimes. |
| 7 | +- Works on Linux, macOS, and Windows. |
| 8 | + |
| 9 | + |
| 10 | +### Installation |
| 11 | + |
| 12 | +Install as a .NET tool: |
| 13 | + |
| 14 | +```bash |
| 15 | +dotnet tool install --global vbamc --version 2.0.0 |
| 16 | +``` |
| 17 | + |
| 18 | +Upgrade from previous version: |
| 19 | + |
| 20 | +```bash |
| 21 | +dotnet tool update --global vbamc |
| 22 | +``` |
| 23 | + |
| 24 | +Add `VbaCompiler` library to your project: |
| 25 | + |
| 26 | +```bash |
| 27 | +dotnet add package NetOfficeFw.VbaCompiler --version 2.0.0 |
| 28 | +``` |
| 29 | + |
| 30 | + |
| 31 | +### Usage |
| 32 | + |
| 33 | +Use `vbamc` tool to generate a PowerPoint macro-enabled presentation: |
| 34 | + |
| 35 | +```bash |
| 36 | +vbamc --module Module.vb --class MyClass.vb --name "VBA Project" --company "ACME" --file Presentation.ppam |
| 37 | +``` |
| 38 | + |
| 39 | +#### Using VbaCompiler library |
| 40 | + |
| 41 | +```csharp |
| 42 | +using DocumentFormat.OpenXml.Packaging; |
| 43 | +using vbamc; |
| 44 | + |
| 45 | +var compiler = new VbaCompiler(); |
| 46 | +compiler.ProjectId = Guid.NewGuid(); |
| 47 | +compiler.ProjectName = "My Macro Project"; |
| 48 | +compiler.CompanyName = "ACME"; |
| 49 | +compiler.AddModule("Module.vb"); |
| 50 | +compiler.AddClass("MyClass.vb"); |
| 51 | + |
| 52 | +// Generate the vbaProject.bin file |
| 53 | +var vbaProjectPath = compiler.CompileVbaProject("obj", "vbaProject.bin"); |
| 54 | + |
| 55 | +// Generate Excel macro file |
| 56 | +var macroFilePath = compiler.CompileExcelMacroFile( |
| 57 | + "bin", |
| 58 | + "MyMacro.xlsm", |
| 59 | + vbaProjectPath, |
| 60 | + SpreadsheetDocumentType.MacroEnabledWorkbook |
| 61 | +); |
| 62 | +``` |
| 63 | + |
| 64 | + |
| 65 | +### Dependency Updates |
| 66 | +- **OpenMcdf 3.1.0**: Updated to the latest version of OpenMcdf library for improved CFB (Compound File Binary) file format handling. |
| 67 | +- **DocumentFormat.OpenXml 3.3.0**: Latest version provides better Office Open XML document processing. |
| 68 | +- **NetOfficeFw.VbaCompression 3.0.1**: Updated compression library for VBA project files. |
| 69 | +- **Microsoft.SourceLink.GitHub 8.0.0**: Enhanced debugging experience with up-to-date source linking. |
| 70 | + |
| 71 | +### Infrastructure Enhancements |
| 72 | +- **Modernized CI/CD**: Updated release workflow with Trusted Publishing for more secure package distribution. |
| 73 | +- **Artifact attestation**: Enhanced security with artifact attestation in the release process. |
| 74 | +- **Automated dependency updates**: Configured Dependabot for GitHub Actions to keep CI/CD dependencies current. |
| 75 | + |
| 76 | +### Breaking Changes |
| 77 | + |
| 78 | +This major release removes support for .NET 6 and .NET 7. The project now targets only .NET 8 and .NET 10. |
| 79 | + |
| 80 | +### Acknowledgments |
| 81 | + |
| 82 | +Thank you to all contributors who helped make this release possible! |
0 commit comments