Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Commit 48c34e3

Browse files
committed
[Core] Fixes #563. BAM assembly compilation now uses 'dotnet build' rather than 'dotnet publish --runtime [portableRID]'.
1 parent 37c7a4a commit 48c34e3

File tree

2 files changed

+4
-28
lines changed

2 files changed

+4
-28
lines changed

Bam.Core/Package/PackageUtilities.cs

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -770,37 +770,10 @@ public static void
770770
var project = new ProjectFile(false, projectPath);
771771
project.Write();
772772

773-
string portableRID = System.String.Empty;
774-
var architecture = System.Runtime.InteropServices.RuntimeInformation.OSArchitecture.ToString().ToLower();
775-
if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows))
776-
{
777-
portableRID = "win-" + architecture;
778-
}
779-
else if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Linux))
780-
{
781-
portableRID = "linux-" + architecture;
782-
}
783-
else if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.OSX))
784-
{
785-
portableRID = "osx-" + architecture;
786-
}
787-
else
788-
{
789-
throw new Exception(
790-
"Running on an unsupported OS: {0}",
791-
System.Runtime.InteropServices.RuntimeInformation.OSDescription
792-
);
793-
}
794-
795773
try
796774
{
797775
var args = new System.Text.StringBuilder();
798-
// publish is currently required in order to copy dependencies beside the assembly
799-
// don't use --force, because package may have already been restored
800-
// specifying a runtime ensures that all non-managed dependencies for NuGet packages with
801-
// platform specific runtimes are copied beside the assembly, and can be found by the assembly resolver
802-
args.AppendFormat("publish {0} ", projectPath);
803-
args.Append(System.String.Format("--runtime {0} ", portableRID));
776+
args.AppendFormat("build {0} ", projectPath);
804777
if (Graph.Instance.CompileWithDebugSymbols)
805778
{
806779
args.Append("-c Debug ");
@@ -810,6 +783,7 @@ public static void
810783
args.Append("-c Release ");
811784
}
812785
args.AppendFormat("-o {0} ", System.IO.Path.GetDirectoryName(outputAssemblyPath));
786+
args.Append("-v quiet ");
813787
var dotNetResult = OSUtilities.RunExecutable(
814788
"dotnet",
815789
args.ToString()

Changelog.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
04-Jul-2019 Fixes #563. BAM assembly compilation now uses 'dotnet build' rather than 'dotnet publish --runtime [portableRID]'.
2+
13
04-Jul-2019 Fixes #564. BAM schema now uses 'xs:anyURI' for the type of the path attribute for package Source.
24

35
03-Jul-2019 Fixes #173. Packages that reside in the same folder are now discoverable without any PackageRepository element in the definition file.

0 commit comments

Comments
 (0)