You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WriteLogEntry($"[{appDeployToolkitName}] session mode is [Compatibility]. This mode is for the transition of v3.x scripts and is not for new development.",LogSeverity.Warning);
642
634
WriteLogEntry("Information on how to migrate this script to Native mode is available at [https://psappdeploytoolkit.com/].",LogSeverity.Warning);
@@ -1002,8 +994,12 @@ public DeploymentSession(IReadOnlyDictionary<string, object>? parameters = null,
1002
994
1003
995
// Export session's public variables to the user's scope. For these, we can't capture the Set-Variable
1004
996
// PassThru data as syntax like `$var = 'val'` constructs a new PSVariable every time.
1005
-
if(Settings.HasFlag(DeploymentSettings.CompatibilityMode)&&SessionStateis not null)
997
+
if(compatibilityMode==true)
1006
998
{
999
+
if(SessionStateisnull)
1000
+
{
1001
+
thrownewInvalidOperationException("SessionState is not available to set compatibility mode variables.");
0 commit comments