예제 #1
0
 public static void RestoreNetCoreCommand(Solution solution,
                                          List <string> runtimesWithoutGeneric)
 {
     foreach (var runtime in runtimesWithoutGeneric)
     {
         ProjectAssetsCopier.CopyAssetFileToCurrentRuntime(runtime, solution);
         // OverwriteRuntimeIdentifier is done via Directory.Build.props
         DotNetRestore(_ => _
                       .SetProjectFile(solution)
                       .SetProcessArgumentConfigurator(args => args.Add($"/p:OverwriteRuntimeIdentifier={runtime}")));
         ProjectAssetsCopier.CopyNewAssetFileByRuntimeId(runtime, solution);
     }
 }
예제 #2
0
 public static void PublishNetCoreGenericCommand(Solution solution,
                                                 List <string> runtimesWithoutGeneric, Configuration configuration)
 {
     foreach (var runtime in runtimesWithoutGeneric)
     {
         ProjectAssetsCopier.CopyAssetFileToCurrentRuntime(runtime, solution);
         foreach (var publishProject in Build.PublishProjectsList)
         {
             DotNetPublish(_ => _
                           .SetConfiguration(configuration)
                           .EnableNoRestore()
                           .EnableNoBuild()
                           .EnableNoDependencies()
                           .EnableSelfContained()
                           .SetOutput(runtime)
                           .SetProject(publishProject)
                           .SetRuntime(runtime)
                           .EnableNoLogo());
         }
         ProjectAssetsCopier.CopyNewAssetFileByRuntimeId(runtime, solution);
     }
 }