- Home /
Building win32 application of unity3d failes with teamcity plugin
I have a unity3d project using imported csv-files. I can build it on local pc without any problem. When I try to build it with the plugin for teamcity, i get this error:
Type
System.IO.DirectoryInfo' does not contain a definition for
GetFiles' and no extension methodGetFiles' of type
System.IO.DirectoryInfo' could be found (are you missing a using directive or an assembly reference?)
System.IO.File' does not contain a definition for
ReadAllText'
I tried to copy some csv-files on the server in the certain file before building unity, but the build failed again. I use a Windows-Server, of course.
Thx for your help in advance!
Answer by ricardo_arango · Nov 24, 2016 at 10:34 PM
My guess would be that you are using Unity 5.3 or older and that your build target is set to WebPlayer. Because of that Unity is using a limited version of mono which does not include access to Files.
To test if this is your issue, you can test by switching the Editor to the WebPlayer build target on your local PC. If you see the same errors, it's very likely that this is the problem.
To fix it you need to pass the BuildTarget.StandaloneWindows target to the BuildPipeline.BuildPlayer function when making your build.
https://docs.unity3d.com/ScriptReference/BuildPipeline.BuildPlayer.html
Your answer
Follow this Question
Related Questions
Using 32-bit plugins in Unity 5 1 Answer
How do I implement In-App purchases for Windows/Windows Phone? 2 Answers
UI Canvas not visible (but is active) in 32 bit windows build, but is visible in 64 bit build 1 Answer
Storekit for games build for websites 2 Answers
Problems with 64-bit systems 0 Answers