Project file getting overwritten each time

Posts   
 
    
ioan
User
Posts: 12
Joined: 20-Nov-2018
# 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 avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# 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
Posts: 12
Joined: 20-Nov-2018
# 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?

5.4.1

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# 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)

Frans Bouma | Lead developer LLBLGen Pro
ioan
User
Posts: 12
Joined: 20-Nov-2018
# Posted on: 21-Feb-2019 14:04:25   

That fixed the problem, thanks!