I want to automatically activate a feature (specifically the SharePoint Server Publishing feature) automatically when I deploy a new wsp solution. Is this possible.
Where and How do I do this inside the visual studio Sharepoint project?
Hi Luis Please check this solution how to activate feature programmatically
http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/9812889d-954a-43ef-9377-6561e91f3bbf/
Look at the properties on the feature within VS -- there are a couple of options there that will control how the features behave when the solution is deployed via VS ( only ).. these settings have no affect on the solution once it is out of VS...
Activate On Default - Indicates whether the feature is activated
during installation
Always force Install - Indicates whether the feature is installed by
force, even though it is already installed.
Auto Activate in Central Admin - Indicates that the feature is
activated for administrators in CA...
Related
Basically what I need is the following. Depending of if I publish to production server or developpement server I want to use different databases. I've read a little on the topic and found out that I'm supposed to have a web.debug.config and a web.release.config And depending on which I choose from the dropdownlist in Visual Studio 2010 the appropriate web.config is being used.
The problem Is that I only have a Debug mode and a single web.config
If I add a release via the Configuration manager and call it Production I can only copy the configuration from Debug and cannot edit it.
I was usign this MSDN tutorial set it up: Tutorial
and at step 3 i noticed I didn't have the option necessary to change the configuration
Creating and Modifying Project Configurations
To create a project configuration
Open the Configuration Manager dialog box.
Select a project in the Project column.
3. In the Configuration drop-down list for that project, choose New.
I don't have the new option I can only use the debug option
My project Is actually a Website
In VB
I FOUND IT:
Since I am using a webforms Web Site, this option is simply not available.
I'm developing a Windows service in VS2012 and the setup/deployment part has been removed. So I'm not able to create a setup project. I would like to hear what you guys could recommend for a good easy to use the installer. I need to take some inputs, only strings, under the installation of the service. I've been looking at WiX but that seems a bit complex, and I only got 1 or 2 days to make this installer.
So what installer should I use other than Wix?
I've had really bad experiences with InstallShield LE (the one that comes with Visual Studio 2012), especially for Windows Services. The features that you need to install a service (custom actions, etc), don't come with the light version.
What I'm planning to do for the current Windows service I'm working on is to build it with Topshelf, which (amongst other things) means installing your service is as simple as running MyServiceApp.exe install. I'm sure even InstallShield will let you run your app once it's installed, and then your app/Topshelf can install the service component.
If InstallShield doesn't work for you, I've had good results before with NSIS. Simple, powerful, free, decent documentation. It looks a bit clunky.
Here is a list of setup tools which can get you started:
http://en.wikipedia.org/wiki/List_of_installation_software
If you don't have a lot of time for creating the installer, I recommend using a commercial tool like Advanced Installer or InstallShield. You need a license, but they are focused on usability (do more in less time).
You can do it with InstallShield LE... You can add custom actions "After Register Product" for install and for "After System Changes". These custom actions can run an EXE on the machine.
Make sure you run the command line tools "in system context"
After Register Product run the version of InstallUtil to your version of .NET
eg.
path=C:\Windows\Microsoft.NET\Framework\v4.0.30319
command=InstallUtil.exe "C:\Program Files (x86)\XXX\YYY\ZZZ.exe"
replacing XXX YYY and ZZZ to match your install
After System Changes to delete your service name run
e.g.
sc delete "servicename"
Note you need support for the custom actions within your own service executable (you needed this in earlier VS too).
You can find more information about SC here:
http://support.microsoft.com/kb/251192
To add an installer for a service, you just need to right-click on the designer for the service and click "Add Installer".
Here's the walkthrough:
http://msdn.microsoft.com/en-us/library/zt39148a.aspx
I have the requirement as follows to create an installer for a Silverlight application that consumes WCF service and SQL Server as a database.
The goal is to create an all-in-one package that installs the application, the service and the SQL Server database on the server. Although the package should include all three the user should be able to install them separately as well. For ex. Silverlight application need not be installed on the server, and the WCF service not on the client and so on.
I'm right now trying with Wix installer, this is my first time using wix. It looks good so far, but I'm not sure if it complies with all the following requirements.
Requirement:
Customers should be confident that applications will install on Windows Server 2008 R2 without degrading the operating system or other applications.
Installer related requirements
Do not require server to restart during and after Install / uninstall
Uninstall cleanly
Comply with Windows Resource Protection (WRP)
Allow user control of installation location
Comply with Kernel mode component requirements
Install shared components to correct location
Do not overwrite non proprietary files with older Versions
Support User Account Control for installation
Correctly conñgure package identity
Follow Best Practices for creating custom actions
Follow component rules
Install / uninstall
Support command iine installation
Applications using Windows Installer must successfully install in quiet mode via a command line with /qn switch.
I would like to know if Wix is the right tool or is there any other better free tools. Visual Studio setup project doesn't seem to be flexible or may be I'm wrong.
If you want a free tool Wix should be your choice. Its no so easy to use it in the beginning, but it gets the job done. VS setup project is designed for small simple setup packages, you cannot consider it as an option based on the requirements you have.
Advanced Installer recently added dedicated support for Silverlight applications. It also covers your other requirements, including SQL Server databases. The only downside is that it's a commercial tool, so you need to get a license.
But if you want a free tool, WiX allows you to hack pretty much anything into your installer. So if you like it, you should stick with it and start implementing custom actions which cover the requirements which are not supported by Windows Installer.
I have developed a s/w using acces and sqlserver 2008 and now trying to make a setup file.
How could be the possible way??
I tried in VS2008 software and development. But after installing from the msi file and running the s/w it shows an error
"Microsoft.ACE.OLEDB.12.0 provider is not registered”
plz help
You have to do a few things to set up your application:
Install the .NET framework if required
Install SQL Server 2008 if required
Install your application
Define/configure the connection from your application to the SQL Server instance
Create your database/schema in the SQL Server instance.
Ignore the SQL Server problem for a moment, the easiest way to deal with the .NET framework and installing the application would be to use a setup project - which should be available from within VS.NET under Other Project Types|Setup and Deployment. There are hooks in there to give you options for installing dependencies - of which the .NET framework is one.
Ok, you have a tool to create setups (there are several others, e.g. I'm currently using WiX which I like so far, is very capable but can rapidly becomes complex) - the problem now is that the installer you need to build will depend on how and where your application is to be deployed. Do you want to ship a complete, self-contained, application on a disc? Is it to be downloaded internally within a business or distributed over the internet - each of these suggests a different set of packages at one end "everything" at the other you want the smallest possible pieces pulled down as required or perhaps even a different packaging method (e.g. clickonce).
Next up is SQL Server. You can get a redistributable package for SQL Server 2008 Express, so distributing it is not a problem however you have to determine if the user has an existing instance they want to user or if they want to install.
Once you've got an installed instance - you need to be able to create and to maintain (update) the database/schema within that instance. That I suggest you do using code (see here: How to create "embedded" SQL 2008 database file if it doesn't exist?). Which brings us to another point, you not only have to be able to install the application the first time, but you need to make sure that a) you provide a means to uninstall the application and b) that you can neatly do an upgrade in place.
I hope there are enough pointers there to get you moving - in terms of testing this, Virtual Machines are your friend, they give you the capability to create multiple environments in which to test your deployment and the ability to quickly roll back to a clean environment to test again as its virtually impossible to properly test an installer on a dev box (I've found this out the hard way) as it will already have all the dependencies for your application installed.
Pick your tools and that should let you ask more focused questions.
Is it any way in WIX to detect that a third-party application with a specified upgrade code is installed and what is it's installation folder? I can suggest a custom action is required, but what exactly to do in such custom action? Is it possible to detect such things in VBS custom action?
It really depends on the application. Most applications publish a registry key that can be used to detect them. In that case you just need a RegistrySearch element, no custom actions necessary. If the application was installed via MSI, sometimes a ComponentSearch is better.
You can use dotNetInstaller for configure it very well. With the help of registry search you can easily find out that the program is installed or not(Use product version / Product name for additional check)