Open coollambda opened 6 years ago
So I opened up a Unity script in GVim 8.0 and got the following error
"Assets\Scripts\MapGenerator.cs" 156L, 3615C Error detected while processing C:\Users\bulkycaf\.vim\plugged\vim-csharp\compiler\msbuild.vim: line 33: E518: Unknown option: Cave
which happens in the last line in the following code
execute 'CompilerSet makeprg=' . cs#get_net_compiler("msbuild") . "\\ " \ . "/nologo\\ /clp:Verbosity=quiet\\ /property:GenerateFullPaths=true\\ " \ . s:build_file
so I echoed the s:build_file variable and it was .\Procedural Cave Generation - Tutorial.sln and so I fixed it by escaping the file name with fnameescape Vim function
.\Procedural Cave Generation - Tutorial.sln
fnameescape
execute 'CompilerSet makeprg=' . cs#get_net_compiler("msbuild") . "\\ " \ . "/nologo\\ /clp:Verbosity=quiet\\ /property:GenerateFullPaths=true\\ " \ . fnameescape(s:build_file)
and now it works fine!
+1 for inclusion in the repo! It helped me as well.
So I opened up a Unity script in GVim 8.0 and got the following error
which happens in the last line in the following code
so I echoed the s:build_file variable and it was
.\Procedural Cave Generation - Tutorial.sln
and so I fixed it by escaping the file name withfnameescape
Vim functionand now it works fine!