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 IPI · Jun 12, 2013 at 07:30 PM · .netassemblyargumentexceptionlog4net

(Solved) ArgumentException - Assembly System.web is referenced by log4net

I am trying to export my project for web and now getting the following error. I am running Unity Pro (4.1.5f1) on Mac.

Googled the issue, looked around the forum but couldn't find a practical solution. There is a similar question i found but wasn't helpful.

Build issue not finding .NET libraries and the suggested solution was

Any and all libraries that are .Net that you want to have with your project that Unity doesn't know about, simply place them in your Assets folder somewhere on some level, maybe Resources, however, that doesn't mean it will be allowed to be used even if it does exist, especially for the web player.

I don't know about the .Net libraries. I am using Mac and making use of Unity's default .Net libs.

Any help is greatly appreciated.

 ArgumentException: The Assembly System.Web is referenced by log4net. But the dll is not allowed to be included or could not be found.
 UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache, BuildTarget target)
 UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache, BuildTarget target)
 UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache, BuildTarget target)
 UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache, BuildTarget target)
 UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, BuildTarget target)
 UnityEditor.HostView:OnGUI()


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

3 Replies

· Add your reply
  • Sort: 
avatar image
5

Answer by Varaughe · Dec 06, 2016 at 05:25 AM

Have you tried out , in PlayerSettings , Api Compatibility Level , to switch to .Net 2.0 (instead of .Net 2.0 Subset) ?

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 Jeremy_35 · Aug 28, 2018 at 08:14 AM 0
Share

It worked for me!

avatar image
1

Answer by Graham-Dunnett · Jun 12, 2013 at 08:04 PM

When you build for a webplayer, there is a restriction on what Mono .Net DLLs are allowed to be included. There is a very long, slow to load html page here that tells you what is, and isn't supported. System.Web is shown at the very bottom of this page, and it's documented as not supported. Your game may not be using this directly, however, the build process has found that log4net uses System.Web features. If you don't know that you are using log4net then life might get complicated. If you are using this, then simply use platform conditional compilation, and don't use log4net when building for the web.

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 IPI · Jun 12, 2013 at 08:11 PM 0
Share

Thank you Graham for your reply. $$anonymous$$akes sense now. I think the issue is that I am using WWW for a browse functionality within my application. To look up a texture file selected by the user.

This most likely is the problem. I would like the user to be able to browse, grab a texture from local files. How would I address this issue?

I can't build it to a $$anonymous$$ac application either it gives out the same problem. So I need to go around the browse functionality somehow.

avatar image IPI · Jun 12, 2013 at 09:52 PM 0
Share

Update ... It did not have anything to do with WWW. See my answer for final solution.

avatar image
0

Answer by IPI · Jun 12, 2013 at 09:52 PM

Got it working finally... Yaaay!

So for people who might get across this.

Graham was right, it was log4net problem. I had a asset resource (plugin) that was using log4net. I removed it from my solution. I wasn't even using it. I imported it to test for something.

The plugin in my case was MotionKit. It doesn't work on Mac either.

Anyways one way you could fine this is to search for log4net in your whole solution and see where it is. Fine the relevant source code and deal with it accordingly.

Hope this helps, Ash

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 Ziplock9000 · Feb 18, 2016 at 02:51 AM 0
Share

That's like removing your leg because you have issues putting your socks on lol

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

18 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

Related Questions

unity is not creating build on .NET 2.0 SUBNET and getting ArgumentException. 1 Answer

Visual Studio 2010 Professional, Missing System.Web assembly reference 0 Answers

Can I use .NET 4.5 assembly as external library? 1 Answer

XML Deserializer from xml from a web server 0 Answers

BindingList could not be found? 2 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