- Home /
AWS SDK - The namespace 'Amazon' could not be found
I feel like I'm doing something obviously wrong but I can't figure it out. I'm trying to get the AWS SDK working with unity to use DynamoDB.
I've grabbed the AWSSDK.dll (net35, from the .msi installer) and throw it into my assets folder, but I get this error:
Internal compiler error. See the console log for more information. output was:
Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0
at Mono.CSharp.RootNamespace.ComputeNamespaces (System.Reflection.Assembly assembly, System.Type extensionType) [0x00000] in <filename unknown>:0
at Mono.CSharp.RootNamespace.ComputeNamespace (Mono.CSharp.CompilerContext ctx, System.Type extensionType) [0x00000] in <filename unknown>:0
at Mono.CSharp.GlobalRootNamespace.ComputeNamespaces (Mono.CSharp.CompilerContext ctx) [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.LoadReferences () [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0
Ok, well that doesn't work. I delete the dll from the assets folder. What if I try to simply add a reference to the dll in my VS project? I can add the dll with no problems, and even code completion on the Amazon classes, but as soon as I add any code (using Amazon.DynamoDBv2;) and jump back to unity I get this:
Assets/Scripts/DBManager.cs(3,7): error CS0246: The type or namespace name `Amazon' could not be found. Are you missing a using directive or an assembly reference?
I don't understand. I'm I doing something wrong? It seems like it should be an easy solution...
Thanks!
Answer by DMeville · Aug 24, 2014 at 05:34 AM
Changing Edit > Project Settings > Player Settings > Other > Api Compatibility Level to .Net 2.0 rather than .Net 2.0 Subset seems to make the Internal Compiler error go away. Seems like this fixes the issues.
Answer by supernat · Aug 23, 2014 at 07:38 AM
Your DLL has to go in the Plugins folder under Assets. Also, this will only work for a windows platform. See here for more info: http://docs.unity3d.com/Manual/PluginsForDesktop.html
$$anonymous$$y understanding is that is only for DLL's of native code, and since I downloaded the .net (C#) AWSSD$$anonymous$$.dll it wouldn't be considered a plugin. Is this not the case?
And when you say this will only work on windows, does that mean:
Only window builds of the project will work without errors?
This will only work in Windows versions of the Unity Editor?
I am using Parallels to run VS, while running Unity on OSX so perhaps that's causing some platform specific issues or something, like you suggested.
Thanks for the help!
Your answer
Follow this Question
Related Questions
Amazon Web Services inside Unity Webplayer 0 Answers
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers
AssetPostprocessor (in dll) doesn't work when there's a compiler error in another script 0 Answers
'EventSystems' does not exist in the namespace 'UnityEngine'... 1 Answer