Start a new topic
Answered

Unable to deploy Publish-Virto-Store-Database

* this topic is started by Virto Commerce support Team on behalf of the Grace Lurzano 


Hi, 
Im unable to continue deploying. I dont know how to explain. 
Please see attached file. 
Sorry for the bad image. Its hard to capture, powershell is automatically closing.
Thank you!

Error details:

The term 'Publish-Virto-Store-Database' is not recognzed as athe nmae of a cmd, functionm script file or operable program. Check the spellin gof the nmae, or if the a path was included.

Best Answer

This issue happens when script fails to import VirtoCommerce.PowerShell.dll

So make sure you have built VirtoCommerce.PowerShell project first.

Also launch the script from original folder or if you copy it to any other folder you must specify the path to VirtoCommerce.PowerShell.dll by using $moduleFile parameter

(ex. .\setup-database.ps1 -moduleFile .\bin\Debug\VirtoCommerce.PowerShell.dll)


1 person has this question

Answer

This issue happens when script fails to import VirtoCommerce.PowerShell.dll

So make sure you have built VirtoCommerce.PowerShell project first.

Also launch the script from original folder or if you copy it to any other folder you must specify the path to VirtoCommerce.PowerShell.dll by using $moduleFile parameter

(ex. .\setup-database.ps1 -moduleFile .\bin\Debug\VirtoCommerce.PowerShell.dll)

Hi, 


The errors I'm getting are:


"Could not load file VirtoCommerce.Powershell.dll" or one of its dependecies. This assembly is built by a runtime newer than the currently loaded runtime and could not be loaded."

"The term `Publish-Virto-Store-Database` is not recognized as the name of the cmdlet, funciton, script fie, or operable porgram. Check the spelling of the name or if the path was included. Verify that the path is correct and try again."



Added detail. Please see the build output below.


1>------ Rebuild All started: Project: CommerceFoundation, Configuration: Release Any CPU ------
2>------ Rebuild All started: Project: ESWorkerRole, Configuration: Release Any CPU ------
2>  All packages listed in packages.config are already installed.
2>  ESWorkerRole -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Azure\WorkerRoles\Search\ESWorkerRole\bin\Release\VirtoCommerce.Azure.ESWorkerRole.dll
3>------ Rebuild All started: Project: ElasticSearch, Configuration: Release Any CPU ------
1>  All packages listed in packages.config are already installed.
1>  CommerceFoundation -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Core\CommerceFoundation\bin\Release\VirtoCommerce.Foundation.dll
4>------ Rebuild All started: Project: CommerceFoundation.Data, Configuration: Release Any CPU ------
5>------ Rebuild All started: Project: Presentation.Core, Configuration: Release Any CPU ------
6>------ Rebuild All started: Project: SchedulingLib, Configuration: Release Any CPU ------
7>------ Rebuild All started: Project: CommerceClient, Configuration: Release Any CPU ------
6>  All packages listed in packages.config are already installed.
6>  SchedulingLib -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Extensions\Jobs\SchedulingLib\bin\Release\VirtoCommerce.Scheduling.dll
8>------ Rebuild All started: Project: VirtoCommerce.Caching.HttpCache, Configuration: Release Any CPU ------
7>  All packages listed in packages.config are already installed.
7>  CommerceClient -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Extensions\Client\CommerceClient\bin\Release\VirtoCommerce.Client.dll
9>------ Rebuild All started: Project: OrderWorkflowActivities, Configuration: Release Any CPU ------
8>  VirtoCommerce.Caching.HttpCache -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Extensions\Cache\VirtoCommerce.Caching.HttpCache\bin\Release\VirtoCommerce.Caching.HttpCache.dll
10>------ Rebuild All started: Project: ServerJobs, Configuration: Release Any CPU ------
10>  All packages listed in packages.config are already installed.
10>  ServerJobs -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Extensions\Jobs\VirtoCommerceJobs\bin\Release\VirtoCommerce.Scheduling.Jobs.dll
11>------ Rebuild All started: Project: SimpleShippingGateway, Configuration: Release Any CPU ------
9>  All packages listed in packages.config are already installed.
9>  OrderWorkflowActivities -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Extensions\Workflow\OrderWorkflowActivities\bin\Release\VirtoCommerce.OrderWorkflowActivities.dll
12>------ Rebuild All started: Project: OrderWorkflow, Configuration: Release Any CPU ------
11>  All packages listed in packages.config are already installed.
11>  SimpleShippingGateway -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Extensions\Shipping\SimpleShippingGateway\bin\Release\VirtoCommerce.SimpleShippingGateway.dll
13>------ Rebuild All started: Project: VirtoCommerce.Caching.AppFabric, Configuration: Release Any CPU ------
4>  All packages listed in packages.config are already installed.
4>  CommerceFoundation.Data -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Core\CommerceFoundation.Data\bin\Release\VirtoCommerce.Foundation.Data.dll
14>------ Rebuild All started: Project: VirtoCommerce.Search.Index, Configuration: Release Any CPU ------
14>  All packages listed in packages.config are already installed.
14>  VirtoCommerce.Search.Index -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Extensions\Search\IndexingProviders\bin\Release\VirtoCommerce.Search.Index.dll
15>------ Rebuild All started: Project: ElasticSearchProvider, Configuration: Release Any CPU ------
13>  VirtoCommerce.Caching.AppFabric -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Extensions\Cache\AppFabricCacheService\bin\Release\VirtoCommerce.Caching.AppFabric.dll
16>------ Rebuild All started: Project: CommerceFoundation.Data.Azure, Configuration: Release Any CPU ------
15>  All packages listed in packages.config are already installed.
15>  ElasticSearchProvider -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Extensions\Search\ElasticSearchProvider\bin\Release\VirtoCommerce.ElasticSearchProvider.dll
17>------ Rebuild All started: Project: VirtoCommerce.PowerShell, Configuration: Release Any CPU ------
5>  All packages listed in packages.config are already installed.
5>  Presentation.Core -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Presentation\Admin\Presentation.Core\bin\Release\VirtoCommerce.ManagementClient.Core.dll
18>------ Rebuild All started: Project: Presentation.Security, Configuration: Release Any CPU ------
16>  All packages listed in packages.config are already installed.
16>  CommerceFoundation.Data.Azure -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Extensions\Azure\CommerceFoundation.Data.Azure\bin\Release\VirtoCommerce.Foundation.Data.Azure.dll
19>------ Rebuild All started: Project: Presentation.Reviews, Configuration: Release Any CPU ------
18>  All packages listed in packages.config are already installed.
18>  Presentation.Security -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Presentation\Admin\Presentation.Security\bin\Release\VirtoCommerce.ManagementClient.Security.dll
20>------ Rebuild All started: Project: Presentation.Asset, Configuration: Release Any CPU ------
19>  All packages listed in packages.config are already installed.
19>  Presentation.Reviews -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Presentation\Admin\Presentation.Reviews\bin\Release\VirtoCommerce.ManagementClient.Reviews.dll
21>------ Rebuild All started: Project: Presentation.Configuration, Configuration: Release Any CPU ------
17>  All packages listed in packages.config are already installed.
17>  VirtoCommerce.PowerShell -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Extensions\Setup\VirtoCommerce.PowerShell\bin\Release\VirtoCommerce.PowerShell.dll
22>------ Rebuild All started: Project: CommerceWebClient, Configuration: Release Any CPU ------
21>  All packages listed in packages.config are already installed.
21>  Presentation.Configuration -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Presentation\Admin\Presentation.Configuration\bin\Release\VirtoCommerce.ManagementClient.Configuration.dll
23>------ Rebuild All started: Project: PaymentGateways, Configuration: Release Any CPU ------
23>  PaymentGateways -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Extensions\Payments\PaymentGateways\bin\Release\VirtoCommerce.PaymentGateways.dll
24>------ Rebuild All started: Project: AzureSchedulingLib, Configuration: Release Any CPU ------
20>  All packages listed in packages.config are already installed.
20>  Presentation.Asset -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Presentation\Admin\Presentation.Asset\bin\Release\VirtoCommerce.ManagementClient.Asset.dll
25>------ Rebuild All started: Project: Presentation.Import, Configuration: Release Any CPU ------
25>  All packages listed in packages.config are already installed.
25>  Presentation.Import -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Presentation\Admin\Presentation.Import\bin\Release\VirtoCommerce.ManagementClient.Import.dll
12>  All packages listed in packages.config are already installed.
12>  OrderWorkflow -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Extensions\Workflow\OrderWorkflow\bin\Release\VirtoCommerce.OrderWorkflow.dll
26>------ Rebuild All started: Project: Presentation.Catalog, Configuration: Release Any CPU ------
27>------ Rebuild All started: Project: Presentation.Customers, Configuration: Release Any CPU ------
27>  All packages listed in packages.config are already installed.
27>  Presentation.Customers -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Presentation\Admin\Presentation.CustomerService\bin\Release\VirtoCommerce.ManagementClient.Customers.dll
28>------ Rebuild All started: Project: UnitTests, Configuration: Release Any CPU ------
28>  All packages listed in packages.config are already installed.
28>  UnitTests -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\Tests\UnitTests\bin\Release\CommerceFoundation.UnitTests.dll
29>------ Rebuild All started: Project: VirtoCommerce.PowerShell.Tests, Configuration: Release Any CPU ------
26>  All packages listed in packages.config are already installed.
26>  Presentation.Catalog -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Presentation\Admin\Presentation.Catalog\bin\Release\VirtoCommerce.ManagementClient.Catalog.dll
30>------ Rebuild All started: Project: Presentation.DynamicContent, Configuration: Release Any CPU ------
29>  All packages listed in packages.config are already installed.
29>  VirtoCommerce.PowerShell.Tests -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Extensions\Setup\VirtoCommerce.PowerShell.Tests\bin\Release\VirtoCommerce.PowerShell.Tests.dll
24>  All packages listed in packages.config are already installed.
24>  AzureSchedulingLib -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Extensions\Jobs\AzureSchedulingLib\bin\Release\VirtoCommerce.Scheduling.Azure.dll
31>------ Rebuild All started: Project: Presentation.AppConfig, Configuration: Release Any CPU ------
32>------ Rebuild All started: Project: WindowsServerSchedulingLib, Configuration: Release Any CPU ------
33>------ Rebuild All started: Project: Presentation.Order, Configuration: Release Any CPU ------
30>  All packages listed in packages.config are already installed.
30>  Presentation.DynamicContent -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Presentation\Admin\Presentation.DynamicContent\bin\Release\VirtoCommerce.ManagementClient.DynamicContent.dll
34>------ Rebuild All started: Project: Presentation.Marketing, Configuration: Release Any CPU ------
34>  All packages listed in packages.config are already installed.
34>  Presentation.Marketing -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Presentation\Admin\Presentation.Marketing\bin\Release\VirtoCommerce.ManagementClient.Marketing.dll
35>------ Rebuild All started: Project: FunctionalTests, Configuration: Release Any CPU ------
31>  All packages listed in packages.config are already installed.
31>  Presentation.AppConfig -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Presentation\Admin\Presentation.AppConfig\bin\Release\VirtoCommerce.ManagementClient.AppConfig.dll
36>------ Rebuild All started: Project: Commerce.JobWorkerRole, Configuration: Release Any CPU ------
33>  All packages listed in packages.config are already installed.
33>  Presentation.Order -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Presentation\Admin\Presentation.Order\bin\Release\VirtoCommerce.ManagementClient.Order.dll
37>------ Rebuild All started: Project: Presentation.Main, Configuration: Release Any CPU ------
32>  All packages listed in packages.config are already installed.
32>  WindowsServerSchedulingLib -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Extensions\Jobs\WindowsServerSchedulingLib\bin\Release\VirtoCommerce.Scheduling.Windows.dll
38>------ Rebuild All started: Project: StoreWebApp, Configuration: Release Any CPU ------
36>  All packages listed in packages.config are already installed.
36>  Commerce.JobWorkerRole -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Azure\WorkerRoles\Scheduler\SchedulerWorkerRole\bin\Release\VirtoCommerce.JobWorkerRole.dll
39>------ Rebuild All started: Project: Presentation.Fulfillment, Configuration: Release Any CPU ------
38>  All packages listed in packages.config are already installed.
38>  StoreWebApp -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Presentation\FrontEnd\StoreWebApp\bin\VirtoCommerce.Web.dll
40>------ Skipped Rebuild All: Project: VirtoCommerceModeling, Configuration: Release Any CPU ------
40>Project not selected to build for this solution configuration 
41>------ Rebuild All started: Project: AzureScheduler, Configuration: Release Any CPU ------
42>------ Rebuild All started: Project: CommerceSite, Configuration: Release Any CPU ------
43>------ Rebuild All started: Project: Performance.FunctionalTests, Configuration: Release Any CPU ------
43>  All packages listed in packages.config are already installed.
43>  Performance.FunctionalTests -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\Tests\Performance.FunctionalTests\bin\Release\CommerceFoundation.PerformanceTests.dll
39>  All packages listed in packages.config are already installed.
39>  Presentation.Fulfillment -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Presentation\Admin\Presentation.Fulfillment\bin\Release\VirtoCommerce.ManagementClient.Fulfillment.dll
37>  All packages listed in packages.config are already installed.
37>  Presentation.Main -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Presentation\Admin\Presentation.Main\bin\Release\VirtoCommerce.ManagementClient.Main.dll
44>------ Rebuild All started: Project: Presentation.Application, Configuration: Release Any CPU ------
35>  All packages listed in packages.config are already installed.
35>  FunctionalTests -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\Tests\FunctionalTests\bin\Release\CommerceFoundation.FunctionalTests.dll
45>------ Rebuild All started: Project: UI.FunctionalTests.Helpers, Configuration: Release Any CPU ------
46>------ Rebuild All started: Project: UI.FrontEnd.FunctionalTests, Configuration: Release Any CPU ------
45>Project file contains ToolsVersion="12.0". This toolset is unknown or missing. You may be able to resolve this by installing the appropriate .NET Framework for this toolset. Treating the project as if it had ToolsVersion="4.0".
45>  All packages listed in packages.config are already installed.
45>  UI.FunctionalTests.Helpers -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\Tests\UI.FunctionalTests.Helpers\bin\Release\UI.FunctionalTests.Helpers.dll
46>  All packages listed in packages.config are already installed.
46>  UI.FrontEnd.FunctionalTests -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\Tests\UI.FrontEnd.FunctionalTests\bin\Release\UI.FrontEnd.FunctionalTests.dll
47>------ Rebuild All started: Project: UI.FunctionalTests, Configuration: Release Any CPU ------
44>  All packages listed in packages.config are already installed.
44>  Presentation.Application -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\src\Presentation\Admin\Presentation.Application\bin\Release\VirtoCommerce.exe
47>  All packages listed in packages.config are already installed.
47>Project file contains ToolsVersion="12.0". This toolset is unknown or missing. You may be able to resolve this by installing the appropriate .NET Framework for this toolset. Treating the project as if it had ToolsVersion="4.0".
47>Project file contains ToolsVersion="12.0". This toolset is unknown or missing. You may be able to resolve this by installing the appropriate .NET Framework for this toolset. Treating the project as if it had ToolsVersion="4.0".
47>Project file contains ToolsVersion="12.0". This toolset is unknown or missing. You may be able to resolve this by installing the appropriate .NET Framework for this toolset. Treating the project as if it had ToolsVersion="4.0".
47>  UI.FunctionalTests -> C:\Users\FTPINC5\Downloads\VirtoCommerce.Source\Tests\UI.FunctionalTests\bin\Release\CommerceFoundation.UI.FunctionalTests.dll
========== Rebuild All: 46 succeeded, 0 failed, 1 skipped ==========

Can you check which version of power-shell do you have by using get-host command?

You can download and install new version from http://www.microsoft.com/en-us/download/details.aspx?id=34595

Hi, 


I tried doing it. Now my error im getting is this. 


"An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct."


I changed the connection and also I changed it back to  nut its still the same. 


virto.png
(539 KB)

The original issue is solved.


The issue you have now is because the connection string is not correct. The original connection string requires that you have locally sql server installed with default instance http://stackoverflow.com/questions/3586196/default-instance-name-of-sql-server-express. If you have sql express you can also try connection string with 'Server=.\SQLEXPRESS...

this resolved my issue. 


$dbconnection = "Server=.\SQLExpress; Database=VirtoCommerce;Trusted_Connection=Yes;",


Thank you!

Login or Signup to post a comment