Reputation: 171
I am getting the following compilation errors from Microsoft Visual Basic 2010 Express on the first line of my code:
Error 1 Newline in constant C:\tc\dotnet\dev\src\vb\main\test\Helper.vb 1 1 Component Sources
Error 2 Too many characters in character literal C:\tc\dotnet\dev\src\vb\main\Rtest\Helper.vb 1 1 Component Sources
The first line of my code is simply:
' Copyright 2011
It is generating the same compilation error for all my comments. Does anyone know why MS VB Express 2010 is acting this weird? Comments in visual basic are supposed to start with a single apostrophe so I don't understand this weird behavior.
Upvotes: 2
Views: 1060
Reputation: 171
I've found the problem. The project being loaded was using msbuild to load the targets from a .targets file. The targets file had this:
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
I changed that line to the following:
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.Targets" />
And that solved the problem.
Upvotes: 3