首页 > 解决方案 > 使用 4.5.1 构建的 U-sql 引用程序集?而需要记录的 4.5

问题描述

据记载,U-SQL 使用 .net 4.5

https://docs.microsoft.com/en-us/azure/data-lake-analytics/data-lake-analytics-u-sql-programmability-guide#use-assembly-versioning

因此,要确保我们自己的自定义程序集构建到该运行时。

通过 Azure Data Lake 和流分​​析工具版本 2.3.4000.3 创建“类库(用于 U-SQL 应用程序)”时,它设置为构建为 .net 4.5,这很好,但它似乎引用了例如 Microsoft.Analytics.Interfaces它是针对 4.5.2 构建的并且无法加载。

我使用的是 Visual Studio 15.8.0,感觉就像是因为它来自一个通用的 Visual Studio 文件夹,所以它已经升级到不知道的 u-sql。

严重性代码描述项目文件行抑制状态警告无法解析主要参考“Microsoft.Analytics.Interfaces”,因为它是针对“.NETFramework,Version=v4.5.2”框架构建的。这是比当前目标框架“.NETFramework,Version=v4.5”更高的版本。MYUDFNAMEHERE C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets 2110

标签: visual-studio-2017azure-data-lakeu-sql

解决方案


This happened again with VS update (15.9.14 on July 9, 2019), all U-SQL projects and Analytics dll's changed the target framework from 4.5 to 4.7.2 but Azure Data Lake does not support 4.7.2. Or at least there is no documentation for it...

So we created our own package with Analytics.dll for both version so we can upgrade when Azure Data Lake will officially support 4.7.2 and higher.


推荐阅读