NetPad Changelog
What's new in NetPad 0.7.0
Apr 2, 2024- What's New:
- ASP.NET Support:
- Open script properties (F4) and check Reference ASP.NET on the bottom left to Add ASP.NET to your script and get a web app running in seconds!
- Compiler Optimizations:
- Select to enable or disable compiler optimizations.
- Preprocessor Directives:
- A few C# preprocessor directives are now available.
- Database Connections:
- Connection String:
- You can now manually edit the connection string.
- BREAKING CHANGE: For your MS SQL Server connections, you will need to edit them and check "Trust Server Certificate". This was implicitly added previously.
- Scaffolding Options:
- New options were added to give you more control over the scaffolding process.
- Entity Framework Logs:
- The SQL tab now shows all Entity Framework logs, with colors, and provides a dropdown to filter them by category.
- Override OnConfiguring:
- NetPad overrides the OnConfiguring method on the base DbContext to forward Entity Framework logs to the SQL tab. This means you can't override it yourself. To get around that, a new OnConfiguringPartial method is introduced and can be used like so:
- Enhancements:
- This update adds the ability to dump the following objects types:
- Dumping media files (using the new Image, Audio and Video classes in the NetPad.Media namespace) will render them as media content the output pane.
- Dumping JsonDocument, JsonElement and JsonNode will output their JSON representation.
- Dumping XmlNode, XNode and other related types in System.Xml and System.Xml.Linq namespaces respectively will output their XML representation.
- Additional Parameters:
- These new optional parameters were added to the Dump() method:
- css: (string) css classes to add to output. You can use any Bootstrap v5 classes. Support for defining your own classes that you can use with this parameter is coming soon.
- clear: (int) will clear dumped result after specified milliseconds.
- code: (string) dump a code string with syntax highlighting.
- HTML Rendering (experimental):
- Added basic support for HTML rendering. You can now Dump() HTML (and JavaScript!) and see it rendered in the output pane.
- See wiki for examples. More documentation and examples are being added to better demonstrate usage.
- Others:
- Compiled script assemblies now have the fixed name "NetPadScript" which allows you to make the internals of your own assemblies visible to your NetPad scripts like: [InternalsVisibleTo("NetPadScript")] (#157)
- New flatpak and snap packages [untested]
- Slightly reduced bundle size.
- Fixes:
- When you switch to a tab that is in the tab bar overflow, it is brought into view.
- Fixed an issue with running some SQL scripts when there is a " in the query.
- Fixed failure installing NuGet packages on non-English locales (#148).
- NetPad will now fallback to AppData folder as the "Scripts folder" if USERPROFILE/Documents is not writeable (#134).
- Fixed NetPad not launching properly when user has the DOTNET_ENVIRONMENT or ASPNETCORE_ENVIRONMENT global variable set to Development.
New in NetPad 0.6.1 (Dec 30, 2023)
- What's New:
- Restore Last Active Script on Launch: When NetPad is launched, it will open to the last active script from the previous session.
- Restore Window Size & Position: NetPad will try to restore the previous size and position of its window at launch (#122).
- NuGet Package Manager is cleaner with a number of UX improvements and package loading/searching is much faster now. Also:
- The latest version of a package appears next to outdated packages in local cache.
- The version picker is now sensitive to the Include Pre-releases checkbox.
- Dependencies shown in the details pane (far right column) are now easier to visually inspect.
- Fixes:
- Better modal window sizing and placement.
- Fixed output font not switching to monospace when selected in Settings.
- Fixed #118: incorrect newline formatting
- Fixed #125: Main menu becoming empty when opening a dialog window
- Fixed bug when running script in .NET 6
- Fixed not auto-adding using statement to Namespaces in some cases
- Fixed C# language features not updating properly when a namespace is added in some cases
- Fixed Browse File input control not showing when adding/managing SQLite connections
- Fixed code completion suggestion menu getting cut off by Output pane
- Fixed bad NuGet search results when changing the number of items to show per search result page.