Announcing 8.0 Preview 1 release #326
NikolaMilosavljevic
announced in
Announcement
Replies: 2 comments 2 replies
-
Sorry, I know this discussion is a year old, but I'm wondering how I can set ActivationData when programmatically launching a (Available offline) ClickOnce app via the appref-ms file? I've tried running the process with arguments, but this results in a hard crash. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Any guides on how to build and package on a Linux agent? I'm lost. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Along with .NET 8.0 Preview 1 we have release a preview of
dotnet-mage
tool: https://www.nuget.org/packages/Microsoft.DotNet.Mage/8.0.0-preview.1.23115.1Notable changes are:
Note that this preview of
dotnet-mage
does not require .NET 8.0 Preview 1 and still runs on .NET 7.0. This will change in future preview releases.Both changes were implemented with #245
Launcher will now read
AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData
array and set the appropriate environment variables if array is non-empty.New environment variables
ClickOnce_ActivationData_Count
If this variable exists, the value is the count of elements in ActivationData string array.
ClickOnce_ActivationData_<n>
For each element in array, new environment variable gets added, with a zero-based index, i.e.:
ClickOnce_ActivationData_0
ClickOnce_ActivationData_1
...
Note that the scenarios being fixed always use the
0
-index element, so the variable will always beClickOnce_ActivationData_0
, but the code is flexible and is able to pass all activation data to .NET app.Usage scenario
Developer can read these environment variables to discover ActivationData content, using something like the following:
string value = Environment.GetEnvironmentVariable("ClickOnce_ActivationData_0");
Previously, for .NET FX apps, this would have been achieved using the following code:
string value = AppDomain.CurrentDomain?.SetupInformation?.ActivationArguments?.ActivationData?[0];
Beta Was this translation helpful? Give feedback.
All reactions