Aaron
Aaron

Reputation: 1483

ClickOnce Version Already Exists Warning When Publishing

I have published an app using ClickOnce for about a year with relatively few issues.

This week I am off site, but needed to make some changes to the app and the way the autoupdate works - so I am publishing to the IIS of my local machine rather than the normal distribution server for testing. The wierd thing is that as of yesterday afternoon, I started receiving the warning

Published version 2.1.3.18 already exists on the server, do you want to overwrite it

But the version i am publishing is way beyond that (2.1.3.32 currently), so I shouldn't be receiving the warning at all.

Frankly, it's not hurting anything, I can choose yes and publish over it without any problem, but I would like to know what is happening. Does anybody have any idea?

Thanks!

EDIT FOR CLARIFICATION
2.1.3.18 is on the server, but I am publishing versions greater than that version, so I should not be warned. The last version I published was 2.1.3.32.

The version number I am referring to above is the Publish Version from the Publish tab of VS2008, not the Assembly Version.

MORE INFO I just opened my MYApp.Application file with MageUI and it says the version is 2.1.3.18. I deleted the file, recompiled and published. New file has the exact same version. Yet when I look under my VS Publish tag, it says Deployment Version is 2.1.3.33.

Where is VS pulling the 2.1.3.18 number from when building my manifest??

Upvotes: 8

Views: 4223

Answers (9)

Pascal Declercq
Pascal Declercq

Reputation: 41

What worked for me: I had a class library in my solution marked (erroneously) as 'Console app'. I marked it back to class library and my Clickonce publish worked again.

Upvotes: 0

Aufgeschissener Kunde
Aufgeschissener Kunde

Reputation: 767

My solution to this problem was to click "Show all" on the Publish view then mash "Next" on the Publish modal until completion, all the while changing absolutely nothing. Then it published successfully.

Things that did not work for me:

  • Running "Clean solution
  • Exiting and restarting Visual Studio
  • Rebooting the machine

Upvotes: 0

dangalg
dangalg

Reputation: 6486

My problem was the csproj file being locked. I restarted the computer and it worked

Upvotes: 0

Alex LE
Alex LE

Reputation: 20572

I just had the same problem today, Just do a "Clean" on the project and then publish again (right click over project icon in solution explorer then Clean). This worked for me.

Upvotes: 10

Shahzad Amin
Shahzad Amin

Reputation: 21

its quite so late for replying here but updating this for upcoming people search for the same, i got the same thing happening today with my running app all in sudden, on my work around i deleted BIN & OBJ folders and recreate them and all went fine.

Hope it help.

Aquariens

Upvotes: 2

andyhammar
andyhammar

Reputation: 1443

Ok, you are updating the ClickOnce publish version, then you shouldn't get the question.

I have been doing quite a lot of publishing but never seen this when it was not supposed to be there.

I have an idea though, sorry but I'm not in a position to verify it now:

Is your ClickOnce Update location set to something different that the Publish location?

The Publish location is on the publish page, and the update location is under the Updates button. You probably should blank the update location out if you have it set.

Upvotes: 0

Dusty
Dusty

Reputation: 4707

Look in the project's csproj.user file. I believe that the publish version should be there.

Upvotes: 3

Mosquito Mike
Mosquito Mike

Reputation: 982

Visual Studio is pulling the "Publish Version" from the publish tab from the project's properties.

I get this warning too, but I generally just publish twice to get around it.

In additon you may want to check the "Automatically increment revision with each publish"

Upvotes: 1

user117499
user117499

Reputation:

VS is warning you that version you are try to deploy is the same as the production.

My experience with clients and click-once deployments: I think it's looking at the last click-once package build version which originates from the click-once page, not the project file version.

Upvotes: 1

Related Questions