I've been trying for a while to find a reliable and straightforward way to implement auto-updating for my WinForm applications.
I've researched examples in which I ought to implement a new class and do the whole process manually. This is not what I want to do.
Instead, I want to use the VS publish to ftp option, as shown below.
I preselected all of the update options I want as shown below.
I get the following output:
2>------ Publish started: Project: MyApp, Configuration: Debug Any CPU ------
Connecting to 'ftp://ftp.mysite.com/'...
Publishing files...
Publish success.
Warning: Unable to view published application at ftp://ftp.sigmoidgroup.com/.
ftp://ftp.mysite.com/
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 1 succeeded, 0 failed, 0 skipped ==========
When I log-in to my server, I can see the following files:
My question now is... how do I implement the installation for the client? Do I have to create a separate mini-app that downloads the files from the ftp (checks the latest version) or is this already pre-defined in VS?
The auto-update should just work if you deploy to the same folder location. (If users have a shortcut to the manifest on the ftp site, ClickOnce handles the updating of files). I see you have different folders for different versions, you shouldn't need more than one unless users need to access older versions. See this for more ClickOnce info.
Related
I have a WCF web service using Visual Studio 2015. If I have a compile error in C# code, when I publish the web service (to a file location) the "build" will succeed, and continue through a successful publish:
========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Publish: 1 succeeded, 0 failed, 0 skipped ==========
If I then deploy to an IIS web server and call the web service there, the call fails and returns a page describing the compilation error.
When publishing, the output in VS starts with Build started: but apparently it isn't really doing a build because any build would have failed, and in fact if I do a build instead of publish, it does report the error(s). Do I have to remember to build before publishing to check for errors, or is there a way to get it to really for realz compile the code?
If solution has many projects then try building them one at a time.
Try below steps:
Restart Visual Studio.
Restart Computer
Rebuild all
Clean Solution then Rebuild All
Also you can check below
Setting the MSBuild project build output verbosity (in Options > Projects and Solutions > Build and Run setting area) to "Diagnostic" as shown below. This then showed that the custom action was what had failed.
https://blogs.msdn.microsoft.com/saraford/2008/10/07/did-you-know-you-can-configure-the-msbuild-verbosity-in-the-output-window-329/
I' trying to publish ClickOnce Application to a webserver through sftp (Using Visual Studio 2015. The server is Centos 6.7).
My final config in the Publish Wizard:
The application will be published to:
sftp://10.1.0.88/home/www/sample/web/desktop/
Users will launch this application from:
http://sample.example.com/desktop/
When I published: (Output)
Connecting to 'sftp://10.1.0.88/home/www/sample/web/desktop/'...
Publishing files...
Publish success.
Warning: Unable to view published application at http://sample.example.com/desktop/publish.htm.
http://sample.example.com/desktop/publish.htm
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 1 succeeded, 0 failed, 0 skipped ==========
Nothing was added in /home/www/sample/web/desktop/. But it says Publish success.
What should I do?
It turned out the deployment files were added to /root/home/www/sample/web/desktop/instead of /home/www/sample/web/desktop/
So I change publishing folder location from
sftp://10.1.0.88/home/www/sample/web/desktop/
to
sftp://10.1.0.88/../home/www/ecr/web/desktop/
I downloaded DocFX and installed it from http://dotnet.github.io/docfx/.
I added it to my environment path. I then downloaded the sample solution from https://github.com/docascode/docfx-seed and opened it as a website project. (This sample already contains the package docfx.msbuild)
The documentation says to build the solution and then browse the _src folder for the website. I do this and the solution builds fine:
------ Build started: Project: docfx-seed-master, Configuration: Debug Any CPU ------ Validating Web Site Building directory
'/src/SampleClass1/BaseClass/obj/Debug/'. Building directory
'/src/SampleClass1/BaseClass/Properties/'. Building directory
'/src/SampleClass1/BaseClass/'. Building directory
'/src/SampleClass1/CatLibrary/obj/Debug/'. Building directory
'/src/SampleClass1/CatLibrary/Properties/'. Building directory
'/src/SampleClass1/CatLibrary/'. Building directory
'/src/SampleClass1/SomeVbClass/My Project/'. Building directory
'/src/SampleClass1/SomeVbClass/'.
Validation Complete
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
but there is no generated _src folder. If I however run docfx from the command line then I do indeed get a _src folder and I can browse the generated website.
So my integration of DocFX into VS2015 via MSBuild is somehow broken. Can anyone shed any light on how to get this working?
I have a complex lightswitch application that was created using visual studio 2013, and then I upgrade it to using visual studio 2015. the solution was working fine, I even did a couple of deployment for it. Now I am trying to build it from a new machine and the build hangs (it never finishes). The output console is displaying an error: Microsoft.Lightswitch.Build.Tasks.Targets(168,5): application definition contains critical errors
I tried Google for a solution but could not find one that works in my case, I already checked the Link1 and this one Link2
When I cancel the build another similar error is displayed this is the output console:
------ Build started: Project: Agency Tool.Server, Configuration: Debug Any CPU ------
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(168,5): error : Application definition contains critical errors.
------ Build started: Project: Agency Tool.DesktopClient, Configuration: Debug Any CPU ------
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(217,5): error : Application definition contains critical errors.
------ Build started: Project: Agency Tool, Configuration: Debug Any CPU ------
The data necessary to complete this operation is not yet available. (Exception from HRESULT: 0x8000000A)
========== Build: 0 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========
Resolved:
We noticed that in the main project properties--> extensions tab, Microsoft Lightswitch Extensions was not selected (I don't know what caused it to be unchecked, but I did not do it manually). However when we checked it the error disappeared.
It really irks me to sit around waiting for "Publishing files..." to finish. I am publishing using FTP, so maybe this is the issue.
Here's what the output looks like:
Connecting to 'ftp://example.com/public_html/download/xxx/'...
Publishing files...
Publish success.
http://example.com/download/xxx/publish.htm
========== Build: 12 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Publish: 1 succeeded, 0 failed, 0 skipped ==========
In between "..." and "Publish success" is a rather long wait for which I would like a more detailed status.
If you're publishing from Visual Studio, simply show the Output Window and pay attention to it during a publishing process. (Go to View->Output to view the Output window.)
The Output window displays build info, errors and the status of the ClickOnce publication process. When you publish your application, ClickOnce has to generate a few files and then it publishes all of the associated file with your project. When it is copying your files to the publication server, each file that has been updated is enumerated in the Output window, complete with a x of n count.
Hope that helps.
No, there's no way to enumerate those files as they are published for a client application. I think it does it for a VSTO app, but not for a regular client application.
I'll turn this into the PM at MSFT again as a frequently requested item.