Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions msbuild/Messaging/Xamarin.Messaging.Build/BuildAgent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
using Xamarin.Messaging.Build.Contracts;
using Xamarin.Messaging.Client;

// Disable until we get around to enable + fix any issues.
#nullable disable
#nullable enable

namespace Xamarin.Messaging.Build {
public class BuildAgent : Agent {
readonly AgentInfo buildAgentInfo;

public BuildAgent (ITopicGenerator topicGenerator, string version = null, string versionInfo = null) : base (topicGenerator)
public BuildAgent (ITopicGenerator topicGenerator, string? version = null, string? versionInfo = null) : base (topicGenerator)
{
Version = string.IsNullOrEmpty (version) ? GetVersion () : version;
VersionInfo = string.IsNullOrEmpty (versionInfo) ? GetInformationalVersion () : versionInfo;
Expand Down Expand Up @@ -68,7 +67,7 @@ void SetLicenseEnvironmentVariables ()
Environment.SetEnvironmentVariable ("VSIDE", "true");

var assemblyLocation = this.GetType ().Assembly.Location;
var path = Path.GetDirectoryName (assemblyLocation);
var path = Path.GetDirectoryName (assemblyLocation)!;

AddValueToEnvVariable ("MONO_GAC_PREFIX", path);
AddValueToEnvVariable ("PATH", path);
Expand Down
7 changes: 3 additions & 4 deletions msbuild/Messaging/Xamarin.Messaging.Build/TaskRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
using Xamarin.Messaging.Build.Properties;
using Xamarin.Messaging.Build.Serialization;

// Disable until we get around to enable + fix any issues.
#nullable disable
#nullable enable

namespace Xamarin.Messaging.Build {
internal class TaskRunner : ITaskRunner {
Expand Down Expand Up @@ -39,7 +38,7 @@ public ExecuteTaskResult Execute (string taskName, string inputs)
throw new ArgumentException (string.Format (Resources.TaskRunner_Execute_Error, taskName), nameof (taskName));
}

var task = serializer.Deserialize (inputs, taskType) as Task;
var task = (Task) serializer.Deserialize (inputs, taskType);
var buildEngine = new BuildEngine ();

task.BuildEngine = buildEngine;
Expand All @@ -64,7 +63,7 @@ void SetDotNetVariables ()
} else {
//In case the XMA dotnet has not been installed yet, we use the default dotnet installation
xmaDotNetPath = GetDefaultDotNetPath ();
xmaDotNetRootPath = Path.GetDirectoryName (xmaDotNetPath);
xmaDotNetRootPath = Path.GetDirectoryName (xmaDotNetPath)!;
}

//We want to define a custom home for dotnet only if it's the Pair To Mac SDK installation
Expand Down
Loading