Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

U-sql referenced assembly built with 4.5.1? Whereas documented 4.5 is needed #141

Open
AlexKeySmith opened this issue Aug 16, 2018 · 11 comments

Comments

@AlexKeySmith
Copy link

AlexKeySmith commented Aug 16, 2018

It's documented that U-SQL uses .net 4.5

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

So to ensure that our own custom assemblies are built to that runtime.

When creating a "Class Library (For U-SQL Application)" via Azure Data Lake And Stream Analytics Tools version 2.3.4000.3 it's set to build to .net 4.5 which is fine, but it appears to be referencing e.g. Microsoft.Analytics.Interfaces which is built to 4.5.2 and fails to load.

I'm using Visual Studio 15.8.0, it feels like because it's from a general visual studio folder that it's been upgraded unbeknown to u-sql.

Severity Code Description Project File Line Suppression State Warning The primary reference "Microsoft.Analytics.Interfaces" could not be resolved because it was built against the ".NETFramework,Version=v4.5.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5". MYUDFNAMEHERE C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets 2110

(Originally posted here, but cross posting in case it's a bug / edge case with recent visual studio updates https://stackoverflow.com/questions/51878732/u-sql-referenced-assembly-built-with-4-5-1-whereas-documented-4-5-is-needed)

@AlexKeySmith
Copy link
Author

AlexKeySmith commented Aug 16, 2018

I've added a workaround to the stackoverflow post if anyone's interested. https://stackoverflow.com/a/51879203/141022

@ronnieoverby
Copy link

The best solution for me was to open the project file and modify the target framework version.

I'm not quite sure why Microsoft's U-SQL project templates are in such disarray.

@MikeRys
Copy link
Collaborator

MikeRys commented Feb 27, 2019 via email

@ronnieoverby
Copy link

ronnieoverby commented Feb 27, 2019 via email

@MikeRys
Copy link
Collaborator

MikeRys commented Feb 27, 2019 via email

@ronnieoverby
Copy link

ronnieoverby commented Feb 27, 2019

For me...

VS 2017 15.9.7
Data Lake Tools 2.3.7000.1

Creating a brand new USQL class library project gives you a project that targets net45 but references assemblies targetting net452. It fails to build.

Updating the class library to target net452 causes the build to succeed, but any USQL / USQL Database projects using the class library project will fail to build.

The solution for me was to open USQL/USQL Database project in editor and change target framework version from NET45 to NET452.

The big question I have is, why do all of these projects target NET45 in the latest tools, when the infrastructure on Azure is running net452?

And why does the ClassLib project template reference NET452 assemblies when it itself doesn't target NET452?

@MikeRys
Copy link
Collaborator

MikeRys commented Feb 27, 2019 via email

@ronnieoverby
Copy link

You're welcome.

By the way, I just spent a sprint evaluating U-SQL.

I have a fairly large list of reasons I'm recommending we avoid it for now, much of which has to do with frustrating tooling in visual studio.

If you are interested in some constructive criticism I'm happy to help.

@MikeRys
Copy link
Collaborator

MikeRys commented Feb 27, 2019 via email

@ronnieoverby
Copy link

Happy to. I'll edit my findings for your team and send within a day or two.

@ronnieoverby
Copy link

Sent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants