Visual Studio - InstallShield setup in a project with System.Data.SQLite - visual-studio-2012

I have a C# class library that references System.Data.SQLite (from nuget). This is the structure of my bin folder after build:
MyProject.dll
System.Data.SQLite.dll
x86/SQLite.Interop.dll
x64/SQLite.Interop.dll
System.Data.SQLite needs the SQLite.Interop to run and the correct dll is found at run time. However, when I generate a setup with InstallShield that includes the project primary output, the x86 and x64 folders are not copied and my application fails to run.
There is any way to force Visual Studio to include x86 and x64 folders in the primary output?
There is any way to include the folders manually in the InstallShield with relative path?
My environment:
Visual Studio 2012 Professional
Install Shield 2013 Limited Edition (Free)
System.Data.SQLite 1.0.96

Yes, there is a way to add/deploy folders through InstallShield. Under the Files tabs you can add the files/folder. While adding these files you can set relative path as well in this. Just set a property with the path and use that property in your relative path. So where do want to copy these files (reference locations for DLL), you can add that folder structure through InstallShield and you can add files in that.

I just ran across the same problem using VS2013 / Installshield LE; I ended up opting for changing the NuGet package on my machine to NOT create the x86 folder for the SQLite.interop.dll under the build folder.
To do that, look in the "packages\System.Data.SQLite.Core.1.0.104.0\build" folder under your project directory. Then pick the subfolder pertinent to the version of .NET you're targeting, and open the "System.Data.SQLite.Core.targets" file in a text editor. You'll want to delete all references to "%(RecursiveDir)" EXCEPT in the "SQLite Interop Library Content Items" section. Save, clean, and rebuild - the interop dll should now be in the same folder as the main executable/etc, and Installshield should be able to automatically include it as a dependency.
If it doesn't show up in the right place, try editing a different .NET version's .target file until you hit the right one.

Related

TFS: Get specific directory before automatic build

We have a directory in TFS (a team project) where all our internals and third parties DLL are referenced. It's works great, all our project references these directory.
When I configure an automatic build of my project, I would like that TFS automatically download the latest version of this directory, before TFS do my build. I could configure it?
By the way: We use VS2012 and TFS2012.
Thank you.
In a XAML build, map the TFVC folder where those assemblies are stored under the "Source Settings" tab.

Installshield Include redistributable with program setup exe

Just got InstallShield Pro and I've created my setup singleimage executable.
I need to include the Visual C++ 2005 SP1 redistributable within the setup.
I've ticked the redistributable I want in the menu under 'Application Data'.
I've right clicked it and changed the 'Build Location' to 'extract from setup.exe'.
However, when I build my setup, it has a folder called 'ISSetupPrerequisites' which has the VC++ redistributable in it.
Is there anyway I can incorporate this in to a single exe with my installer?
If I remove that folder it downloads the redistributable from the internet.
Thanks
Yes. You can include the contents of the ISSetupPrerequisites folder inside the exe by changing their location in the setup.exe tab of the Releases view. You can change this on a .prq by .prq basis by right clicking a prerequisite in the Redistributables view and selecting a location there.
The 'Prerequisite' section of an InstallShield project includes modules which are external to the installation itself.
What you need to do is use the 'Merge Modules' feature (under Application Data => Objects) and select the relevant ones to include by your installer.
Another option is to manually add the redistributable exe in your Support dir, and call it during installation using InstallScript, like this:
LaunchAppAndWait("cmd","/c start /wait \"" + SUPPORTDIR ^ "vcredist.exe" +
"\" /q /norestart",LAAW_OPTION_WAIT | LAAW_OPTION_SHOW_HOURGLASS);
Note that if you're going to use this method in an InstallScript MSI project, you must call it during OnFirstUIBefore() or OnFirstUIAfter(), otherwise you will get an error regarding nested MSI installations.
I added a post build custom action aver the setup dialog success. Added vcredist_x86.exe to the install. And put /install as the command line - which is the only command line option that worked for me.
If I did it any other way the redist error-ed because two installs were going on.
In the View List under Media, click Releases.
Select the specific release.
Go to the Setup.exe tab.
For the InstallShield Prerequisites Location setting, select Extract From Setup.exe.

