.net framework引用.net standard的注意点

 

    1. 注意版本匹配

    2. 注意引入.net standard的依赖库(会报未能加载文件或程序集的异常)
      在framework中虽然引入了standard的项目,但是其依赖库没有自动引入。
      可以参考这篇,用文本编辑器打开xxx.csproj
      PropertyGroup里面添加一行代码:
      <RestoreProjectStyle>PackageReference</RestoreProjectStyle>

    3. 关于这个问题,在其他地方也有提问和解释:
    4. https://qa.1r1g.com/sf/ask/2987097151/
      https://github.com/dotnet/roslyn/issues/17639
      https://github.com/NuGet/Home/issues/4488

       

posted @ 2022-06-24 17:28  qingjiawen  阅读(285)  评论(0编辑  收藏  举报