Skip to content
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

Dominique v2 mods #193

Open
wants to merge 10 commits into
base: adrian-CLIv2-updates
Choose a base branch
from
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
with:
repository: WildernessLabs/Meadow.CLI
path: Meadow.CLI
ref: dominique-V2022ToV2
ref: dominique-TestDebugging

- name: Checkout Meadow.Contracts side-by-side
uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Meadow</RootNamespace>
<AssemblyName>Meadow.2022</AssemblyName>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<GeneratePkgDefFile>true</GeneratePkgDefFile>
<UseCodebase>true</UseCodebase>
<IncludeAssemblyInVSIXContainer>true</IncludeAssemblyInVSIXContainer>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="VS_Meadow_Extension.2022.d5eb772d-2173-4795-b60b-67929a9bf12d" Version="2.0.0.9" Language="en-US" Publisher="Wilderness Labs" />
<Identity Id="VS_Meadow_Extension.2022.d5eb772d-2173-4795-b60b-67929a9bf12d" Version="2.0.0.10" Language="en-US" Publisher="Wilderness Labs" />
<DisplayName>VS 2022 Tools for Meadow</DisplayName>
<Description xml:space="preserve">Tools for developing Meadow applications</Description>
<Icon>wildernesslabs_icon.png</Icon>
Expand Down
2 changes: 1 addition & 1 deletion VS_Meadow_Extension/VS_Meadow_Extension.Shared/Globals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Meadow
{
public static class Globals
{
public const string AssemblyVersion = "2.0.0.9";
public const string AssemblyVersion = "2.0.0.10";

public const string MeadowCapability = "Meadow";

Expand Down
51 changes: 0 additions & 51 deletions VS_Meadow_Extension/VS_Meadow_Extension.Shared/MeadowConnection.cs
CartBlanche marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Microsoft.VisualStudio.ProjectSystem;
using Meadow.CLI;
using Meadow.CLI.Commands.DeviceManagement;
using Microsoft.VisualStudio.ProjectSystem;
using Microsoft.VisualStudio.ProjectSystem.Debug;
using Microsoft.VisualStudio.ProjectSystem.VS.Debug;
using Microsoft.VisualStudio.Shell;
Expand Down Expand Up @@ -52,7 +54,8 @@ public MeadowDebuggerLaunchProvider(ConfiguredProject configuredProject)

public async Task<IReadOnlyList<IDebugLaunchSettings>> QueryDebugTargetsAsync(DebugLaunchOptions launchOptions, ILaunchProfile profile)
{
var connection = MeadowConnection.GetCurrentConnection();
var route = new SettingsManager().GetSetting(SettingsManager.PublicSettings.Route);
var connection = await MeadowConnectionManager.GetConnectionForRoute(route);

if (!launchOptions.HasFlag(DebugLaunchOptions.NoDebug)
&& await IsProjectAMeadowApp()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Meadow.CLI;
using Meadow.CLI.Commands.DeviceManagement;
using Meadow.Package;
using Meadow.Software;
using Microsoft.VisualStudio.ProjectSystem;
Expand Down Expand Up @@ -86,7 +87,8 @@ public async Task DeployAsync(CancellationToken cancellationToken, TextWriter te
connection.DeviceMessageReceived -= MeadowConnection_DeviceMessageReceived;
}

connection = MeadowConnection.GetCurrentConnection();
var route = new SettingsManager().GetSetting(SettingsManager.PublicSettings.Route);
connection = await MeadowConnectionManager.GetConnectionForRoute(route);

connection.FileWriteProgress += MeadowConnection_DeploymentProgress;
connection.DeviceMessageReceived += MeadowConnection_DeviceMessageReceived;
Expand All @@ -112,17 +114,18 @@ public async Task DeployAsync(CancellationToken cancellationToken, TextWriter te
var packageManager = new PackageManager(fileManager);

outputLogger.Log("Trimming application binaries...");

await packageManager.TrimApplication(new FileInfo(Path.Combine(outputPath, "App.dll")), osVersion, includePdbs, cancellationToken: cancellationToken);

await Task.Run(async () => await AppManager.DeployApplication(packageManager, connection, osVersion, outputPath, includePdbs, false, outputLogger, cancellationToken));
CartBlanche marked this conversation as resolved.
Show resolved Hide resolved
outputLogger.Log("Deploying application...");
await AppManager.DeployApplication(packageManager, connection, osVersion, outputPath, includePdbs, false, outputLogger, cancellationToken);

await connection.RuntimeEnable();

await outputLogger.ShowBuildOutputPane();
}
finally
{
connection.FileWriteProgress -= MeadowConnection_DeploymentProgress;
CartBlanche marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)Extensions.cs">
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)MeadowConnection.cs">
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)MeadowSoftDebuggerSession.cs">
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)MeadowDebugLaunchSettings.cs">
Expand Down