I have a database project (.dbp) open in Visual Studio 2008 as part of a solution. I've added a new sql script to the project. When I try to save the database project so that I can check it in, VS shows me a dialog:
Some Unicode characters in this file could not be saved. To save all the information in this file, use 'Save As'; and select a Unicode encoding.
If I try to use "Save As.." I get exactly the same dialog.
I'm not very familiar with .dbp files, but I have opened the file in Notepad2 and re-encoded it. VS will reload the project but when I try check in the changes, VS says I need to save the file, and if I do, I once again get the above mentioned dialog.
Interestingly, I have no file association with the dbp file, but VS somehow mysteriously knows what to do with it in the context of a solution. Yet y开发者_如何学编程ou can't open the dbp with VS on it's own. That broke my brain a little bit.
So I'm at a loss and going around in circles. If anybody can help, I'd appreciate it.
Not sure I know why this might have happened but it might be worth getting the previous version of the dbp file from source control and diffing the 2 to see if you can work out what's changed.
This is what I had to do to get around the problem, as there doesn't seem to be a fix that I can create, or find:
Edit the dbp file in an alternative text editor. Add a text entry for the entity that you want to add to the project. For example, to add a script called "Create users table.sql" to the "Changes" folder:
# Microsoft Developer Studio Project File - Database Project
Begin DataProject = "Database Project"
MSDTVersion = "80"
SccProjectName = "SAK"
SccLocalPath = "SAK"
SccAuxPath = "SAK"
SccProvider = "SAK"
Begin Folder = "Changes"
Script = "Create users table.sql"
End
End
Save the .dbp file and reload the project in Visual Studio.
精彩评论