ClickOnce Version Already Exists Warning When Publishing

拟墨画扇 提交于 2019-12-10 16:16:27

问题


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??


回答1:


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.




回答2:


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




回答3:


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.




回答4:


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"




回答5:


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




回答6:


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.




回答7:


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



来源:https://stackoverflow.com/questions/977236/clickonce-version-already-exists-warning-when-publishing

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!