DrJohnT/DeployCube

DeployTabularModel Version Validation Error

Closed this issue · 20 comments

I'm getting the following error in Publish-Cube even though the PreferredVersion passed in is 140 (which IS in the list).

Error: Cannot validate argument on parameter 'Version'. The argument "" does not belong to the set "150,140,130,120,110,latest"

Here is the section that shows what is set as the PreferredVersion:

2019-06-25T22:17:09.7708205Z Invoking Publish-Cube from DeployCube module with the following parameters:
2019-06-25T22:17:09.7712494Z AsDatabasePath: D:\AzureDevOpsAgent_work\3\s\xxx\bin\Development\xxx.asdatabase
2019-06-25T22:17:09.7716702Z AsServer: xxx
2019-06-25T22:17:09.7720932Z CubeDatabaseName: xxx Data Mart
2019-06-25T22:17:09.7724964Z PreferredVersion: 140

Hi, can you please confirm that you actually have "Microsoft.AnalysisServices.Deployment.exe" installed on your deployment machine by running:
Find-AnalysisServicesDeploymentExeLocations

I suspect the "Microsoft.AnalysisServices.Deployment.exe" is not present

I presume "Microsoft.AnalysisServices.Deployment.exe" was not present??

The script uses the env variable ${env:ProgramFiles(x86)} but that does assume SQL Server is installed in that path. I could try the registry. Tell me. does this key in your registry accurately reflect the install location of SSMS?
HKEY_CLASSES_ROOT\ssms.sql.XX.0\Shell\Open\Command
Where XX is the SQL version
e.g.
HKEY_CLASSES_ROOT\ssms.sql.14.0\Shell\Open\Command

OK will take a look

Hi, I also have this issue.

When I run the TFS task I have the error "The specified module 'sqlserver' was not loaded because no valid module file was found in any module directory.".

The readme says "The module also requires the Microsoft SQL Server PowerShell module SqlServer which is installed automatically." but starting from SSMS 17 the PowerShell module is installed in separate.

After installing the module in the system I have the following error:

"Cannot validate argument on parameter 'Version'. The argument "" does not belong to the set "150,140,130,120,110,latest" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again."

I have SSMS v18.2 installed which installs Microsoft.AnalysisServices.Deployment.exe on "C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common 7\IDE" and not in "C:\Program Files (x86)\Microsoft SQL Server" as the Find-AnalysisServicesDeploymentExeLocations task expects.

Regards,

Hi, I also have this issue.
The extension does not find Microsoft.AnalysisServices.Deployment.exe when installed on D: drive and I get the same error as jabteles.
It would be nice if also iterated through the paths in the Path System Environment variable.
Thanks,
Troels Vastrup

Hi All, any update on this? I have my exe installed on
E:\Microsoft SQL Server Management Studio 18\Common7\IDE

I see we have a fix for the issue (#3) will we have a release soon? Regards

Version 1.2 supports an environment variable $env:CustomAsDwInstallLocation which allows you to specify your own custom install directory.

Version 1.2 supports an environment variable $env:CustomAsDwInstallLocation which allows you to specify your own custom install directory.

Hi, this doesn't solve my issue and I believe the original issue from this thread, since Microsoft.AnalysisServices.Deployment.exe is installed on a default location and not a custom.

SSMS v18.2 installs Microsoft.AnalysisServices.Deployment.exe on "C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common 7\IDE".

Will you release a DevOps Task version with the fix reported in #3?

@jabteles

SSMS v18.2 installs Microsoft.AnalysisServices.Deployment.exe on xxx

Issue fixed. Please see release notes.
https://github.com/DrJohnT/DeployCube/releases/tag/1.2.0

PowerShell module now published on the gallery here https://www.powershellgallery.com/packages/DeployCube/1.2.0

@DrJohnT I appreciate that, but will you update the DevOps Task with the new feature? (https://marketplace.visualstudio.com/items?itemName=DrJohnExtensions.DeployTabularModel)

@DrJohnT I appreciate that, but will you update the DevOps Task with the new feature?

That's the plan!

Hi,

I am still getting this error,

"Cannot validate argument on parameter 'Version'. The argument "" does not belong to the set "150,140,130,120,110,15,14,13,12,11" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again." when trying to deploy the DACPAC file.

Hi,

I am still getting this error,

"Cannot validate argument on parameter 'Version'. The argument "" does not belong to the set "150,140,130,120,110,15,14,13,12,11" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again." when trying to deploy the DACPAC file.

You mention a DACPAC, but this error is for the DeployTabularModel task. No DACPAC involved??!!??

As in a DACPAC is not relevant to tabular cube deployment

But I am getting it for the DACPAC task. Please check the attached screenshot.
Capture

But I am getting it for the DACPAC task.

OK, but this bug (i.e. see title at top of page) was raised against the DeployTabularModel task.

As I happens, I have fixed other issues in the Deploy DacPAC extension and just republished it to the Visual Studio Marketplace. Please check if v1.2.6 of the extension fixes your issue. If not, please raise a new bug with the correct title :-)

@DrJohnT I appreciate that, but will you update the DevOps Task with the new feature? (https://marketplace.visualstudio.com/items?itemName=DrJohnExtensions.DeployTabularModel)
@jabteles
Republished last week. :-)