I am working on a game using the XNA infrastructure. There are several levels in my game that I store in a plain text file. In VS 2008, when I add a level file to the project and compile, the following error message appears.
Error 1: It is not possible to automatically determine which importer to use for "Levels \ 0.txt". Importers that process this type of file do not exist. Specify the importer who processes this type of file in your project. F: \ Projects \ BrickBreaker \ BrickBreaker \ Content \ Levels \ 0.txt BrickBreaker
The reason I do this is because if I change my levels and start the game, the level will not be updated. I found that the level is not updated, because VS launches the game from the bin \ debug folder, and since the level files are not included in the project, they are not copied when they are changed. I also found that the sample platform that comes with the framework includes level data in the project where I received the equipment.
So, should you use a different file format or just deal with the need to manually copy files to a new level?
Resolution. After I read the answers to this post, I found a solution. I added text files to the project and set the build property to none. The error does not occur during compilation, and the file is included in the project.
source share