Got an issue with an upgraded project from VS.NET 2003. As it is migrated from an old project, it uses the old DataAdapter / SqlCommand / DataGrid way of doing things. It works fine in 2005, but on some pages, when you edit an SqlCommand for example, all the SQL strings are moved from the codebehind to a resx file automatically by VS.NET 2005. It's not practical to rewrite all the old code, but it occasionally needs fixes, and it's no fun going through all the time and manually copying all the strings in the resx files back to the code behind every time. I would go so far as to claim this is a bug in VS.NET 2005. Anybody seen this or know how to fix it? Details below.
In the code behind, Instead of
this.sqlSelectCommand5.CommandText = "SELECT * FROM whatever";
VS.NET 2005 changes it to
this.sqlSelectCommand5.CommandText = resources.GetString("sqlSelectCommand5.CommandText");
And when you run the page you get
"Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "SDTR.reconcile_month.resources" was correctly embedded or linked into assembly "App_Web_gjoeff4z" at compile time, or that all the satellite assemblies required are loadable and fully signed."
With the stack trace
"[MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "SDTR.reconcile_month.resources" was correctly embedded or linked into assembly "App_Web_gjoeff4z" at compile time, or that all the satellite assemblies required are loadable and fully signed.]
System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) +655
System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) +681
System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) +681
System.Resources.ResourceManager.GetString(String name, CultureInfo culture) +77
System.Resources.ResourceManager.GetString(String name) +6
SDTR.reconcile_month.InitializeComponent() in c:\dev\SDTR2005\SDTR2005Web\reconcile_month.aspx.cs:320
SDTR.reconcile_month.OnInit(EventArgs e) in c:\dev\SDTR2005\SDTR2005Web\reconcile_month.aspx.cs:178
System.Web.UI.Control.InitRecursive(Control namingContainer) +321
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +692"