当前位置:网站首页>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
边栏推荐
- Hisense A7 ink screen mobile phone cannot be started
- TiDB 6.0:让 TSO 更高效丨TiDB Book Rush
- Analysis of similarities and differences of various merged features (Union, merge, append, resolve) in ArcGIS
- [punch in - Blue Bridge Cup] day 4--------- split ('') cannot be used. There is a space after the last number of test cases. Split ()
- [punch in - Blue Bridge Cup] day 3 --- slice in reverse order list[: -1]
- Buffer pool of MySQL notes
- Laravel9 installation locale
- 接口测试--如何分析一个接口?
- 巧用 Bitmap 实现亿级海量数据统计
- Is the largest layoff and salary cut on the internet coming?
猜你喜欢

Tidb 6.0: rendre les GRT plus efficaces 丨 tidb Book Rush

【笔记】AB测试和方差分析

学校实训要做一个注册页面,要打开数据库把注册页面输入的内容存进数据库但是

【论文阅读|深读】Role2Vec:Role-Based Graph Embeddings

Number of students from junior college to Senior College (4)

Buffer pool of MySQL notes

接口测试--如何分析一个接口?

Radiant energy, irradiance and radiance

Realization of BFS in C language by storing adjacency matrix of graph

UML diagrams and list collections
随机推荐
Solutions for project paths
【图像融合】基于交叉双边滤波器和加权平均实现多焦点和多光谱图像融合附matlab代码
[punch in - Blue Bridge Cup] day 3 --- slice in reverse order list[: -1]
Tidb 6.0: making Tso more efficient tidb Book rush
51 single chip microcomputer indoor environment monitoring system, mq-2 smoke sensor and DHT11 temperature and humidity sensor, schematic diagram, C programming and simulation
【作业】2022.5.23 MySQL入门
Local, locallow and roaming in the appdata folder
[summary of skimming questions] database questions are summarized by knowledge points (continuous update / simple and medium questions have been completed)
Mysql性能优化(6):读写分离
绿色新动力,算力“零”负担——JASMINER X4系列火爆热销中
如何通过进程启动来分析和解决EasyCVR内核端口报错问题?
4-5 count words and spaces (15 points)
巧用 Bitmap 实现亿级海量数据统计
使用IDEAL连接数据库,运行出来了 结果显示一些警告,这部分怎么处理
Number of students from junior college to Senior College (4)
Redis high concurrency distributed locks (learning summary)
[0x0] open questions left by the principal
.NET 7 的 JWT 配置太方便了!
[operation] MySQL query operation 2 on May 25, 2022
The 5-year Android development interview took 20 days to join Alibaba