Bot releases are visible (Hide)
If you like NetPad, please star the repo đ!
A new "Code" pane was added with a Syntax Tree visualizer that updates in real-time as you type.
Shift + ESC
keybindingALT + 1
and ALT + 2
respectivelyThe majority of the effort spent since the last release has been on restructuring the solution, simplifying and making it easier to maintain, review and contribute to. Another round is coming up soon, mainly on the client side, but the majority of it is completed. If you're interested in more info see #211.
I plan to add documentation soon that explains the high level concepts and structure of the solution to help facilitate review and contribution.
If anyone has any thoughts or discussion points I'd love to hear them. Feel free to open a discussion/issue on the topic or hit me up on Discord.
Console.ReadLine()
functionality including #218If you're enjoying NetPad, please consider sponsoring it, it really helps! Also don't forget to start the repo if you haven't already, thank you!
A special thanks to my current sponsors. Your support is greatly appreciated and helps keep this project growing!
           Â
Full Changelog: https://github.com/tareqimbasher/NetPad/compare/v0.7.1...v0.7.2
Published by tareqimbasher 5 months ago
If you like NetPad, please star the repo đ!
Added support for .NET 9 Preview and Entity Framework Core 9 Preview 3.
A new option now exists in the data connection context-menu to duplicate a connection.
Entity Framework takes time to initialize on first use. The larger the data model, the more time it needs. For large models (100s or 1000s of entities and relationships) script startup can be sped up using a compiled model. An option to use a compiled model for a data connection now exists in Connection: Properties > Scaffolding
.
Note that using compiled models is not effective for smaller models, and comes with some limitations. It is recommended to only use this option if you need it.
The editor has some pre-defined themes you can now pick from in Settings > Editor
. These themes come from the monaco-themes project.
Example, the GitHub Dark theme:
You can also tweak the current editor theme using the themeCustomizations
property in the Monaco options editor.
Example:
"themeCustomizations": {
// General editor colors
"colors": {
"editor.background": "#282a36"
},
// Semantic highlighting token styles
"rules": [
{
"token": "interface",
"foreground": "50fa7b",
"fontStyle": "underline"
}
]
}
See IColors and ITokenThemeRule for the definition of the
colors
andrules
properties respectively.
See wiki for more info.
The new Settings > Styles
was added as a way to define custom styles that apply to the whole application.
For example to increase the font size of output:
.dump-container {
font-size: 1.25rem;
}
This feature also works great with the ability to specify CSS classes you want a dumped value to have, introduced in v0.7.0:
myObj.Dump(css: "important");
.important {
background-color: salmon;
}
You can also override CSS variables on the built-in theme-netpad-dark
and theme-netpad-light
themes. Here's an example customizing the dark theme with the Dracula theme color palette:
.theme-netpad-dark {
--drac-light: #343746;
--drac-dark: #22222c;
--text-color: #F8F8F2;
--background-color: var(--drac-dark);
--list-background: var(--drac-light);
--form-control-background-color: #343746;
--active-color: #dbb5fa;
--script-toolbar-background: #242632;
--pane-ribbon-background: var(--drac-light);
--pane-background: var(--drac-dark);
--pane-toolbar-background: var(--drac-dark);
--dialog-background: var(--drac-dark);
--tab-background: #333541;
--tab-active-background: #242632;
--tab-active-text-color: #fffff;
--scrollbar-thumb-color: #777777;
--splitter-color: #2b2d39;
}
See wiki for more info.
NetPad will recognize additional NuGet sources added to your Nuget.Config
file (#119). Thank you @jsamse for that contribution.
There is no UI to manage NuGet sources in NetPad so far so you'll have to add them manually. More info
Media files will now be rendered in their original size, but you can also specify size using the DisplayWidth
and DisplayHeight
properties:
new Image("/path/to/img.png")
{
DisplayWidth = "128px",
DisplayHeight = "128px"
}.Dump();
Or using extension methods:
// Individually
Image.FromPath("/path/to/img.png")
.WithDisplayWidth("100%");
.WithDisplayHeight("400px");
// Together
Image.FromPath(imageFile).WithDisplaySize("100%", "400px");
See the wiki for more info.
Settings > General > Appearance
layoutCTRL+A
) in output pane selecting text outside its container (#178).Settings > Keyboard Shortcuts
.CTRL+F
in output pane would also open Find Text box in editor.Full Changelog: https://github.com/tareqimbasher/NetPad/compare/v0.7.0...v0.7.1
Published by tareqimbasher 7 months ago
This release brings support for ASP.NET, scaffolding control, new Dump()
capabilities and more!
If you like NetPad, please star the repo đ!
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!
A new webapp
snippet is now avaialble to make it super easy to get started.
Select to enable or disable compiler optimizations.
A few C# preprocessor directives are now available.
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.
New options were added to give you more control over the scaffolding process.
The SQL
tab now shows all Entity Framework logs, with colors, and provides a dropdown to filter them by category.
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:
partial void OnConfiguringPartial(DbContextOptionsBuilder optionsBuilder)
{
// Your code
}
Its not as pretty đ but a better solution is available and will be implemented in a future release.
Dump()
This update adds the ability to dump the following objects types:
Image
, Audio
and Video
classes in the NetPad.Media
namespace) will render them as media content the output pane.JsonDocument
, JsonElement
and JsonNode
will output their JSON representation.XmlNode
, XNode
and other related types in System.Xml
and System.Xml.Linq
namespaces respectively will output their XML representation.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.See wiki for more details.
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.
[InternalsVisibleTo("NetPadScript")]
(#157)flatpak
and snap
packages [untested]
"
in the query.USERPROFILE/Documents
is not writeable (#134).DOTNET_ENVIRONMENT
or ASPNETCORE_ENVIRONMENT
global variable set to Development
.Thank you to my sponsors. Your support is greatly appreciated and helps keep this project growing!
If you're enjoying NetPad, please consider sponsoring it with a cup of coffee ($5) a month, every bit helps me maintain this project and deliver more features. Thank you đ
Full Changelog: https://github.com/tareqimbasher/NetPad/compare/v0.6.1...v0.7.0
Published by tareqimbasher 10 months ago
This update brings a number of fixes and adds a few QoL improvements. Exciting new features are coming soon in v0.7.0!
If you like NetPad, please star the repo đ!
Include Pre-releases
checkbox.PRODUCTION
banner that appears on the left side of the editor when targeting a production database connection. Its now more subtle and less distracting.monospace
when selected in Settings.using
statement to Namespaces in some casesâ¤ī¸ If you're enjoying NetPad, please consider sponsoring it. Thank you đ
Full Changelog: https://github.com/tareqimbasher/NetPad/compare/v0.5.1...v0.6.0
Published by tareqimbasher 11 months ago
This release brings support for .NET 8 and C# 12, Native windows decorations and other new features!
If you like NetPad, please star the repo đ!
Settings
.unsafe
Code: The unsafe
keyword is now allowed in C# scripts. There is no setting to turn this off. If this is something you guys would like to see become configurable, be sure to open a discussion or issue!Dump()
or Console.Write
calls) one can output to 10,000 items in a single run.Dump()
will now exclude base properties that are hidden by properties in derived types..
) is typed. Thank you DoodleBop over on Discord for the help on this.Thank you to my sponsors. Your support is greatly appreciated and helps keep this project growing!
If you're enjoying NetPad, please consider sponsoring it with a cup of coffee ($5) a month, every bit helps me maintain this project and deliver more features. Thank you đ
Full Changelog: https://github.com/tareqimbasher/NetPad/compare/v0.5.1...v0.6.0
Published by tareqimbasher 12 months ago
If you like NetPad, please star the repo đ!
This is a hotfix for v0.5.0. New features are coming soon!
If you're enjoying NetPad, please consider sponsoring it with a cup of coffee ($5) a month, every bit helps me maintain this project and deliver more features. Thank you đ
Full Changelog: https://github.com/tareqimbasher/NetPad/compare/v0.5.0...v0.5.1
Published by tareqimbasher about 1 year ago
If you like NetPad, please star the repo đ!
This release adds a number of great new features, checking off some more items from our roadmap!
DbContext
for a database and reuse it the next time you fire it up. Changes to the schema will be detected automatically and the cache will be refreshed.
View > Full Screen
.A LOUD shout out to my new and existing contributors! Your support is so very greatly appreciated! Your contributions go directly towards adding new features, enhancing existing ones and have a direct impact on advancing this project forward. You are superstars, thank you!
If you're enjoying NetPad, please consider sponsoring it with a cup of coffee ($5) a month, every bit helps me maintain this project and deliver more features. Thank you đ
Full Changelog: https://github.com/tareqimbasher/NetPad/compare/v0.4.2...v0.5.0
Published by tareqimbasher about 1 year ago
If you like NetPad, please star the repo đ!
This hotfix release that makes the following changes:
DbContext
compilation would fail if scaffolded DbSet
type is the same as its property name. Thank you @jwallet for contributing the fixA new release will be coming soon with new features!
A LOUD shout out to my new and existing contributors! Your support is so very greatly appreciated! Your contributions go directly to adding new features, enhancing existing ones and have a direct impact on advancing this project forward. You are superstars, thank you!
If you're enjoying NetPad, please consider sponsoring it with a cup of coffee ($5) a month, every bit helps me maintain this project and deliver more features. Thank you đ
Full Changelog: https://github.com/tareqimbasher/NetPad/compare/v0.4.1...v0.4.2
Published by tareqimbasher about 1 year ago
If you like NetPad, please star the repo đ!
This release adds a few new features and improvements, and fixes reported issues.
Settings > General
.Edit > Settings
: Opens the settings window (shortcut: F12).Edit > Transform to Upper/Lower Case
: Transforms selected text to upper or lower case (shortcut: Ctrl + Shift + Y).View > Output
: Toggles the Output pane (shortcut: Ctrl + R)View > Explorer
: Toggles the Explorer pane (shortcut: Alt + E)View > Namespaces
: Toggles the Namespaces pane (shortcut: Alt + N)FileInfo
and DirectoryInfo
objectsMemory<T>
and ReadOnlyMemory<T>
objectsSpan<T>
and ReadOnlySpan<T>
values. However this only works if directly dumping a Span. If Span is not the root object being dumped, only basic info about the Span is rendered.MaxDepth
to serialization. Defaults to 64, has a min value of 1 and max value of 1000. A new user setting was added and can be configured in Settings > Results
.MaxCollectionSerializeLength
which defines how many items of a collection should be serialized. This was previously hard-coded to 1000. Defaults to 1000, has a min value of 1 and max value of 10,000.
records
; was using default (value) comparison, now uses reference comparison.Settings > OmniSharp > Custom executable path
.A LOUD shout out to my new contributors! Your support is so very greatly appreciated! Your contributions go directly to adding new features, enhancing existing ones and have a direct impact on advancing this project forward. You are superstars, thank you!
If you're enjoying NetPad, please consider sponsoring it with a cup of coffee ($5) a month, every bit helps me maintain this project and deliver more features. Thank you đ
Full Changelog: https://github.com/tareqimbasher/NetPad/compare/v0.4.0...v0.4.1
Published by tareqimbasher over 1 year ago
If you like NetPad, please star the repo đ!
This release mainly focused on adding .NET 7 support and the ability to write SQL scripts!
for
will prioritize the snippet for
, effectively inserting a for
loop, instead of the suggestion of the keyword for
which just inserts the keyword itself.override ToString()
.Full Changelog: https://github.com/tareqimbasher/NetPad/compare/v0.3.1...v0.4.0
Published by tareqimbasher over 1 year ago
If you like NetPad, please star the repo đ!
â [EDIT] June 26, 2023: The macOS ARM build was updated.
Previous binary had an issue where it would not open, and instead would hang on the splash screen indefinitely requiring user to force quit the app. Please use the latest macOS ARM binary.
If you get the error: NetPad is damaged and can't be opened. You should move it to the Trash
:
open a terminal and do this:
sudo xattr -cr /path/to/NetPad.app
This occurs because NetPad is not signed; macOS will only allow signed apps or apps downloaded from the App Store to run.
This release mainly focused on adding native support for macOS ARM (Apple Silicon). New macOS ARM specific builds are now available!
Settings > General
Full Changelog: https://github.com/tareqimbasher/NetPad/compare/v0.3.0...v0.3.1
Published by tareqimbasher over 1 year ago
If you like NetPad, please star the repo đ!
This is the third pre-release! This release focused on introducing features to enhance script results and related functionality. Please open an issue for any bugs or feature requests. Your feedback on issues or suggestions is greatly appreciated!
DataTable
DataSet
XDocument
, XElement
, XNode
...etcXmlDocument
, XmlNode
...etcIFormattable
are now represented as a string
Ctrl + T
Console.ReadLine()
in a script to ask user for inputThere are a number of features we still need to make NetPad viable for as many developers as possible. For the next release however, focus will be on providing .NET 7 support and adding more database providers.
Full Changelog: https://github.com/tareqimbasher/NetPad/compare/v0.2.0...v0.3.0
Published by tareqimbasher over 1 year ago
If you like NetPad, please star the repo đ!
This is the second pre-release! It brings a number of new features, some enhancements and fixes. Please open an issue for any bugs or feature requests.
.Dump()
or having it appended with a semi-colonConsole.Write
and Console.WriteLine
Full Changelog: https://github.com/tareqimbasher/NetPad/compare/v0.1.1...v0.2.0
Published by tareqimbasher over 1 year ago
If you like NetPad, please star the repo đ !
This is a follow up to the first pre-release, with some new features and some enhancements and fixes. Please open an issue for any bugs or feature requests.
SaveChanges()
and SaveChangesAsync()
directly in script code without having to use DataContext.SaveChanges()
Full Changelog: https://github.com/tareqimbasher/NetPad/compare/v0.1.0...v0.1.1
Published by tareqimbasher almost 2 years ago
This is the initial alpha pre-release of NetPad. After many sleepless nights, I'm happy to finally push this release.
Being an alpha release, it might be buggy. If you run into an issue please open a bug.
@ObaidaAlhaasan