DrJohnT / DeployCube

Publish / Deploy a Tabular or Multidimensional Cube to SSAS or AAS
MIT License
11 stars 8 forks source link

DeployTabularModel Version Validation Error #1

Closed sqlsavant closed 3 years ago

sqlsavant commented 5 years ago

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

DrJohnT commented 5 years ago

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

DrJohnT commented 5 years ago

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

sqlsavant commented 5 years ago

Hi, thank you for the prompt response, and I apologize for my late reply! We are doing this on the side, so other projects are taking our time.

The problem is that we install everything on the D: drive, and your script expects it to be on the C: drive. We changed the script, and it works. On the tackling the next error!

Do you think it would work to have your script look at the system path environment variable? I may try that as well.

Thanks again.

Chad McKee

On Wed, Jul 3, 2019 at 4:11 PM Dr John Tunnicliffe notifications@github.com wrote:

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DrJohnT/DeployCube/issues/1?email_source=notifications&email_token=ABKV66ZIS3KXU4S5NS6EJODP5UIYRA5CNFSM4H5IXZ62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZFWBYI#issuecomment-508256481, or mute the thread https://github.com/notifications/unsubscribe-auth/ABKV665WKWYKVXQGP2KNOBLP5UIYRANCNFSM4H5IXZ6Q .

DrJohnT commented 5 years ago

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

sqlsavant commented 5 years ago

Yes...

[image: image.png]

On Wed, Jul 10, 2019 at 9:03 AM Dr John Tunnicliffe < notifications@github.com> wrote:

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DrJohnT/DeployCube/issues/1?email_source=notifications&email_token=ABKV666BUDOLC6N257ZZ53TP6XT37A5CNFSM4H5IXZ62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZTSANA#issuecomment-510074932, or mute the thread https://github.com/notifications/unsubscribe-auth/ABKV664KAJHW77HQD2X6PODP6XT37ANCNFSM4H5IXZ6Q .

DrJohnT commented 5 years ago

OK will take a look

jabteles commented 5 years ago

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,

TMV-Inspari commented 4 years ago

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

artur-tolstenco commented 4 years ago

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

jabteles commented 4 years ago

I see we have a fix for the issue (https://github.com/DrJohnT/DeployCube/pull/3) will we have a release soon? Regards

DrJohnT commented 3 years ago

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

jabteles commented 3 years ago

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 https://github.com/DrJohnT/DeployCube/pull/3?

DrJohnT commented 3 years ago

@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

jabteles commented 3 years ago

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

DrJohnT commented 3 years ago

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

That's the plan!

jaydsoni commented 3 years ago

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.

DrJohnT commented 3 years ago

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

jaydsoni commented 3 years ago

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

DrJohnT commented 3 years ago

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 commented 3 years ago

@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. :-)