What are .iml files in Android Studio?

What are .iml files in Android Studio project? I read that it is configuration file for modules. I do not understand how it works, and can't I just use gradle scripts to integrate with external modules that you add to your project.
Also, most of the time AS generates them, so I cannot control project behaviour. If I have a team that works in different IDEs like Eclipse and AS, is it possible to setup my project so it's IDE agnostic?
I don't fully understand how this system works.
What are iml files in Android Studio project?
A Google search on iml file turns up:
IML is a module file created by IntelliJ IDEA, an IDE used to develop Java applications. It stores information about a development module, which may be a Java, Plugin, Android, or Maven component; saves the module paths, dependencies, and other settings.
(from this page)
why not to use gradle scripts to integrate with external modules that you add to your project.
You do "use gradle scripts to integrate with external modules", or your own modules.
However, Gradle is not IntelliJ IDEA's native project model — that is separate, held in .iml files and the metadata in .idea/ directories. In Android Studio, that stuff is largely generated out of the Gradle build scripts, which is why you are sometimes prompted to "sync project with Gradle files" when you change files like build.gradle. This is also why you don't bother putting .iml files or .idea/ in version control, as their contents will be regenerated.
If I have a team that work in different IDE's like Eclipse and AS how to make project IDE agnostic?
To a large extent, you can't.
You are welcome to have an Android project that uses the Eclipse-style directory structure (e.g., resources and manifest in the project root directory). You can teach Gradle, via build.gradle, how to find files in that structure. However, other metadata (compileSdkVersion, dependencies, etc.) will not be nearly as easily replicated.
Other alternatives include:
Move everybody over to another build system, like Maven, that is equally integrated (or not, depending upon your perspective) to both Eclipse and Android Studio
Hope that Andmore takes off soon, so that perhaps you can have an Eclipse IDE that can build Android projects from Gradle build scripts
Have everyone use one IDE
Add .idea and *.iml to .gitignore, you don't need those files to successfully import and compile the project.
They are project files, that hold the module information and meta data.
Just add *.iml to .gitignore.
In Android Studio: Press CTRL + F9 to rebuild your project. The missing *.iml files will be generated.
Those files are created and used by Android Studio editor.
You don't need to check in those files to version control.
Git uses .gitignore file, that contains list of files and directories, to know the list of files and directories that don't need to be checked in.
Android studio automatically creates .gitingnore files listing all files and directories which don't need to be checked in to any version control.

How to change working directory in Visual Studio

How can I change the working director of Visual Studio C++ 2012. The default working directory is $(ProjectDir), every file I create in my codes are created in the project directory. What I want is that every file is created in the source code's directory, is that possible?
There is no convenient way to do it, but there are some workarounds.
One solution is to move project file to source directory.
Another solution is to add whole source directory to project (just drag'n'drop directory from windows explorer to project in solution explorer). Now, you can add items by right-clicking at source directory in solution explorer. They'll go to physical source folder. This surely works on Visual Studio 2013 RC, but I'm not quite sure about Visual Studio 2012.
One more solution, is to create Project Wizard or even Plugin. It's along story. Maybe, someone already done this, but I was unable to find.

Changing the location of the components folder

In Visual Studio 2012, I am using a Xamarin.iOS project type and when I add components to a project, they're added to the folder: [Solution-directory]/Components/[component-name]/
Is it possible to choose where the components are stored?
My dependency management strategy is to store the dependencies outside of the project and solution area in their own folder.
I guess I could rip out the DLL from the /lib/ folder within the component directory, but I am wondering if there is an easier solution.
You can specify the components directory with a components.config file. This is detailed here regarding Xamarin Studio, but I just tested this myself by having it in the root of the solution directory, and it did work.

Resources