Visual studio for compile

Hello, i had some trouble with boo and mono so i took an advice in the forum to install visual studio.

Now when i compile my file with vs its working perfectly however when i click on the start play button on unity it throws again mono bug related errors.

test.boo

import sys
sys.path.append(UnityEngine.Application.dataPath)
import pytest
pytest.tester()

gives

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 :0 

  at Mono.CSharp.RootNamespace.ComputeNamespaces (System.Reflection.Assembly assembly, System.Type extensionType) [0x00000] in :0 

  at Mono.CSharp.RootNamespace.ComputeNamespace (Mono.CSharp.CompilerContext ctx, System.Type extensionType) [0x00000] in :0 

  at Mono.CSharp.GlobalRootNamespace.ComputeNamespaces (Mono.CSharp.CompilerContext ctx) [0x00000] in :0 

  at Mono.CSharp.Driver.LoadReferences () [0x00000] in :0 

  at Mono.CSharp.Driver.Compile () [0x00000] in :0 

  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in :0 

and

Assets/test.boo(3,1): BCE0044: expecting "EOF", found 'import'.

Now i heard too much bad about your mono version i would rather replace it altogether than debugging it.

Hey,

You need to use this.

Also make very sure you have the correct version of VS (Visual Studio Community 2013, the free one) because I had the wrong one too and it was not working.

When you’ve installed it, just need to import the little asset that comes with it and click “Generate Project Files” for it to work with that specific project, but you will never have other problems and debugging works perfectly

(Unsupported opinion: VS is endlessly better than Mono)

EDIT:

I just read on the site that they advertise it with VS2015. It wasn’t available when I got it some time back but if it works with 2015 you should just go for that I guess.

Another alternative… I hate the mono editor too, so I use Visual Studio to edit my code, but I don’t compile it there, I let Unity do so. You can’t click directly to the errors that way, but it just works with no extra setup steps.

Hey there,

Are you making a dll or just editing the code for Unity?

If you are not making a dll (a standalone library) you do not build the project ever. Unity does this for you behind the scenes and takes some special steps to do this.

Cheers,