0

I have an asp.net core app that I set the version in the csproj file.

enter image description here

When I do dotnet publish I can see that the version in the dll file is different than the one in exe file

enter image description here

Why is this happening? Since they are the same file they shouldn't have exactly the same versions?

pantonis
  • 5,601
  • 12
  • 58
  • 115
  • you might be help this [link](https://stackoverflow.com/questions/752162/whats-the-difference-between-a-dlls-fileversion-and-productversion) – Okan Karadag Sep 05 '22 at 11:36
  • No didn't help. The link is for file and product version. The issue I have is the version between the dll and exe file under the same name that are produced and they have different versions – pantonis Sep 05 '22 at 11:41
  • I'm afraid it is resulted from the configuration or the packaging process. I just find [this answer](https://stackoverflow.com/a/24766769) which can edit the file version. – Tiny Wang Sep 06 '22 at 02:54
  • Did you use `dotnet clean` before building and publishing? If all that changed is `Version`, the compiler may have skipped building the unchanged dll. What happens when you publish *after* deleting the `bin` and `obj` folders? – Panagiotis Kanavos Sep 08 '22 at 15:52
  • When you set `ErrorOnDuplicatePublishOutputFiles` property to `true` what are your conflicting files? Are any of them `dll` or `exe`? – BorisR Sep 08 '22 at 17:50

0 Answers0