Forum:  Designer

Thread:  Project file getting overwritten each time

ioan (User)   Posted on: 20-Feb-2019 12:58:12.
I had to support multiple platforms in the project containing the generated entities, so I used the new project format (referencing Microsoft.NET.Sdk). However, upon source code generation, my project file gets overwritten and I have to revert the changes each time. Is it possible to teach the designer to not change the project file, as this new type of project file includes automatically all the file in its folder? Thanks!
Walaa (Support Team)   Posted on: 20-Feb-2019 20:31:23.
Which project are you talking about?
And which version of the Designer are you using?

ioan (User)   Posted on: 21-Feb-2019 10:42:38.
Walaa wrote:
Which project are you talking about?

I have a LLBLGen project which in turn is used to generate the C# entities, contained in a C# project. I mean here the C# project containing the generated entities (the csproj file) is getting overwritten.

Walaa wrote:
And which version of the Designer are you using?

Otis (LLBLGen Pro Team)   Posted on: 21-Feb-2019 10:55:24.
I think the problem is that you chose .NET 4.5.2 or similar (.net full) output, and that therefore uses the 'old' csproj format. The vsproject file generator will then look for the file in that format. As it's in a different format, it can't 'adjust' it and adds the nodes it needs. It's always overwritten, it just adds a lot of data you don't need.

If you select .net standard 2.0 as the output when generating code, you'll get the new format and it shouldn't overwrite the project file/augment it. The generated code is the same (it doesn't generate an assemblyinfo.cs file, but that's ok, the new project format doesn't need it).

We use that too for our generated test projects which all target multiple platforms (.net 4.5.2 and .netstandard20)

ioan (User)   Posted on: 21-Feb-2019 14:04:25.
That fixed the problem, thanks!