I tried to compile a example from Mono website:
http://docs.go-mono.com/?link=T%3aGtkSourceView.SourceView
I tried to use this command:
mcs -pkg:gtk-sharp-2.0,gtksourceview2-sharp task3.cs
I've got a errors:
task3.cs(17,3): error CS0246: The type or namespace name SourceLanguagesManager' could not be found. Are you missing an assembly reference?
task3.cs(20,29): error CS0841: A local variablemanager' cannot be used before it is declared
task3.cs(24,10): error CS1061: Type GtkSourceView.SourceBuffer' does not contain a definition forHighlight' and no extension method Highlight' of typeGtkSourceView.SourceBuffer' could be found. Are you missing an assembly reference?
How to compile this example on Ubuntu 14.04 LTS?
Related
I started to try Unity GNU/Linux version. I got a project in my job that was written in Unity Editor version 5.6.6f2 for Windows. I could open the project in Unity Editor version 2019.3.8f1 after Unit Hub converting it for this newer version.
I'm getting a series of building errors now. And many of them are related to TextMesh Pro Asset in scripts generated during the building. Like
Library/PackageCache/com.unity.textmeshpro#2.0.1/Scripts/Runtime/TMP_FontAsset.cs(405,34): error CS0029: Cannot implicitly convert type 'UnityEngine.TextCore.FaceInfo' to 'TMPro.FaceInfo'
Library/PackageCache/com.unity.textmeshpro#2.0.1/Scripts/Runtime/TMP_FontAssetUtilities.cs(302,82): error CS1061: 'FaceInfo' does not contain a definition for 'pointSize' and no accessible extension method 'pointSize' accepting a first argument of type 'FaceInfo' could be found (are you missing a using directive or an assembly reference?)
Library/PackageCache/com.unity.textmeshpro#2.0.1/Scripts/Runtime/TMP_FontAssetUtilities.cs(344,82): error CS1061: 'FaceInfo' does not contain a definition for 'pointSize' and no accessible extension method 'pointSize' accepting a first argument of type 'FaceInfo' could be found (are you missing a using directive or an assembly reference?)
Library/PackageCache/com.unity.textmeshpro#2.0.1/Scripts/Runtime/TMP_FontAsset.cs(612,84): error CS1061: 'FaceInfo' does not contain a definition for 'tabWidth' and no accessible extension method 'tabWidth' accepting a first argument of type 'FaceInfo' could be found (are you missing a using directive or an assembly reference?)
Library/PackageCache/com.unity.textmeshpro#2.0.1/Scripts/Runtime/TMP_FontAsset.cs(649,28): error CS1061: 'FaceInfo' does not contain a definition for 'capLine' and no accessible extension method 'capLine' accepting a first argument of type 'FaceInfo' could be found (are you missing a using directive or an assembly reference?)
Library/PackageCache/com.unity.textmeshpro#2.0.1/Scripts/Runtime/TMP_FontAsset.cs(652,28): error CS1061: 'FaceInfo' does not contain a definition for 'capLine' and no accessible extension method 'capLine' accepting a first argument of type 'FaceInfo' could be found (are you missing a using directive or an assembly reference?)
There's a log file, Logs/Packages-Update.log, that I suppose is related to the updates made when converting the project from 5.6.6f2 version to 2019.3.8f1 version. The content of that file is
Packages were changed.
Update Mode: resetToDefaultDependencies
The following packages were added:
com.unity.collab-proxy#1.2.16
com.unity.ide.rider#1.1.4
com.unity.ide.vscode#1.1.4
com.unity.modules.ai#1.0.0
com.unity.modules.androidjni#1.0.0
com.unity.modules.animation#1.0.0
com.unity.modules.assetbundle#1.0.0
com.unity.modules.audio#1.0.0
com.unity.modules.cloth#1.0.0
com.unity.modules.director#1.0.0
com.unity.modules.imageconversion#1.0.0
com.unity.modules.imgui#1.0.0
com.unity.modules.jsonserialize#1.0.0
com.unity.modules.particlesystem#1.0.0
com.unity.modules.physics#1.0.0
com.unity.modules.physics2d#1.0.0
com.unity.modules.screencapture#1.0.0
com.unity.modules.terrain#1.0.0
com.unity.modules.terrainphysics#1.0.0
com.unity.modules.tilemap#1.0.0
com.unity.modules.ui#1.0.0
com.unity.modules.uielements#1.0.0
com.unity.modules.umbra#1.0.0
com.unity.modules.unityanalytics#1.0.0
com.unity.modules.unitywebrequest#1.0.0
com.unity.modules.unitywebrequestassetbundle#1.0.0
com.unity.modules.unitywebrequestaudio#1.0.0
com.unity.modules.unitywebrequesttexture#1.0.0
com.unity.modules.unitywebrequestwww#1.0.0
com.unity.modules.vehicles#1.0.0
com.unity.modules.video#1.0.0
com.unity.modules.vr#1.0.0
com.unity.modules.wind#1.0.0
com.unity.modules.xr#1.0.0
com.unity.test-framework#1.1.13
com.unity.textmeshpro#2.0.1
com.unity.timeline#1.2.14
com.unity.ugui#1.0.0
See the com.unity.textmeshpro#2.0.1 line in that.
I'm totally new to Unity and I don't use Windows. So I'm wondering if that have something related to C# scripting (like libraries that I have to install in Debian to properly compile a project), or if the errors are specific to TextMesh Pro asset etc.
If anyone have had this type of error or can give me tips to make Unity works in a Debian GNU/Linux environment...
Delete the old version of TextMesh Pro in the Asset folder
Reopen Project
Window -> TextMeshPro -> Import TMP essentials
Window -> TextMeshPro -> Project Files GUID Remapping Tool.
Scan & Save.
This will update the project and fix all missing TMP scripts.
I'm using mono on macOS and trying to compile this C# code: https://gist.github.com/bneg/bf8c05664324e3efeb1fb05902152a20
with following command:
mcs Program.cs
It produces following error:
Program.cs(4,14): error CS0234: The type or namespace name `Management' does not exist in the namespace `System'. Are you missing an assembly reference?
Program.cs(5,14): error CS0234: The type or namespace name `Management' does not exist in the namespace `System'. Are you missing an assembly reference?
I also tried it with following command:
mcs -pkg:dotnet Program.cs
I got this error:
Program.cs(17,25): error CS0234: The type or namespace name `Automation' does not exist in the namespace `System.Management'. Are you missing an assembly reference?
Program.cs(18,25): error CS0234: The type or namespace name `Automation' does not exist in the namespace `System.Management'. Are you missing an assembly reference?
What changes should be made in order to compile it?
I'm not sure if you can run powershell like that via mono on mac os.
As a minimum you would need to reference something like this:
https://www.nuget.org/packages/System.Management.Automation
But this is not guaranteed to be working if you do not have powershell installed. And since powershell on linux (sic!) can only run on .net core, chances are, you cannot get what you are trying to accomplish.
I'm trying to build a project in Mono (v4.4.1) that makes use of the System.Diagnostics.Tracing dll but I continually run into build errors:
/usr/lib/mono/4.5/Microsoft.CSharp.targets (CoreCompile target) ->
Context/TplFrameworkListenerBase.cs(12,54): error CS0246: The type or namespace name `EventListener' could not be found. Are you missing an assembly reference?
Context/TplFrameworkListenerBase.cs(52,40): error CS0115: `FastTrack.Context.TplFrameworkListenerBase.OnEventSourceCreated(System.Diagnostics.Tracing.EventSource)' is marked as an override but no suitable method found to override
Context/TplFrameworkListenerBase.cs(114,55): error CS0246: The type or namespace name `EventWrittenEventArgs' could not be found. Are you missing an assembly reference?
Context/TplFrameworkListenerBase.cs(142,31): error CS0246: The type or namespace name `EventWrittenEventArgs' could not be found. Are you missing an assembly reference?
Context/TplFrameworkListenerBase.cs(147,69): error CS0246: The type or namespace name `EventWrittenEventArgs' could not be found. Are you missing an assembly reference?
I've tried also adding the nuget package as well as manually adding a reference to System.Diagnostics.Tracing.dll and including the dll in the repo. When I manually add the reference it says I have two of the same references included in the project and won't build. Is there a way to get this working or are these properties just not implemented in the newest version of mono?
I am using the following code to send automatic mails: http://www.independentsoft.com/webdavex/tutorial/sendmessage.html
However I am getting error CS0246 on the Independentsoft commands.
I have done the following:
Copied Independentsoft.Webdav.Exchange.dll file in the same folder
Used the command to generate the tlb file
regasm.exe Independentsoft.Webdav.Exchange.dll /tlb:Independentsoft.Webdav.Exchange.tlb
The output :
Types registered successfully
Assembly exported to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Independents
oft.Webdav.Exchange.tlb', and the type library was registered successfully
I am still getting the CS0246 error:
protocoltest.cs(3,7): error CS0246: The type or namespace name 'Independentsoft' could not be found (are you missing a using directive or an assembly reference?)
protocoltest.cs(4,7): error CS0246: The type or namespace name 'Independentsoft' could not be found (are you missing a using directive or an assembly reference?)
So I tried this:
csc protocoltest.cs /r:Independentsoft.Webdav.Exchange.dll
Compilation is done...!
I am now getting error while running:
System.Net.WebException: The remote server returned an error: (440) Login Timeout.
at System.Net.HttpWebRequest.GetResponse()
at Independentsoft.Webdav.Exchange.Resource.a(String A_0, PropertyName[] A_1)
at Independentsoft.Webdav.Exchange.Resource.d(String A_0)
at Independentsoft.Webdav.Exchange.Resource.get_Mailbox()
at Independentsoft.Webdav.Exchange.Resource.SendMessage(Message message)
at Sample.Program.Main(String[] args)_
Can you advise? I do not have Visual Studio.
I'm running MonoDevelop with MonoTouch and am trying to target a device (i.e. Debug|iPhone) when building the code. However when I do that the compiler throws a bunch of errors referring to missing assemblies.
If I build to target a simulator these errors don't show up, I know I have the assemblies included and even the IDE 'sees' the assemblies and autocompletes namespaces in these assemblies as I type them out.
Any ideas what could be causing it? I've already tried fresh rebuilds...
I updated from a trial version of MonoTouch if that makes any difference.
Here are some of the errors (they're all this sort of error):
/Users/ahmedhakeem/Documents/Projects/iOS/MyCode/Engine/Util/UI/MenuObj.cs(31,31): Error CS0234: The type or namespace name `Audio' does not exist in the namespace `Microsoft.Xna.Framework'. Are you missing an assembly reference? (CS0234) (Engine-MonoTouch)
/Users/ahmedhakeem/Documents/Projects/iOS/MyCode/Engine/Util/UI/MenuObj.cs(31,31): Error CS0234: The type or namespace name `Media' does not exist in the namespace `Microsoft.Xna.Framework'. Are you missing an assembly reference? (CS0234) (Engine-MonoTouch)
/Users/ahmedhakeem/Documents/Projects/iOS/MyCode/Engine/JabJect.cs(40,40): Error CS0246: The type or namespace name `ContentManager' could not be found. Are you missing a using directive or an assembly reference? (CS0246) (Engine-MonoTouch)
/Users/ahmedhakeem/Documents/Projects/iOS/MyCode/Engine/Media/Sprite.cs(31,31): Error CS0234: The type or namespace name `Audio' does not exist in the namespace `Microsoft.Xna.Framework'. Are you missing an assembly reference? (CS0234) (Engine-MonoTouch)
/Users/ahmedhakeem/Documents/Projects/iOS/MyCode/Engine/Scene/GameScene.cs(42,42): Error CS0246: The type or namespace name `ContentManager' could not be found. Are you missing a using directive or an assembly reference? (CS0246) (Engine-MonoTouch)
If you're using MT 4.x then there were some races when the assemblies were compiled into native code. However the errors from your description looks to be from compiling managed code (and that's not done in parallel so there should not be any race condition affecting that part of the build).
That would make it (sometimes) skip an assembly at link time, leading to (hard to reproduce) build errors. This will be fixed in the next release of MonoTouch.
This never happens on the simulator since there's no AOT (compile to native) occurring in that case (i.e. the JIT is used).