ClickOnce and mageUI adding custom file folder problems - deployment

What I do: Publishing .Net 3.5 application via VS, or msbuild (whatever), and now I need to insert to the published application separate directory (Modules - not added as a reference to the project - our project architecture does not allow this). So I'm copying the folder to published location then runs mageUI.exe select the application manifest and then the problems starts. As I press the populate button it's adding also hidden directory? So I remove the directory, after I want to save the manifest file I get the
"Warning MSB3110: Assembly 'NAME.Shell.application.deploy' has mismatched identity 'NAME.Shell.application', expected file name: 'NAME.Shell.application.application'".
Did you have the same problems, according to http://smartclient.codeplex.com/Project/Download/FileDownload.aspx?DownloadId=5060 it should be easy as 1-2-3 but it's not.

On the irony side, I am currently updating the SCSF documentation for ClickOnce deployment for .NET 4.0, and now I know exactly what the problem it.
First, you want to publish to a disk location, not directly to the webserver. So do that, and then copy the dll's you want to add to the deployment into the version folder with the application manifest (.manifest). Rename them yourself -- just add .deploy on the end.
Bring up MageUI and open the application manifest in that folder, then uncheck the box that says "add .deploy to the file names". Click "populate".
Then remove the deployment manifest from the list; it's called something like appname.application. You don't want it to be included in the manifest's list of files.
Now you can save and sign the application manifest. Then without exiting mageUI, open the deployment manifest that is in the root folder (NOT the one in the version folder). Click on "Application Reference", then click Select Manifest. Dig down to the application manifest in the version folder that you just signed and select it. Then just save and sign the deployment manifest. It puts a relative path in there, so if you modify the .application file in the version folder, it won't work right when deployed.
Now take that .application file from the root folder and copy it into the version folder (replacing the one that's there) so you have the right copy for that version in case you need it later.
Now copy the whole shebang out to the webserver. it should work.

I think you are saying you need to add a folder of stuff to your ClickOnce deployment? What exactly are you adding? You say modules -- are they going to be compiled in, or is it something else?
If you want to add files to the deployment you have already created, you need to use MageUI to edit the application manifest, which is called something like appname.exe.manifest. (The appname.application is actually called the deployment manifest, which is confusing but true.) After adding the files, you will need to re-sign the deployment manifest as well (assuming you signed it in the first place).
It would be easier just to add what you want included to your project and re-publish. Depending on what it is, you can set the build action to 'content' (jpegs, html, etc) or 'none' (dll's) and then set "copy to output directory" to true, and it will include it in your deployment.
I'm not sure exactly what you are including. Give me more info, and I can provide more specific help.
RobinDotNet

Related

install4j DMG archive, setting permissions on additional files?

Is it possible to change the permissions of files that get added to the DMG volume created by install4j (via Media->macOS single bundle archive->Installer options->DMG options and files->Additional Files in DMG->"+"-> Regular file)?
I am adding a separately uninstall.app (to uninstall pre-install4j versions of the Application) but the added executable file the uninstall.app runs ends up not being executable! (I have to add all of the files under uninstall.app individually)
I have a workaround which is to include the uninstall.app as a separate File set which gets embedded within the Application.app/Contents/Resources/app folder, and then creating a symbolic link in the DMG down to that, but I'd prefer to have the whole uninstall.app separated -- it can be run directly from the DMG.
Suggestion: Allow setting permissions of the additional files (or just preserve permissions). Also a recursive "copy folder into DMG" would be good, or alternatively allow copying of an already defined File set into the DMG?
Thanks for your suggestions, I have added them to our issue tracker.
Unfortunately, it is not possible to change the permissions as of install4j 8.0.
Update 2021-02-05
This will be available in install4j 9.0.

Octopus Package Application Step in TFS Build not picking up files in sub folders

Hi I am using Octopus Deploy Package Application step to package up my website
I specified the Source Path, Output path etc just fine.
If I do not specify the Include files it brings back everything in the folder structure as the package. But I only want to Package certain things like the CSS, views, dll's etc
If i Specify an include form a sub folderlike /bin/.dll it does not bring the files through, even though this is the exact example they give on the more info icon. but if i specify something in the root like .png which is not in a subfolder it works fine.
Anyone faced this issue. Please see image below to see the step setup
Use the path below, you'll get all dlls in bin folders:
**/bin/*.dll

TDS File Replacement

I want to deploy some front end assets to the local web root of a site using file replacement. I can't seem to get it to work with a relative path in the target location field though. Is it possible to do this though tds or should I use a post build event instead?
The reason these assets aren't included in a project is that they are part of a third party solution but we still want this tracked in source control to try to make the project setup easier.
Most developer machines will be set up the same way for this project with the same file structure but I think it's a little more flexible if I can make the target a relative path so I don't need to worry about differences like drive letters and such.
The folder structure is as follows:
repo
folderToCopy
sitecore
webroot
I have tried the following using ..'s based on what tds changed my source location to be while using the "Make selected Source Location relative" option (changed it from an absolute path to ..\folderToCopy\):
../../Sitecore/Website
/../../Sitecore/Website
..\..\Sitecore\Website
\..\..\Sitecore\Website
From my understanding, TDS does the file replacement based on the files published from the associated Website project.
You can then have relative replacements such as the following:
<Replacement Include=".\assets\folderToCopy\myFile.txt">
<TargetPath>.\assets\targetFolder\myFile.txt</TargetPath>
<IsFolder>False</IsFolder>
<IsRelative>True</IsRelative>
</Replacement>
I have not been able to successfully get TDS to use the file replacement with files that are in source control but not in the project.
My suggestion would be to set up a build event that will copy these files to the correct location, or to create a nuget feed for them and pull them in as nuget references.

Deployment of About.htm with ClickOnce

I have a Win app (VB.net 2005) with an About.htm page that comes up when the user presses F1, using a HelpProvider control.
The application was deployed using ClickOnce technology. When I release a new version I have to manually copy the About.htm file from my development area to our LAN (specified by the HelpNamespace property of the HelpProvider control).
Is there a way I can include this as part of the deployment?
Thank you.
Add the file to your project and set the build action to 'content' and 'copy to output directory' to 'copy always'. Then the file will be included in the deployment when you build and deploy.
To locate it programmatically, assuming you're using winforms (because you're using vs2005), you can find it by looking for it at System.Windows.Forms.Application.StartupPath.
You can open it by doing a Process.Start("iexplore.exe", myHtmlFile). You could also make a form and show the about file in a web browser control pointing to the file as a URI.
RobinDotNet
I think the best way is to make your Help-File a part of the Application. Take a look at this question. With this way the Help-File will be downloaded with your Click-Once application.

Why can't I just send my zipped Xcode project folder to a friend, and it works?

I always use one folder on my filesystem for an Xcode project. It contains all project files. When I zip it and send it to a friend, she can't just ipen the xcodeproj file. It opens, but all paths are broken and build fails because all the classes don't find the #include'd files. But when I download i.e. some example projects from apple, these work perfectly. What am I doing wrong?
UPDATE:
I'm doing it like this:
1) I create a project and specify an directory on my desktop
2) In that directory I create an "images" directory and add images to it
3) I pull this images directory out and drag it into the Resources Groups&Files. Xcode asks if I want to copy it to destination folder, I click no. Because it's already there. All other things are set to default.
4) all other things are just created within xcode, and xcode just puts all classes in the Classes directory of my project.
5) when I want to add images, I first put them in the directory of the project, and from there drag them into the Images group in xcode. That's to make sure xcode doesn't mess them up with everything else. Otherwise it would just copy them to the root of my project directory rather than inside the Images directory, which doesn't make sense. In fact, the whole Groups&Files filesystem doesn't make sense at all, it's one big mess. Apple's biggest mistake in Xcode so far. That's why I have to do such stupid things.
We don't really know exactly what you're doing so it's hard to see what you're doing wrong.
Perhaps inspect the xcode project files directly, see if you have hardcoded paths. That's a sure fire problem. Make sure you copy resources into the project instead of referencing them externally, etc.
I expect that you have "search path" build setting set to an absolute path on your machine, rather than a path relative to the project. Best way to tell is to post a portion of the build transcript from the failed build and look at the -I directives. If those paths don't exist on your friend's machine, then they should be changed from absolute paths to paths that start with ${SRCROOT}.
Are you just trying to build on the second machine or are you trying to deploy to a device on the second machine? If you are trying to deploy to a device (iPhone or iPod Touch) then it probably has something to do with Code Signing and Certificates.