Installshield won't update files after component has been removed - installation

Basic .msi project.
Installshield 2010.
Im my installation project v1.0.0.0 i have added some components:
1. Went to "Installation designer" tab -> "Organization" menu category -> "Components" sub menu.
2. Right click "Components" -> "New component".
3. I append a new folder name "dir1" to the [INSTALLDIR] destination.
4. Then i add a file.
5. Went to "Organization" -> "Setup design"
6. Created a new feature
7. Right click the feature and select "Assign components"
8. I select the component
Build, Install.
Then i up the version of my installation to v1.0.0.1
1. Added new component again.
2. Appended destination with a different directory name [INSTALLDIR]dir2
3. Added a file.
4. Went to "Setup design"
5. Right click the feature and select "Assign components"
6. Selected the second component i created.
7. Then went to "Components" and deleted the first component.
Build, install.
At this point, nothing updated. I still see the Dir1 and there is no Dir2 in the application installation directory.
If i try to uninall, it will remove the application for the "Uninstall programs" list, but none of the files are removed at all.
What did i do wrong and how do i fix this?
google has zero help on this. I might not know what search words to use for this kind of problem.
If i completely uninstall my project and manually delete all the files, and then install the new version, then it is all ok and it creates dir2, but i need this to work not only with fresh install, but update too.
SOLUTION (for me at least)
While the M F solution is good for when you have not yet done damage to your installshield project, i will document my own steps on how i fixed this after the damage has been done and there is no backup saved.
In the 'Installation Designer' view:
1. Installation information -> General Information -> Product code, i click on Generate a new GUID button.
2. Media -> Upgrades -> Prepare setup for Upgrade Scenarios -> Upgrade Windows Installer Setup. Right click it and select Add major upgrade item.
3. Common -> Major upgrade. Leave the Products sharing my Upgrade Code checked.
4. Common -> Product Version. Select Within a specific range of versions and input current build version into 'max' box.
Now when application is being installed with this new install file, it will automatically uninstall the older version with all of its components and install the new version with new components.

You cannot remove components between minor installs.
You can set the component condition to '0' so that the condition does not install and delete any files that are in the component. But leave the component as part of the project.
If you want to remove the files installed as part of the original component then add the files to the component with remove files settings.
If you output a verbose log you will see in the log file that it complains that a component was removed. Or if you validate the new build against the old build it will says that you cannot remove a component.

Related

How to Set Up Xamarin.Forms for MacOS Sierra?

