Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Visual Studio Project Template and SQL Server named instance

Vote:
 

Hello,

I'm trying to create a new EPiServer 7 MVC project using Visual Studio Project Template for EPiServer.
I don't have a default SQL Server instance, just the named one.

The Project Template cannot detect my named instance and throws the following exception:

 

An unhandled error has occured:
The argument is null or empty. Provide an argument that is not null or empty,
and then try the command again.
When executing
At C:\Program Files (x86)\EPiServer\CMS\7.0.586.1\Install\System Scripts\Instal
l Database (SqlServer).ps1:139 char:18
+ -SqlServerName $wizard.Database.DatabaseServerName `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

True
=
Get-EPiIsBulkInstalling
An error has occured and the transaction will be rolled back
Rolledback

An unhandled error has occured:
The argument is null or empty. Provide an argument that is not null or empty,
and then try the command again.
When executing
At C:\Program Files (x86)\EPiServer\CMS\7.0.586.1\Install\System Scripts\Instal
l Database (SqlServer).ps1:139 char:18
+ -SqlServerName $wizard.Database.DatabaseServerName `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

At C:\Program Files (x86)\EPiServer\CMS\7.0.586.1\Install\System Scripts\Install Database (SqlServer).ps1:139 char:18
+ -SqlServerName $wizard.Database.DatabaseServerName `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
System.Management.Automation.ParentContainsErrorRecordException: Cannot validate argument on parameter 'SqlServerName'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.


I cannot modify the PowerShell script just like that because it's signed, and I don't want to drop my SQL Server instance and create a default one just for EPiServer :)
Is there any workaround?

Any help would be greatlly appreciated.

#77099
Nov 08, 2013 11:33
Vote:
 

Hello Dejan,

As a workaround you can modify the PowerShell script. In order to run it you need to remove the signature - delete everything after the comment: "# SIG # Begin signature block", and change execution policy - run Set-ExecutionPolicy RemoteSigned in PowerShell console (x86 if you have a 64-bit OS)

#77128
Nov 11, 2013 8:55
Vote:
 

I've deleted everything after # SIG # Begin signature block and executed Set-ExecutionPolicy RemoteSigned in PowerShell console. Then I tryied to create a new project and got the following error:

 

Error - File C:\Program Files (x86)\EPiServer\CMS\7.0.586.1\Install\System Scripts\Install Database (SqlServer).ps1 cannot be loaded. The file C:\Program Files (x86)\EPiServer\CMS\7.0.586.1\Install\System Scripts\Install Database (SqlServer).ps1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.

#77237
Nov 13, 2013 14:36
Vote:
 

Probably you are using 64 bit OS. The Deployment Center uses x86 version of PowerShell, so you need to change exection policy from x86 console. Here you can find how to run x86 PowerShell console:  http://technet.microsoft.com/en-us/library/hh847733.aspx or you can just run powershell.exe from c:\Windows\syswow64\Windowspowershell\v1.0\

 

#77242
Nov 13, 2013 15:46
Vote:
 

That did the trick :) Thanks!

#77669
Nov 22, 2013 14:00
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.