Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Noob_At_Unity3D · Nov 02, 2013 at 08:54 PM · reference assemblies

I need to use the System.IO.Package namespace but keep getting complaints from Unity3D.

I am attempting to use the System.IO.Package namespace in my project (there's a good reason for needing it, but I'm not allowed to explain the details about it here). I've added a .Net reference to WindowsBase.dll (C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\.NETFramework\\v4.5\\WindowsBase.dll). The only thing I added to the default stubbed code is a using statement for System.IO.Packaging:

using System.IO.Packaging;

So, after adding the WindowsBase.dll assembly reference, MonoDevelop builds fine - no errors. But upon returning to the Unity3D window, Unity continues to report a build error: "error CS0234: The type or namespace name Packaging' does not exist in the namespace System.IO'. Are you missing an assembly reference?". I am quite new at all this, and have Googled this to no end and reached no joy. I need some help from someone to understand if it is at all possible to use the System.IO.Package namespace, or if someone has an idea for a workaround. My end goal is to use Open Packaging Conventions to handle OPC packages of specialized, custom data.

Anyone have any thoughts or ideas about how to leverage/use OPC in a Unity project?

Any help would be appreciated! Thx.

Warmest Regards, Scott

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 Noob_At_Unity3D · Nov 03, 2013 at 03:49 AM 0
Share

Please, does anyone have a suggestion? Has anyone ever had to add some kind of .Net assembly reference like this to their C# $$anonymous$$onoDevelop session and has had success with it?

Please, I've run out of ideas and could use some great $$anonymous$$ds to help me out. It would be much appreciated!

2 Replies

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

Answer by Dracorat · Nov 03, 2013 at 04:34 PM

Unity runs on the .Net 2.0 framework and the namespace you want runs on 3.0 and higher. You can't import it - it's not possible.

You'll have to find a third party .Net 2.0 compatible library instead.

If you are just unzipping some basic .zip formats, you can use this namespace: System.IO.Compression.GZipStream

But if they get complex, it'll fail. In that event, you'll have to find a third party solution.

Comment
Add comment · Show 3 · 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 Noob_At_Unity3D · Nov 03, 2013 at 05:11 PM 0
Share

Thanks Dracorat. Pretty much the conclusion I was co$$anonymous$$g to also. Do you think Unity3D will move to a .Net version > 2.0 anytime soon?

I might also explore using the OpenX$$anonymous$$L JavaScript API, or see if there are some Boo libs out there that I could hack a solution out of. I have no clue if those are even an viable options, but guess I should check them out to make sure.

Thanks Dracorat for spending some of your time answering my question. Your suggestions are very much appreciated.

avatar image Dracorat · Nov 03, 2013 at 05:23 PM 0
Share

I think people will have to show a real desire for it before they do. You should drop a comment in their inbox. (Use the feedback link above) That way you add one "vote" to the tally.

avatar image quincyddd · Aug 26, 2014 at 10:31 AM 0
Share

I was wondering if you were able to use an OpenX$$anonymous$$L SD$$anonymous$$ with Unity. I am trying to do the same thing. Thanks!

avatar image
0

Answer by DaveA · Nov 03, 2013 at 03:55 AM

Edit/Project Settings/Player, Other Settings, change '.Net 2.0 Subset' to '.Net 2.0'

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 Noob_At_Unity3D · Nov 03, 2013 at 03:46 PM 0
Share

Thanks for the suggestion DaveA. I changed that setting as you said, but unfortunately I'm still getting the same result. I was really hopeful that would fix it, but it seems it didn't. Thanks again for the suggestion though. I thought I had dug all through the settings but still managed to overlook that one somehow. I wish the change from subset to full would have fixed it though. $$anonymous$$aybe it's a version issue? WindowsBase doesn't come in anything earlier than .Net 3, as far as I can tell, but like I said ... I'm the least knowledgeable person on the planet when it comes to all this stuff.

Anyway, thanks for trying to help me out.

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

17 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

Related Questions

HashTable could not be found 1 Answer

Pragma downcast on getcomponentsinchildren 1 Answer

Swap code with DLL, component reference lost 0 Answers

How to keep helper classes with missing reference in project? 0 Answers

Missing Component Error 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