Search code examples
msbuildvisual-studio-2019

Cannot build Vb.Net project with no Vb source code files


Error BC2008 no input sources specified

I have same problem as in this question:

"No input sources specified"

Except I'm upgrading from VS2013 to VS2019. It seems that it is no longer possible to have a VB class library project containing no Vb Source code files. The accepted answer seems like a bit of a hack (just include a dummy source code file for it to play with).

I am sure there must be a better solution. Perhaps some way to amend the project file so that I can include 'content' files but without actually having anything that needs compiling?

Any suggestions appreciated.


Solution

  • This can be fixed by adding a title in the application settings for the project. This creates the AssemblyInfo.Vb file which seems to be enough to get rid of the error but doesn't cause a dll to be produced.

    I still think there might be a better solution using a different type of project file that allows 'content files' organised into folders but that doesn't expect to have to compile any code. So if anyone knows how to do that please add it as an answer.