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 @@ -579,7 +579,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<ResolvedFileToPublish Remove ="%(ResolvedFileToRemove.Identity)"/>

<ResolvedFileToPublish Include="%(NativeAppHostNETCore.Identity)">
<RelativePath>$(AssemblyName)%(Extension)</RelativePath>
<RelativePath>$(AssemblyName)$(_NativeExecutableExtension)</RelativePath>
</ResolvedFileToPublish>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,45 @@ public void It_publishes_self_contained_apps_to_the_publish_folder_and_the_app_s
.HaveStdOutContaining("Hello World!");
}

[Fact]
public void Publish_self_contained_app_with_dot_in_the_name()
{
var targetFramework = "netcoreapp2.0";
var rid = EnvironmentInfo.GetCompatibleRid(targetFramework);

TestProject testProject = new TestProject()
{
Name = "Hello.World",
IsSdkProject = true,
TargetFrameworks = targetFramework,
RuntimeIdentifier = rid,
IsExe = true,
};


testProject.SourceFiles["Program.cs"] = @"
using System;
public static class Program
{
public static void Main()
{
Console.WriteLine(""Hello from a netcoreapp2.0.!"");
}
}
";
var testProjectInstance = _testAssetsManager.CreateTestProject(testProject);

testProjectInstance.Restore(Log, testProject.Name);
var publishCommand = new PublishCommand(Log, Path.Combine(testProjectInstance.TestRoot, testProject.Name));
publishCommand.Execute().Should().Pass();

var publishDirectory = publishCommand.GetOutputDirectory(
targetFramework: targetFramework,
runtimeIdentifier: rid);

publishDirectory.Should().HaveFile($"Hello.World{Constants.ExeSuffix}");
}

//Note: Pre Netcoreapp2.0 stanalone activation uses renamed dotnet.exe
// While Post 2.0 we are shifting to using apphost.exe, so both publish needs to be validated
[Fact]
Expand All @@ -110,7 +149,6 @@ public void Publish_standalone_post_netcoreapp2_app_and_it_should_run()
var targetFramework = "netcoreapp2.0";
var rid = EnvironmentInfo.GetCompatibleRid(targetFramework);


TestProject testProject = new TestProject()
{
Name = "Hello",
Expand Down