Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Optrix · Aug 23, 2019 at 01:25 AM · mono.net

Target Platform for .NET DLLs, And Should I Use Linq?

I have a few .NET DLLs that I'd like to use in my application (in particular, WebSockets4Net).

My question is, what version of .NET should they target if I'm building my applications in 2018.4 or higher? And if the answer is '2.0', then should I be using LINQ?


Historically, I thought we were trying to target .NET 2.0, since that is the version of Mono that Unity supposedly supports, particularly on mobile platforms.


But the packages in the Unity Package Manager (including the package manager itself) use several features that are not available in .NET 2.0, such as 'Func', 'Action' and most of the Linq functions.


WebSockets4Net uses these, but since they aren't officially supported in .NET 2.0, they define their own version of these delegates and the LINQ functions. Which then turns around and conflicts with the ones that are present in the editor, since it's using them natively.


If I'm supposed to be using 3.5 or .NET 4, I'd be able to get around some problems that this is causing. But I have a sneaking suspicion that it's screw up on platforms other than Windows that use Mono or IL2CPP rather than .NET 4.5.


My current solution is to make custom builds of WebSockets4Net and its dependencies that move those 'future' functions out into their own namespace rather than System. But it'd be nice if there was a consistent answer to what I'm supposed to be doing - either I should be targeting .NET 2.0, in which case the editor scripts really shouldn't be using those non-compliant functions, or I should be targeting 3.5, in which case I'm concerned by I get to choose between '.Net 2 Subset ' and '.NET 2.0' for my scripting backends.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

109 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

When will Unity Support .NET 4 to the current Mono Level? 1 Answer

`System.IO.File' does not contain a definition for `AppendText'? 1 Answer

Can I use .NET 4 library or Mono 2.8 in Unity ? 2 Answers

Can I use Monodevelop bundled with Unity to debug standalone .NET applications? 0 Answers

What version of Mono the 2017.1 version use? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges