Actually the file _cobol.dir is generated by the Visual Studio IDE when the build process is done so it makes no sense that you would get this same error when trying to compile from the command line unless you are running under msbuild.
The message about illegal command line is normally displayed if the product is not licensed properly.
If you open up the Micro Focus License Manager from the start menu and look at installed licenses what is displayed?
I would also suggest that you test the product by opening up one of the sample solutions in the Samples Browser and seeing if it compiles successfully. If it does then this tells us that the problem lies within your project file.
Thanks.