当前位置:网站首页>dotnet-exec 0.5.0 released
dotnet-exec 0.5.0 released
2022-06-30 03:48:00 【Dotnet cross platform】
dotnet-exec 0.5.0 released
Intro
dotnet-exec It's a C# Widget for program , Can be used to run some simple C# Program without creating a project file , And you can customize the entry method of the project , Support but not limited to Main Method
Install/Update
dotnet-exec It's a dotnet tool, Can be installed using dotnet tool To install
install / Update the latest stable version :
dotnet tool update -g dotnet-executeInstall the latest preview edition :
dotnet tool update -g dotnet-execute --prereleaseUpdates
Features
Custom references
stay 0.5.0 In version, users can customize reference, You can use -r/--reference Option to customize the local... Of the reference dll perhaps nuget package
For example, the following reference nuget Example of a package
dotnet-exec "code:typeof(CsvHelper).Assembly.Location.Dump()" -r "nuget:WeihanLi.Npoi" -u "WeihanLi.Npoi" Here's a quote from WeihanLi.Npoi This nuget package , If no version is specified, the latest stable version will be used by default , At present, it is 2.3.0 So the output we see will be 2.3.0

We can also specify specific NuGet Package version , such as :
dotnet-exec "code:typeof(CsvHelper).Assembly.Location.Dump()" -r "nuget:WeihanLi.Npoi,2.1.0" -u "WeihanLi.Npoi"
We can also directly reference local dll, For example, we quote the above nuget Local... In the package dll
dotnet-exec "code:typeof(CsvHelper).FullName.Dump()" -r "C:\Users\Weiha\.nuget\packages\weihanli.npoi\2.3.0\lib/net6.0/WeihanLi.Npoi.dll" -u "WeihanLi.Npoi"
Docker support enhancements
If you're not dotnet developer , Or do not want to install dotnet Environmental Science , You can also use docker To try it
docker run --rm weihanli/dotnet-exec:0.5.0 dotnet-exec "code:(1+1).Dump()"Before docker Image is based on SDK The image of , Large image ,0.5.0 Version in use runtime Image to package , It is much smaller than the original image , contrast dockerhub Upper mirror size , You can find that the size of the image is reduced by about 70%, You can refer to :https://hub.docker.com/r/weihanli/dotnet-exec/tags

runtime The package contains only runtime Assembly , Does not contain a reference assembly , Reference assemblies are used during compilation , No, SDK There is no local reference assembly , Meeting fallback To nuget package , To reduce the waiting time for the first run , Here's a comparison tricky In practice Dockerfile At the end of, a dotnet-exec 'code:"Hello .NET".Dump()' To download .NET Frame reference assembly , It's the same .NET edition , You don't need to download anymore , You can reduce some downloads NuGet Package and and NuGet Server interaction time , Thus reducing some startup time

References
https://github.com/WeihanLi/dotnet-exec
https://www.nuget.org/packages/dotnet-execute/
https://hub.docker.com/r/weihanli/dotnet-exec
边栏推荐
- C#【高级篇】 C# 多线程
- 解决navicat连接数据库遇到的问题
- 声网自研传输层协议 AUT 的落地实践丨Dev for Dev 专栏
- What are the defaults for Binding. Mode=Default for WPF controls?
- Redis is used in Windows system
- 【云原生】AI云开发平台——AI Model Foundry介绍(开发者可免费体验AI训练模型)
- If you can tell whether the external stock index futures trading platform I am trading is formal and safe?
- Do280 private warehouse persistent storage and chapter experiment
- 2021-07-05
- Redis中的SDS理解
猜你喜欢
![[ten minutes] manim installation 2022](/img/54/7b895d785c7866271f06ff49cb20aa.png)
[ten minutes] manim installation 2022

【论文阅读|深读】DANE:Deep Attributed Network Embedding

声网自研传输层协议 AUT 的落地实践丨Dev for Dev 专栏

Do280 private warehouse persistent storage and chapter experiment

毕业设计EMS办公管理系统(B/S结构)+J2EE+SQLserver8.0

共124篇!墨天轮“高可用架构”干货文档分享(含Oracle、MySQL、PG)

Practical debugging skills

专升本高数(三)

Interface test tool postman

Stc89c52/90c516rd/89c516rd ADC0832 ADC driver code
随机推荐
Tidb 6.0: rendre les GRT plus efficaces 丨 tidb Book Rush
Redis在windows系统中使用
C#【高级篇】 C# 匿名方法【待补充Lambda表达式。。。】
[punch in - Blue Bridge Cup] day 1 --% 7F format output
C#【高级篇】 C# 泛型(Generic)【需进一步补充:泛型接口、泛型事件的实例】
From 2500 a month, no one wants to go to the programming road of the technical director of a large factory | my ten years
A minimalist way to integrate databinding into activity/fragment
学校实训要做一个注册页面,要打开数据库把注册页面输入的内容存进数据库但是
Solve the problem of Navicat connecting to the database
RPC correction
Simple theoretical derivation of SVM (notes)
DO280私有仓库持久存储与章节实验
【模糊神经网络预测】基于模糊神经网络实现水质预测含Matlab源码
[punch in - Blue Bridge Cup] day 2 --- format output format, ASCII
[0x0] open questions left by the principal
[operation] MySQL query on May 24, 2022
4-5 count words and spaces (15 points)
Redis中的SDS理解
[operation] MySQL query operation 2 on May 25, 2022
【作业】2022.5.25 MySQL 查操作2