App.Publish vs applicationName.publish
- My application was originally built under VS2005 then converted to VS2008.
When I publish, the files are created under a folder under bin/debug called applicationName.publish. Nothing is created in the App.publish folder. But, the publish action copies the files from bin/debug/App.Publish to my publish location.
Why isn't it creating the files under app.publish since that is the folder it is referencing to do the copy?
Is there a setting which must be changed in VS2008?
Thanks,
Chris
All Replies
- Does anyone have an explanation as to why my publishing puts the files under the applicationName.publish instead of App.Publish? This is really causing a lot of problems.
When I build and publish, I now have to do it in multiple steps:
1. I build
2. I publish (and the files appear under the applicationName.publish folder)
3. I get messages asking if I want to overwrite the version in the publish location (I say NO).
4. I copy the files from the applicationName.publish folder to App.Publish.
5. I publish again and the files under App.Publish are copied to the publish location with no errors (since they are now new versions of the files).
There must be a reason that it is putting the files in the wrong *.publish folder. Settings in VS2008? Something that is setup because it was a WPF application from VS2005 which was converted to VS2008?
Help!!!
Chris - Is there an error from the publish when the files appear under the applicatlinName.publish folder?
Also, I'm assuming when you say applicationName, it is the name of your application, right? And not really applicationName?
RobinDotNet
Click here to visit my ClickOnce blog!
Microsoft MVP, Client App Dev - RobinDotNet
Yes, when I say applicationName I mean the name of my application (Personnel_test in this case).
When I first started to publish, I believe that I got errors because it didn't find the files in the app.publish folder.
Now I don't get an error, but the publish asks me if I want to override the version in the publish location. This is because it is seeing the previous version files in the app.publish folder and is trying to copy them to the location.
If I copy the latest files to app.publish from personnel_test.publish, it then copies them over.
I am assuming that VS2008 changed to using the app.publish folder for the publish build. Is that correct? I just don't understand why it even created the personnel_test.publish and why it is putting files there instead.
Thanks,
Chris I don't have VS2005 installed, so I can't check. Did it create app.publish, or applicationname.publish?
VS2008 definitely uses app.publish.
RobinDotNet
Click here to visit my ClickOnce blog!
Microsoft MVP, Client App Dev- I was looking at some VS2005 documentation and it looks like it actually created a Publish folder under the root directory. I have another VS2008 solution which I created in VS2008 from the start. It has an App.Publish folder under the Bin/Debug(or Release) folder.
I am not sure why I'm getting the applicationName.publish folders. Would it have anything to do with it being a WPF application? That is one difference between this program and my other Windows Forms program.
Chris - You mean it's not creating your applicationname.publish folder under the \bin\debug or \bin\release folder? It's putting it somewhere else? What do you mean by "the root directory" ? Under Visual studio, or under the main directory for your project or what?
RobinDotNet
Click here to visit my ClickOnce blog!
Microsoft MVP, Client App Dev - Ok, I'll try to make it more clear.
You asked me about VS2005. I looked in a book that I had and it said that when you publish, it would create a folder under your project folder called publish. I'm not seeing that.
Under my bin\debug or bin\release folder I have 2 publish folders. 1) applicationName.publish and 2) app.publish.
When I publish it is putting all the files under applicationName.publish. But, it is attempting to copy the files from the app.publish folder to the publish location I specified in the publish wizard.
It should be either 1) creating the files under app.publish since it copies it from there, or 2) copying from the applicationName.publish folder.
Should I try deleting all the folders and do the publish again to see what it creates?
Chris - Hi, Chris,
This is weird. I've never seen a folder called applicationname.publish. How big is the project? Is it something you could send to me to look at?
I'm assuming you have tried cleaning the solution, and deleting the bin folder and then re-publishing.
What version of .NET are you targeting?
You don't have any post-build or pre-build commands, do you? (Look under the Build Events tab for the main project's properties)
Are you publishing to a web server or a folder on disk?
RobinDotNet
Click here to visit my ClickOnce blog!
Microsoft MVP, Client App Dev - RobinDotNet,
Ok, I cleaned the project and deleted the bin folder. When I published, it created a folder called Personnel_Test.Publish under my \bin\debug folder. It did NOT create the App.Publish folder. I got this error:
Error 2 Publish failed with the following error: Could not find a part of the path 'C:\Work_Area\Personnel2.0\Personnel\bin\Debug\app.publish\Application Files'. 1 1 Personnel
I am targeting .NET 3.0 (this is a WPF application).
I don't have any pre-build or post-build commands.
I am just publishing to a local folder on my workstation.
To get it to actually publish, I have had to create the App.Publish folder and Application Files sub-folder and then copy the files from the Personnel_Test.Publish folder to the App.Publish folder, then go through the publish again.
Thanks for looking into this.
Chris Hi Chris,
I talked to someone in the ClickOnce group at MSFT; he agrees that this is really odd and unexpected.
Can you give us the diagnostic output of the build? To do this, click on Tools/Options/Projects & Solutions and select Build&Run.
Under "MSBuild project build output verbosity", please set this to "Diagnostic".
Then publish your application via the Publish Wizard under the Build option on the main menu.
It will display the diagnostic information in the Output window in Visual Studio. Just copy it out of there and paste it into a reply here, so we can look at it.
Is it a project you can send to me and my contact so we can look at it? If so, let me know, and I can provide a way for us to connect.
RobinDotNet
Click here to visit my ClickOnce blog!
Microsoft MVP, Client App Dev- RobinDotNet,
I'll get you the diagnostic on Monday.
I could probably get you the project, but it uses a SQL database and a web service. If you can determine the problem without running it, then I could just get the code to you.
Thanks,
Chris
Hi Chris,
I just want to open it and look at the properties of the files and solution and stuff, I don't need to run it. If you want to share it, you can post a comment on my blog here and give me your e-mail address and tell me why I want it:
http://robindotnet.wordpress.com/request-a-blog-entry-here/
I moderate my comments; when I see yours come through, I'll turn it down so it doesn't get posted, and I'll send you an e-mail.
Note to anyone else: Any findings will be posted back here for everyone else's edification.
RobinDotNet
Click here to visit my ClickOnce blog!
Microsoft MVP, Client App Dev


