Search code examples
c#.netvisual-studiovisual-studio-2017-build-tools

Published folder name and manifest not getting updated


I have a C# Windows Forms Application. I published using the publish profiles to the folder in my local, then copy it to the server. The business will run the setup and install it.

  • VStudio Version - VisualStudio -2017
  • .NET Framework - 4.8

I have changed the assembly version manually using assemblyInfo.cs file and my current version are 2.0.0.7. But I'm facing the below issues.

  1. When I publish the folder, the folder inside the Application files are always getting the older version name (ProjectName_2_0_0_5).
    enter image description here
  2. Thus making the manifest and application manifest to point to the Older version files. So the Manifest file is not getting updated.
  • To rectify this error for the time being, manually I have updated the folder name to the current version and application manifest file to point to the current folder location.
  • But still, I'm facing an issue in the deployment. But I know changing manually is not the correct way to do it. I'm missing something. I don't know how to do that. Please guide me and try to fix it permanently.

enter image description here


Solution

  • I think that setting is not available when doing a publish by right-clicking the project,

    But if you publish your project through Project => MyProject Properties menu, you can set the version of your package and click Publish Now.

    enter image description here

    The gist of all this is,

    Normally, you don't change the version numbers that often, but the revision number keeps incrementing, and VS publish has support for this. See the checkbox "Automatically increment revision with each publish".

    This is your package version, not your assembly version, and they don't have to match, since you can have multiple assemblies under a single setup package and each may have different versions.

    It is the package version number which holds together all the compatible versions of your (or any external) assemblies.

    The package version number is what your customers know when they set-up.

    Hope this helps.