Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@
<ProjectCapability Include="AndroidApplication" Condition="$(AndroidApplication)" />
</ItemGroup>

<!-- NOTE: We have to replace the Run target after Microsoft.NET.Sdk.targets are imported -->
<Target Name="Run" DependsOnTargets="Publish;Install;StartAndroidActivity" />

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ public bool Publish (string target = null)
return Execute (arguments.ToArray ());
}

public bool Run ()
{
//TODO: this should eventually run `dotnet run --project foo.csproj`
var arguments = GetDefaultCommandLineArgs ("publish", "Run");
return Execute (arguments.ToArray ());
}

public IEnumerable<string> LastBuildOutput {
get {
if (!string.IsNullOrEmpty (BuildLogFile) && File.Exists (BuildLogFile)) {
Expand Down
3 changes: 1 addition & 2 deletions tests/MSBuildDeviceIntegration/Tests/XASdkDeployTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ public void DotNetInstallAndRun ([Values (false, true)] bool isRelease)
proj.CopyNuGetConfig (relativeProjDir);
var dotnet = new DotNetCLI (proj, Path.Combine (fullProjDir, proj.ProjectFilePath));

Assert.IsTrue (dotnet.Publish ("Install"), "`dotnet publish /t:Install` should succeed");
AdbStartActivity ($"{proj.PackageName}/{proj.JavaPackageName}.MainActivity");
Assert.IsTrue (dotnet.Run (), "`dotnet run` should succeed");
bool didLaunch = WaitForActivityToStart (proj.PackageName, "MainActivity",
Path.Combine (fullProjDir, "logcat.log"), 30);
RunAdbCommand ($"uninstall {proj.PackageName}");
Expand Down