当前位置:网站首页>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
边栏推荐
- 毕业设计EMS办公管理系统(B/S结构)+J2EE+SQLserver8.0
- [operation] getting started with MySQL on May 23, 2022
- 【常见问题】浏览器环境、node环境的模块化问题
- matplotlib. pyplot. Hist parameter introduction
- (04).NET MAUI实战 MVVM
- 【作业】2022.5.23 MySQL入门
- The jupyter notebook kernel hangs up frequently and needs to be restarted
- 51 single chip microcomputer indoor environment monitoring system, mq-2 smoke sensor and DHT11 temperature and humidity sensor, schematic diagram, C programming and simulation
- MySQL performance optimization (6): read write separation
- What are the defaults for Binding. Mode=Default for WPF controls?
猜你喜欢

绿色新动力,算力“零”负担——JASMINER X4系列火爆热销中

EasyCVR部署服务器集群时,出现一台在线一台不在线是什么原因?

Geometric objects in shapely

Learning cyclic redundancy CRC check

如何通过进程启动来分析和解决EasyCVR内核端口报错问题?

深入浅出掌握grpc通信框架

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

UML diagrams and list collections

X Book 6.89 shield unidbg calling method

如何利用FME 创建自己的功能软件
随机推荐
[punch in - Blue Bridge Cup] day 4--------- split ('') cannot be used. There is a space after the last number of test cases. Split ()
【笔记】2022.5.28 从网页获取数据并写入数据库
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.27 通过pycharm操作MySQL
Number of students from junior college to Senior College (4)
云原生入门+容器概念介绍
绿色新动力,算力“零”负担——JASMINER X4系列火爆热销中
Geometric objects in shapely
Stc89c52/90c516rd/89c516rd ADC0832 ADC driver code
Chapter 2 control structure and function (programming problem)
解决navicat连接数据库遇到的问题
A minimalist way to integrate databinding into activity/fragment
dotnet-exec 0.5.0 released
学校实训要做一个注册页面,要打开数据库把注册页面输入的内容存进数据库但是
实用调试技巧
专升本高数(四)
利用反射整合ViewBinding和ViewHolder
【作业】2022.5.25 MySQL 查操作2
[personal summary] learning plan
Semantic segmentation resources