Visual Studio seems to be having a hard time starting up, so I'm wondering if there's anything wrong in my setting it up. I'm currently using:
macOS Sierra, version 10.12.6
Visual Studio (VS) for Mac (Community edition), version 7.3.2 (build 12)
Setting up New Solution:
A (New Project):
select Multiplatform App
under Xamarin.Forms, select Blank Forms App (C#)
select Next
B (Configure your Blank Forms App, part 1):
App Name: ABCD
Organizer Identifier: com.WXYZ
Target Platforms: select both Android and iOS
Shared Code: select Use Portable Class Library and Use XAML for user interface files
select Next
C (Configure your Blank Forms App, part 2):
Project Name: ABCD
Solution Name: ABCD
Location: [choose location], select Create a project directory within the solution directory.
Version Control: select nothing
Xamarin Test Cloud: select nothing
select Create
Immediately, VS begins the Adding packages... process. After it's done, the 3 Packages folders have a variety of Xamarin-related files, one of which they all have in common: Xamarin.Forms.
Just as a test, I right-click on ABCD solution folder and select Clean ABCD. Immediately, I get hit with this:
Error XF001: Xamarin.Forms targets have been imported multiple times.
Please check your project file and remove the duplicate import(s).
(XF001) (ABCD)
Why is this happening? I've tried separately deleting each of the Xamarin.Forms file in each of the aforementioned 3 Packages folders, but that did nothing good.
Right-clicking on the error message and selecting Show Error Reference literally just takes me to a Google Search result page for the search term "XF001", which helps 0%.
What am I doing wrong?
I have encountered this as well. It seems like a bug in the current 'New Project' templates, at least in Visual Studio for Mac.
Go into the folder where the csproj file of your shared library is. edit it with Notepad or similar and find the <import> node(s) at the bottom. There should be one which has something relatable to Xamarin in it. Remove this import node, save it and open/reload your solution.
Nuget might generate (for some reason) .nuget.targets and .nuget.props files in the project directory containing Import statements for Xamarin.Forms in addition to the same Import statements in the project file (<project>.csproj).
Backup the .nuget.targets and/or .nuget.props files and try removing the .nuget.targets and .nuget.props files from the project directory.

TFS source control - new files not automatically detected as pending changes

As per the tags, I'm using VS2013 and TFS2013.
There are multiple projects in the solution: Model, Presenter, View, etc. All other projects are working as expected in terms of source control operations.
Problems with the Model project:
Adding a new file via Solution Explorer isn't automatically detected as a pending change
Deleting a file isn't detected either
Other source control operations work fine for the Model project, such as:
Get latest version
Edit detection for existing files (including changes to the csproj
file when a new file is added)
Checking in pending changes
The csproj file would show up in pending changes with the newly added file listed in it, but the new file itself isn't showing up, therefore causing build errors on other developers' machines if only the csproj changes are checked in.
The workaround is to find the added file in solution explorer and Add via context menu, this will make it appear as a pending change. But this process should be automatic as per the other projects.
Noticed that there is no .vspscc file for the Model project while other projects have one each.
Any help appreciated. Thanks.
I would unbind and rebind the problem project and try again:
To unbind a solution or project from source control
In Visual Studio, open Solution Explorer and select a solution or
project to unbind.
On the File menu, click Source Control, then Change Source Control.
In the Change Source Control dialog box, click Unbind.
To bind a solution or project to source control
In Visual Studio, open Solution Explorer and select a solution or project to bind.
On the File menu, click Source Control, then Change Source Control.
In the Change Source Control dialog box, click Bind.
Select the database and location to which to bind, and click OK.
Click OK.
You might need to go to Advanced to find the Change Source Control option
https://msdn.microsoft.com/en-us/library/0eh3790h%28v=vs.90%29.aspx
Before unbinding and binding your solution try his:
Go to Source Control Explorer
Click the "Add Items to Folder" (the
one on the left of the red cross)
Select the items you want to Add and follow the instructions on screen
That's all
Click <Detected: x add(s), x delete(s)> : in the source control explorer then select the file to add
For years I've been relying on 'Detected Adds' to add missing files - which was never a sustainable solution but I've just about managed with it.
But now if broke.
I'm actually about to reinstall Windows but in the meantime one of the best ways I've found to get a sense on what's missing (and it's still working even though the detected adds isn't) is the recursive 'Compare' window.
You can add files from here too.
It's a little klunky but it gives me a good sense of security and shows file diffs if you want to see what may have changes.

How to also change the location of index files when changing the default build location in Xcode?

I'm using Xcode version 3.2.2.
If I follow these steps with Xcode:
create a new Cocoa application called "Test"
in Info change the "Build Products Path" to "_build"
build project
I find that there is still a "build" directory being created called:
build/Test.build/Test.pbxindex/<various files>
These look like the files that Xcode creates when indexing the project. Is there anyway to change this location so these go into the new "_build" location?
I've just tested the steps you outlined above in XCode 3.2.3 and I could not reproduce that symptom. Renaming the build products path to "_build" properly moves all build-related files (and the .pbindex) to that location. I have also built with the different XCode-project compatibility options with the same results.
Thinking this might be a bug in XCode 3.2.2, I've read the changelog but no such symptom is reported, and I personally have not seen that before.
An option that might help (but it should NOT be necessary) is to set the Build Intermediate Files path (in the Info panel of the Project) to the "Build products location", but I presume you have already tried that. In my XCode, the only case where the .pbxindex files do get built in another location is when I force them to by choosing the "Custom location" in the same panel.
Is it possible that it's a simple oversight on your part and that you haven't removed the directory after the cleanup? If not, then some more information would be helpful:
perform a clean build
open up the debugger (CMD+Shift+B)
from the toolbar, make sure you have toggled "All Results" under overview, "By Step", and "All Messages" from the last combobox
right-click somewhere in the debug output, and choose the option "Open These Results as a Transcript File"
HTH

Why is there no Project Item when Deploying VSIX?

We have a VS2010 Beta 2 DSL Project , We can build, deploy and test on our Development machines and all is well i.e When we go to 'Add New Item' we can select our DSL
When it comes to giving the VSIX to someone else to try the ONLY way that they can see the associated Project Item is if they build the DSL Project on their machine, they do not need to F5, it is just a simple Build Solution and then voila they can see it.
Is this a bug or user error?
You might want to update your bits to the RC version, which are now shipping in the VS Visualization & Modeling SDK at http://www.microsoft.com/downloads/details.aspx?FamilyID=cd443b01-d657-4f8b-b5b8-29f1e3e2c424&displaylang=en
This is apparently a known bug
I have found a workaround by adding some guids
{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
into the csproj and manually editing the vsixmanifest to add
ItemTemplates
I created a folder called ItemTemplates and then added the generated project item Zip into the folder , I then set the Zip as Content and changed the IncludeInVSIX property to 'True'
Not pretty but it works

Adding a new project to an existing solution in TFS

I added a project to an existing solution that is currently under source control using TFS, but for some reason I cannot check in the new project. When I view my pending changes, none of the files in the new project show up. None of the files have a plus (for a new file) next to them. What did I do wrong? How do I fix it? It's time to check in.
The problem is the solution has lost its binding. That's why it's not checking out automatically when you add the new project.
In order to restore the binding in VS 2010, go to File->Source Control->Change Source Control. Look for the "Solution: your solution name" and if it's not bound it will say "no server". Click on it and then click "Bind" from the toolbar.
in Visual Studio 2012/2013 it's File->Source Control->Advanced->Change Source Control (Thanks to danglund).
This should create a new vssscc file that is correctly bound. Now add the new project and everything should work correctly.
I was also having the same problem, this is how I fixed it:
Go to Visual Studion: File->Source Control->Change Source Control
Find your project there, its status would be "Invalid", Click on it and press "Unbind". Now go back to Solution Explorer and Remove your project. Add this project again into the solution explorer solve the problem.
Good Luck!
Click on the Team Project name in Source Control Explorer
File -> Source Control -> Add Items to Folder...
Follow the wizard.
Head over to Source Control Explorer and browse to the place in the tree which matches where the new project is at for your solution. Add the files there.
However, I'd be concerned that you modified the solution file and it didn't ask you to check that out. What you may want to try doing is manually checking out the solution file, then readding the project to the solution and seeing if it takes then.
You shouldn't need to drop to the command line - this is a pretty straightforward operation.
Open the solution. Select the project (make sure it is in the solution).
File -> Source Control -> Properties will bring up the binding dialog.
Bind the project to source control.
You should now see + signs next to all your files. The key is that that a .vssscc is added for your project to version control.
If that fails, open your csproj in notepad (after making a backup), and ensure any version control bindings are removed, then try again.
Unfortunately, I'd wager that your best bet is to manually do the check-ins through the command line. I've ran into situations where the Team Explorer UI grows out of sync with what's actually happening in source control, and manually fixing things through tf.exe was the only way to resolve it.
That said, normally, adding a new project to a solution isn't a hassle.
TFS can simply do not know about your project existed. Just add your project files through Source Control Explorer and re-load the solution.
While loading of a solution it can ask you to bind your project to source control. Let it do so by clicking Bind button - it should do all the magic for you.
Make sure you get the latest version of the solution
Check out the solution file
Add the new project
If the newly added project was previously under (another) source control, that might mess things up, make sure to "unbind" it before adding it. (See source control bindings somewhere under the "file" menu in Visual Studio)
You shouldn't need the command line.
I had this same problem in VS 2019, where I had added a new project to an existing solution, and the project wasn't showing up in pending changes. Right-clicking on the project and going to Source Control only had an option to "Add Solution to Source Control".
Using the above answers, I started down the File --> Source Control path, which then yielded an option to directly "Add selected projects to source control". Taking that option solved the problem, so that now the new project shows up in pending changes. NOTE: I'm adding this answer since it's still an issue in VS 2019, but has an easier solution now than in the past.

Resources