I have enabled Unity C# Projects in the Build Settings, when I attempt to deploy in Visual Studio, I get a bunch of errors stating that script ‘._ScriptName.cs’ is a binary file instead of a text file. The build fails. Is this the recommended way to debug Windows Store builds? How do I fix the errors?
Does that script name start with a dot? Can you paste the whole VS output?
You can debug even without using C# projects - just open the individual files (without adding them to the project) and place breakpoints there directly.
It would help if you pasted the errors themselves.
Though the first thing to do is a clean build from Unity to an empty directory.
You don’t need C# projects to be able to debug, you can simply drag&drop script file into Visual Studio and set breakpoints in it.
I’ve attached the VS console log.
None of my scripts start with a dot, it seems VS is adding that automatically.
In terms of debugging without C# projects enabled, I’m unclear as to how this is done, can this process be clarified some?
3024868–226087–windows build error.txt (74.4 KB)
I have a suspicion… could you enable “Show hidden files” in your project and see whether you indeed don’t have those files that start with a dot?
Where is that setting located?
Ah, so it seems I do have many scripts with ._ prefix in my Unity pjt, though they did not show up in Unity only via the technique you showed. Did Unity generate them? I am using a custom Version Control solution, maybe it is the culprit. I will have to investigate.
Also, how do you debug a WSA project in Visual Studio with Unity C# Projects disabled in the Build Settings?
Like this: https://oc.unity3d.com/index.php/s/kyuaFPNqc33VgCU
And unity does not generate those files.
I followed the video, the breakpoint does not work though (see attachment). When I hover my mouse over the breakpoint, the tooltip reads:
“The breakpoint will not currently be hit. No symbols have been loaded for this document”.

Does the same thing happen if you place a breakpoint on every single line of your function? I wonder if it has something to do with the code optimizer.
Did you track down where those “dot” files came from? Did deleting them solve the issue with C# projects?
I tried it at a different line and got the same result.
I found an article that talked about these files, and how they are a part of the Mac operating system. It says that the ._ files appear as one file on Mac OS, but not so on other operating systems. Here is the article that explains them:
https://www.cnet.com/news/invisible-files-with-prefix-are-created-on-some-shared-volumes-and-external-disks/
Does anyone have experience with ._ files and how to deal with them in VS? Maybe Visual Studio has a way to ignore them?
Did you add these files to your source control? You shouldn’t really. Removing them should be the right fix.
I’m not using typical source control. I am using a simple app that essentially, copies the project from one computer to another. It is in the process of copying from my mac to PC where it seems the files are getting generated. When I copy back to mac the files are gone.
I just tried debugging an empty pjt and no luck. Same problem as mentioned above. Any ideas of what I can do to fix? I am using Script Inspector to edit my scripts, do I have to use Visual Studio as my IDE?
You shouldn’t have to, that’s weird. I’ll look into possible solutions tomorrow.
Try sticking this onto one of your scripts:
[assembly:smile:ebuggable(true, true)];
That should force disable JIT optimizations and allow debugging to work.
That code is causing a compilation error: error CS1525: Unexpected symbol `;’
