Skip to content

Recovery services Netstandard + Module merge for .netStandard #6975

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 4, 2018

Conversation

viverm
Copy link
Contributor

@viverm viverm commented Aug 20, 2018

Description

Checklist

@viverm viverm requested review from dragonfly91 and MiYanni August 20, 2018 12:37
@viverm viverm changed the title Recovery services Netstandard + Module merge for .netStanadard Recovery services Netstandard + Module merge for .netStandard Aug 20, 2018
@maddieclayton
Copy link
Contributor

@viverm Looks like you currently have two test dlls for RecoveryServices.SiteRecovery, one in RecoveryServices and one in RecoveryServices.SiteRecovery. That is why the move is failing - please remove the RecoveryServices.SiteRecovery file once you are confident that all the code has been moved successfully into the RecoveryServices folder, and the tests will no longer fail.

@viverm viverm force-pushed the recoveryServices_netstandard branch 2 times, most recently from 3740609 to df94e43 Compare August 21, 2018 11:34
@viverm
Copy link
Contributor Author

viverm commented Aug 21, 2018

@maddieclayton / @MiYanni
I moved the RecoveryServices.SiteRecovery code to recovery services and test in desktop running fine.
When build the project with build.proj getting the error
https://azuresdkci.westus2.cloudapp.azure.com/job/powershell/6787/console

dll is mentioned in csproj file and defined in psd1 dependency but still it is not able to find it.

_

> C:\workspace\powershell\tools\CheckAssemblies.ps1 : error : Assembly Security.Cryptography was not included in the [c:\workspace\powershell\build.proj]
> 04:58:14   c:\workspace\powershell\build.proj(372,5): error MSB3073: The command ""C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NonInteractive -NoLogo -NoProfile -Command ". c:\workspace\powershell\tools\CheckAssemblies.ps1 -BuildConfig Debug "" exited with code 1.

_

@viverm viverm requested a review from maddieclayton August 21, 2018 16:57
@MiYanni
Copy link
Contributor

MiYanni commented Aug 23, 2018

@viverm You removed Security.Cryptography.dll from AzureRM.RecoveryServices.Backup.psd1. Was that your intention? That psd1 is used for the desktop build. The Az. version is for NetStandard.

@viverm
Copy link
Contributor Author

viverm commented Aug 27, 2018

@MiYanni Intentionally removed the dll from backup as it is not used in that module.

@dragonfly91 Can you also check the code once.

@viverm
Copy link
Contributor Author

viverm commented Aug 27, 2018

@MiYanni please help with build failure issue.

_

C:\workspace\powershell\tools\CheckAssemblies.ps1 : error : Assembly Security.Cryptography was not included in the [c:\workspace\powershell\build.proj]
04:58:14 c:\workspace\powershell\build.proj(372,5): error MSB3073: The command ""C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NonInteractive -NoLogo -NoProfile -Command ". c:\workspace\powershell\tools\CheckAssemblies.ps1 -BuildConfig Debug "" exited with code 1.

_

@MiYanni
Copy link
Contributor

MiYanni commented Aug 27, 2018

@viverm So, looking through your code, Commands.RecoveryServices still relies on Security.Cryptography. The project, Commands.RecoveryServices.Backup.ServiceClientAdapter, depends on Commands.RecoveryServices. The project, Commands.RecoveryServices.Backup, depends on Commands.RecoveryServices.Backup.ServiceClientAdapter. Therefore, Commands.RecoveryServices.Backup relies on Security.Cryptography. So, you have to remove the dependency on Security.Cryptography for everything.

@viverm viverm force-pushed the recoveryServices_netstandard branch from 23319b6 to 1f40abb Compare August 29, 2018 11:16
@viverm
Copy link
Contributor Author

viverm commented Aug 29, 2018

@MiYanni travis build is struck from long time.
Desktop build passed
Can you please check .

@MiYanni
Copy link
Contributor

MiYanni commented Aug 29, 2018

@viverm The Travis build won't run until you resolve your conflicts. The Travis build is different from the Jenkins build. The Travis build merges latest preview into your branch to do a build. So, if it detects a conflict, it won't run the build. Jenkins simply uses the bits from your branch to run.

Copy link
Contributor

@MiYanni MiYanni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has a lot of great changes in it! There are just a few issues to fix up. Let me know if you have any questions based on my comments.

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<AssemblyName>Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.Test</AssemblyName>
<RootNamespace>Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.Test</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>$(ProjectDir)..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.Profile\</OutputPath>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test projects should not output into the Package directory. They simply use the normal bin directory in the project root.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am seeing the similar pattern in compute and keyvault
do you change the profile to recoveryServices?

@viverm
Copy link
Contributor Author

viverm commented Aug 31, 2018

@MiYanni check the Azure.PowerShell.Netcore.sln chagnes, I am not sure about it after merge .

@MiYanni
Copy link
Contributor

MiYanni commented Aug 31, 2018

@viverm You have the same file twice. One with capital RM and the other with Rm
image

@viverm viverm force-pushed the recoveryServices_netstandard branch from 47d87fc to 707af15 Compare August 31, 2018 18:14
@MiYanni MiYanni assigned viverm and unassigned MiYanni Aug 31, 2018
@viverm
Copy link
Contributor Author

viverm commented Sep 1, 2018

@MiYanni build successful . Let me know if any other fix or concern

@MiYanni MiYanni merged commit af097e0 into Azure:preview Sep 4, 2018
@archmangler
Copy link

I'm still seeing this issue on Ubuntu 16.04 with powershell PowerShell 6.1.0 (after apt-get update && apt-get upgrade powershell) and reinstalling the AzureRM.NetCore module:

PS /home/me> Get-AzureRmRecoveryServicesVault -Name myRecoveryServicesVault | Set-AzureRmRecoveryServicesVaultContext
Get-AzureRmRecoveryServicesVault : The term 'Get-AzureRmRecoveryServicesVault' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Get-AzureRmRecoveryServicesVault -Name myRecoveryServicesVault | Set- ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (Get-AzureRmRecoveryServicesVault:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

Is this fix available in the ubuntu package yet?

@MiYanni
Copy link
Contributor

MiYanni commented Sep 24, 2018

@archmangler This change is in our Az package, which is replacing both AzureRM and AzureRM.Netcore.
https://www.powershellgallery.com/packages/Az/0.2.2
We are no longer releasing anymore AzureRM.Netcore packages. AzureRM (Windows) will be deprecated by end-of-year.

@archmangler
Copy link

@MiYanni - thanks, I see the new installation command. Issue fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants