• 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 Norair1997 · Feb 12, 2018 at 03:25 PM · c#system.netcompiler error

Type or Namespace 'Ports' does not exist in System.IO

My Unity3D Version: 2017.3.0f3 Personal

  1. I am communicating with my programm with a serial port. It works well in the Player Editor, using Unity. But when I want to compile it to deploy it to my HoloLens, it doesn't.

  2. I get the error message: The type or namespace name 'Ports' does not exist in the namespace 'System.IO' (are you missing an assembly reference?)

  3. I've tried so far:

Changed Configuration to .NET 2.0

Reimported the whole project

Downloaded and Added system.dll manually to the assets

I've searched almost the whole i-net, but nothing worked for me. I even looked on japanese/chinese website using google translator they always say the same (-> .NET 2.0)

I would be very grateful for your help!

Edit1: I tried also #if NETFX_CORE -mycode- #endif

Comment
Add comment · Show 1
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 LiamofElites · Feb 14, 2018 at 07:40 AM 0
Share

I'm sorry to hear that, I'm a local game person but I've also haven't found anything useful to help solve this problem with that you haven't mentioned. I think your best bet is to contact unity themselves unless someone else knows a way.

contact unity

2 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Zodiarc · Feb 14, 2018 at 08:06 AM

My guess is that it's not being added to the build. Try this: https://docs.unity3d.com/Manual/UsingDLL.html

Comment
Add comment · Show 5 · 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 Norair1997 · Feb 14, 2018 at 09:13 AM 0
Share

Thanks but it didn't help :/ I still get the errors

avatar image Zodiarc Norair1997 · Feb 14, 2018 at 11:58 AM 1
Share

Which platform are you building for? x86_64?

avatar image Norair1997 Zodiarc · Feb 14, 2018 at 12:50 PM 0
Share

Like mentioned in the question -> Hololens (UWP Application)

Show more comments
avatar image
0

Answer by samra2494 · Jun 10, 2020 at 08:01 AM

Go to Edit->projectsettings->Player->APIcompetibilityLevel = .Net4.x This worked for me.

Comment
Add comment · 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

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

76 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

Related Questions

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

C# 7 - Weird syntax cause error CS0118: "TypeName is a type but is used like a variable" 2 Answers

Open With... a Build Unity program 3 Answers

"Error Invalid option '6' for /langversion; must be ISO-1, ISO-2, 3, 4, 5 or Default" using .Net 4.6 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges