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 OriginalsByToto · Oct 23, 2018 at 04:02 PM · apicompatibility

Unknown types with .NET 4.x and .NET 2.0 profile

Hello,

I decided to switch to scripting runtime .NET 4.x equivalent and the Standard 2.0 profile as a scripting compatibility because I'm working on an Android project. When the Standard 2.0 profile is used, Visual Studio gives me a lot (a lot) of errors:

 CS 0518 Predefined type 'System.String (or System.Object or System. Void)' is not defined or imported.

French messages for the errors

All of the types (even those I defined) are also underlined in red. types underlined in red These errors disappear when I select the .NET 4.x scripting compatibility, but I can't use this because of the generated build size.

I searched a lot on Google about these errors but nothing helped me. Can someone have an idea of how to use this scripting compatibility?

Thank you in advance

devenv-2018-10-23-18-01-20.png (6.0 kB)
devenv-2018-10-23-18-03-17.png (9.8 kB)
Comment
Add comment · Show 2
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
avatar image hexagonius · Oct 23, 2018 at 04:07 PM 0
Share

have you tried deleting the visual studio files from your unity project folder and regenerated those by double clicking a script file in Editor?

avatar image OriginalsByToto · Oct 23, 2018 at 04:11 PM 0
Share

Yes or course. I tried removing all the csproj and sln files, but it didn't work.

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by hexagonius · Oct 23, 2018 at 06:20 PM

this helping any:
https://forum.unity.com/threads/net-standard-2-0-support-is-completely-broken.519608/

Comment
Add comment · Show 1 · Share
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
avatar image OriginalsByToto · Oct 23, 2018 at 08:02 PM 0
Share

Just a little question, is there any open issue about this?

avatar image
0

Answer by hexagonius · Oct 23, 2018 at 06:20 PM

this helping any:
https://forum.unity.com/threads/net-standard-2-0-support-is-completely-broken.519608/

Comment
Add comment · Show 2 · Share
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
avatar image OriginalsByToto · Oct 23, 2018 at 07:15 PM 0
Share

Thank you, I didn't found this when I googled the problem. But there is no solution for me, and I hope that the new version will have a real patch for this. Could you post this as a reply, I would be able to accept it.

avatar image Vicarian OriginalsByToto · Oct 23, 2018 at 08:00 PM 0
Share

Converted Hexagonius's comment to answer.

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

95 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

Related Questions

Cross-Platform Development Restrictions 1 Answer

Check API Compatibility Level 2 Answers

Visual studios will not open Unity reference API in browser --> Error" Cant find program". How do i fix this error? 0 Answers

Must Change API for script to work? 0 Answers

How to use UnityWebRequest to upload a File via Invision REST API 0 Answers


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