I can't build an "ASP.NET Classic Web Application"

Microsoft Visual Studio Community 2019 Version 16.7.7
RemObjects Elements 10.0.0.2569

I create a new project with the template “ASP.NET Classic Web Application”.
I add a new file with a class.
I save everything.
I close Visual Studio.
I open Visual Studio again.
The file I added is not in the project!

I tried creating directories, adding files that already exist and I can’t get them to be added to the project file (VS doesn’t write it)

It also does not compile with the files I add (they do not appear in the Output after a build).

Attached image of VS and the content of the build

Build.rar (14.8 KB)

Thanks, logged as bugs://85163

Does anyone know how long it can take to solve this problem?

I have to work on this project with some urgency and can make the decision to wait (little) or tie it up with MS C#. Please give me some indication so I can make the best decision.

Thank you in advance.

Carlos,

hard to say until we had a chance to take a look, sorry. There seem to be two separate problems, as I understand it — (a), adding new files to the project fails to actually persist that change in the file and (b) something fails with the actual build?

I see no errors in the build log you attached; any chance you I could see the actual project?

Ok, trying to reproduce this, I created a new Oxygene project off the “ASP.NET Classic Web Application” template. it builds w/o errors. I added a new WbeForms file via right-click, “Add New Item”. WebForm1 gets created on disk and, after I save/build, is in the project file, correctly:

<Content Include="WebForm1.aspx" />
    <Compile Include="WebForm1.aspx.pas">
      <DependentUpon>WebForm1.aspx</DependentUpon>
      <SubType>ASPXCodeBehind</SubType>
      <DesignableClassName>WebApplication10.WebForm1</DesignableClassName>
    </Compile>
    <Compile Include="WebForm1.aspx.Designer.pas">
      <DependentUpon>WebForm1.aspx</DependentUpon>
      <DesignableClassName>WebApplication10.WebForm1</DesignableClassName>
    </Compile>

When I rebuild and look at the dll with ILSpy, WebForm1 is there:

and when I close VS and reopenmn it, the project looks as it should, with the new file still there.

What am I missing?

I don’t know!
I have reproduced the same steps again and in VS I have:

As you can see in the image the project contains the added WebForm, but it does not appear in the build log:

Build.txt (99.4 KB)

and neither in the project file on the disk:

WebApplication10.rar (30.1 KB)

imagen

and it is not in the dll either (you can look at it in the rar file directory structure):

Let me know if you want me to do a test of some kind, whatever you need I’ll keep an eye on it over the weekend.

Odd. can you retest with 2571, jic? else, I’ll need to have my colleague have a look on Monday — the VS integration code base isn’t really my area of expertise…

Installed .2571 and everything is the same as I described above. The problem remains.

Okay. not surprising, given we didn’t consciously fix anything in this area this week, but good to know. I’ll have to leave tis my colleague next week, then.

Marc,
In case it helps you to solve this problem:

1.- Whether you add or remove files from the project, the changes are not saved in the file on the disk (.elements file), unless:

2.- If I open the project properties and press save (Ctrl + S) the changes are saved to the file on disk (.elements file)

3.- If you compile at this time (build) the output does not reflect the changes (files added or deleted), the compilation occurs with the state before step 1.

4.- If you close VS and open it again and compile, the output does reflect the changes (files added or deleted), the compilation is produced with the state after step 1.

So if I follow these steps I can keep working and pulling my hair out because of the huge loss of time it means.

PS This makes me think that you keep three (3) different structures for the files of a project: the one you see in the Solution Explorer of VS, the one stored in the .elements file and the one kept in memory to compile (and other tasks like CC, I suppose) and that you have a problem with the synchronization of these three structures.

Carlos,

While I couldn’t reproduce this, by college did, and she has that part fixed now.

Unfortunately this part still remains, despite the save fix, and is still being looked at.

—marc

Marc,

How is this going? Is there anything I can do to help fix it?

Carlos.

Hello.
The last build contains fix for adding and saving files in the project. Right now just one bug has left - added or deleted files do not reflect in compilation until you reload the project. I am working on it, but I can’t give you any estimation when it is fixed. The issue is tricky, somehow msbuild uses cache, and changes don’t reflect in this cache.

I need a solution to this problem, please.

Carlos,

We are working on it; my apologies that it’s taking so long.

—marc

Thanks,

Carlos.

bugs://85163 got closed with status fixed.