0

I took my WebForms project which was initially build using Visual Studio 2008 (!) and have converted it over to the "new style" Visual Studio project files, which has tremendously reduced the size of this file, and no longer explicitly names all files needed to build a project. This makes SCM merges much easier to manage conflicts due to file renames etc.

I asked this question about the conversion process, Visual Studio is expanding wildcard project file includes upon build

However, since performing this upgrade, my .aspx edits no longer triggers a corresponding change to the .aspx.designer.vb and I have to make these edits manually, which is getting really frustrating.

Is this unsupported functionality (I realise that WebForms is very old technology now)? Before making the project file change then this was all working as expected.

The main change to the project file was to change the top-level element from

<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

to

<Project Sdk="Microsoft.NET.Sdk">

UPDATE Okay, it's definitely the project file. I created a new Web Forms "web application", and when modifying an ASPX page to add a new server-side control, the .designer.aspx.vb file was edited by Visual Studio automatically. I made the project file change detailed above and then edits made to the ASPX page are no longer reflected onto the .designer.aspx.vb file.

Steven Sproat
  • 4,051
  • 3
  • 24
  • 38

1 Answers1

0

Nothing has changed in regards to you editing your aspx pages, and the system takes care of the desinger file(s).

I would make a backup, and consider then deleting the designer files. You can re-generate them by: Click on the main project file, and then go from menu Project->convert to Web application.

Keep in mind that this will force/change all pages to be converted to code behind. So, if some pages are a mix code files + code behind (all pages will be converted code behind. That assumes a aspx page, and then a designer page). And I believe that if you using custom controls - that can be messed up.

So, no, you should not be messing with or have to touch or maintain the designer files. It is possible that something else here is messed up.

A discussion on re-creating designer files, and how do to this it outlined here:

Regenerate designer.cs

Albert D. Kallal
  • 24,278
  • 3
  • 27
  • 41