Namespace name "Device" does not exist in the namespace - c#

I have a problem using System.Device and can't find a solution
I'm developing a software and want to get the position of the device. By referencing the .NET Framework I want to use the GeoCoordinateWatcher.
In my code I included System.Device.Location and added two packages to the project (GeoCoordinate and System.Device.Location.Portable). While running and debugging the code in monodevelop no error occurs, but when I compile the code with mcs the error mentioned in the title occurs:
Namespace name "Device" does not exist in the namespace
Im using a RasPi for coding and compiling.
Any idea what the problem is?

System.Device is not supported by Mono:
https://github.com/mono/mono/tree/master/mcs/class

Related

Error importing UnityEngine.Experimental.Director

Today I was searching internet for Unity Runtime Level Editor and i found GILES. I imported it and set API Compatibility Level to .NET 2.0, but I canĀ“t solve this error:
Assets/GILES/Settings/pb_Config.cs(75,36): error CS0234: The type or namespace name Director does not exist in the namespace UnityEngine.Experimental. Are you missing an assembly reference?
This error appear in this piece of code:
typeof(UnityEngine.Experimental.Director.DirectorPlayer),
Here is full source of this file on GitHub.
I am using Unity version 2017.1.0f3. Is there any way to fix it? What I am missing?
UPDATE:
I searched in actual Unity documentation and it seems that UnityEngine.Experimental.Director was removed. Is there any alternative or way to use it in new Unity?
I think it is now UnityEngine.Playables.PlayableDirector

how to solve the type and namespace could not be found

I am trying to make a cross platform application using MONO. i developed the project into c#(windows) and I want to run that project into Linux. For that purpose i am using MONO.But when i am running my project then I am getting error that the type and namespace could not be found.Actually I have created two partition of the project ,one is main function and other is the rest of the logic.And to access the other functionality i am using the namespace.but when i am running i am getting error
Here is the line where i am getting error in line 2 and 3
You need to pass the referenced assembly path using -pkg switch. I think you did not reference VehicleRoutPlannerCore dll while compiling.
Please refer to http://linux.die.net/man/1/mcs
you should invoke it like
mcs -pkg:path-to-VehicleRoutPlannerCore-assembly VehicleRoutingConsole.cs

Why am I getting the following error when compiling this assembly?

I'm attempting to use the following command line command to compile an assembly of the code from my project:
C:/"Program Files"/Unity/Editor/Data/Mono/bin/gmcs
-target:library -out:C:/Users/Austin/Desktop/PixelExpanse.dll
-recurse:C:/Users/Austin/Desktop/Projects/Repos/trunk/PixelExpanse/SpaceColonyRefactor/Assets/Source/*.cs
-d:RUNTIME -r:C:/"Program Files"/Unity/Editor/Data/Managed/UnityEngine.dll
As you can see, I am, I believe, correctly referencing the UnityEngine.dll.
The code that would be compiled contains references to UnityEngine.UI and UnityEngine.EventSystems. But when I run the above command, I get the following compile error:
error CS0234: The type or namespace name 'EventSystems' does not exist in the namespace 'UnityEngine'. Are you missing an assembly reference?
From what I have been able to find through googling, it SEEMS like an error people were getting when using a pre-4.6 assembly, because thats when EventSystems and UI were both introduced. But I don't know how I could be missing that in the dll I'm referencing as Unity 5 is the only version that has ever touched this computer.
As a side note, I have posted this question to Unity Answers and have yet to receive a response. I expect it's because assembly compilation is beyond the scope of what most users there choose to undertake. Hence my asking it here.
The namespace UnityEngine.EventSystems actually appears in UnityEngine.UI.dll and not UnityEngine.dll so it seems you need to reference the former too when compiling manually from the command-line. Unity projects have this by default (see below).
This is verified by opening up the assembly in your reflector tool of choice, here I am using JetBrains dotPeek:
This is how my test project appears with default Unity references. Note that by default a reference to UnityEngine.UI already appears in the Unity-created project:
When I built my Windnows desktop app via Unity, the above dlls appeared in:
<drive>:<projectOutFolder>\<projectName>_Data\Managed
You can try:
right click on "project panel", and after "Reimport All".
It's can be happen due to switch between platforms, e.g. IOS, or Desktop.. thus, folrders are deleted by became unecessary..
Solve for me: Unity 5.2, Win 7, 32bits;
Good luck!
I checked the UnityEngine.dll and the Eventsystems/UI namespace is not included. Despite, there is a dll in Unity5\Editor\Data\UnityExtensions\Unity\GUISystem\UnityEngine.UI.dll which includes these namespaces.
For mac, it's /Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll.

How can I use Mono.Unix on Linux?

I have a C# app originally written in Windows that I'm now running in Linux on MonoDevelop. It works fine but now I need to recognise symbolic links. I found this answer but when I add:
using Mono.Unix;
I get the error "The type or namespace name 'Unix' does not exist in the namespace 'Mono'. Are you missing an assembly reference (CS0234)?"
You need to do what the error message says. Unintuitively, Mono.Unix lives in Mono.Posix.dll, so you need to add that as reference.

MonoDevelop project build fails with 'The type or namespace 'GDK' could not be found

'...are you missing a using directive or an assembly reference?'
I tried the solution in this question Gtk# in monodevelop not working anymore after upgrading to ubuntu 11.10 unity but appears to not work here.
I am running on Mtn Lion with lastest MonoFramework 2.10.10 and MonoDevelop 3.1.1
Any suggestions to get build going? Thanks.
The error message says exactly what you need to do.
Add reference to Gtk# assembly if no one.
Add using Gtk; to your code.

Categories