dotnet-campus / SourceYard

Add a NuGet package only for dll reference? By using dotnetCampus.SourceYard, you can pack a NuGet package with source code. By installing the new source code package, all source codes behaviors just like it is in your project.
MIT License
50 stars 12 forks source link

使用中的一些问题记录 #105

Open Maple512 opened 3 years ago

Maple512 commented 3 years ago

目前来说,能在github action中正常发包,就满足了,这里记录一些使用中的问题

配置

文档

Github Action

在github action配置的操作系统是ubuntu-latest时会报错,错误详情

EXEC : error : 无法从/home/runner/work/utility/utility/MapleClub.Utility/MapleClub.Utility.csproj 找到项目文件 [/home/runner/work/utility/utility/MapleClub.Utility/MapleClub.Utility.csproj]

github action配置:

name: build

on:
  push:
    branches:
      - main

  pull_request:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@main
      - uses: actions/setup-dotnet@main
        with:
          dotnet-version: 5.0.*

      - name: restore
        run: dotnet restore

      - name: build
        run: dotnet build --no-restore -c Release

      - name: tset
        run: dotnet test --no-restore -c Release

使用windows-latest后,就正常了,但是打印的日志乱码了,详情

nuspec

打包后的nuspec缺少license相关的属性,我用dotnet打包后,会有下面两个lisence相关

<license type="expression">Apache-2.0</license>
<licenseUrl>https://licenses.nuget.org/Apache-2.0</licenseUrl>

另外,这是个很有用的工具,多谢

lindexi commented 3 years ago

@Maple512 感谢

我抽空修一下

ubuntu-latest 的问题是因为我逗比都使用了 dotnet framework 的版本进行构建,我抽空修复

源码包统一输出路径 的问题,理论上就是你的 nupkg 的输出路径,你试试修改 PackageOutputPath 属性

nuspec缺少license相关的属性是因为我没有做…… 我抽空加上

lindexi commented 3 years ago

@Maple512 关于 ubuntu-latest 的问题,请看 https://github.com/dotnet-campus/SourceYard/issues/100

Maple512 commented 3 years ago

@Maple512 关于 ubuntu-latest 的问题,请看 #100

好的,多谢回复

Maple512 commented 3 years ago

如果这个工具能做成dotnet tool就更好,这样就不用引用依赖了,也不用考虑何时去依赖这个包,和构建项目时就去打包,我个人觉得,这些都应该是需要受到控制的,如果做成dotnet tool这种工具,就不用考虑那么多了,直接使用命令行来打包,类似 dotnet pack 这种。而且,我看到日志里面,也是用了命名行的,直接做成dotnet tool,应该不需要太多更改,简单而方便

以上只是个人的初步使用感受

总之,多谢提供这么好的工具,多谢

Maple512 commented 3 years ago

@lindexi hi,这个工具的版本能不能支持netstandard2.1呢?

lindexi commented 3 years ago

@lindexi hi,这个工具的版本能不能支持netstandard2.1呢?

可以哇,但本质来说,这个工具有两部分。第一部分是被安装到具体项目上的,用于拿到足够的信息的,这是支持dotnet standard 的。第二部分是可执行文件部分,只能是dotnet framework 或dotnet core 拉