.NET Core - 如何基于构建类型在构建上复制文件

时间:2017-02-23 16:46:25

标签: asp.net-core asp.net-core-1.0

在.NET项目中,我能够选择性地复制构建文件,如下所示:

function extractDataFromSheet() {

  // Opens spreadsheet by its ID
  var spreadsheet = SpreadsheetApp.openById("1ow7iuLoqfCSqVhp3ra2uy-22LHUJfQA2UpZgOvIuQ5c");

  // Get the name of this SS
  var name_of_sheet = spreadsheet.getName(); 

  var sheet = spreadsheet.getSheetByName('PussyCow'); // or whatever is the name of the sheet 
  var range = sheet.getRange(1,1); 
  var data = range.getValue();
  //Browser.msgBox(name_of_sheet +" "+data);

  // Opens doc by its ID
  var doc = DocumentApp.openById("1ZSqN-OOxvDV9YLpuDsXhqSWx4X3djUaVehuIlZbanxo");

  var name_of_doc = doc.getName();

  var doc_body = doc.getBody();

 // Use editAsText to obtain a single text element containing
 // all the characters in the document.
 var text = doc_body.editAsText();

 // Insert text at the beginning of the document.
 text.insertText(0, data);

 // Insert text at the end of the document.
 text.appendText(name_of_sheet);

 // Make the first half of the document blue.
 text.setForegroundColor(0, text.getText().length / 2, '#00FFFF');


 Browser.msgBox(name_of_doc);
}

我想在.NET Core中做同样的事情。

在我的project.json中,我尝试了以下内容,但没有任何反应:

LDFLAGS = -L/usr/local/lib -lsbml

有趣的是,if $(ConfigurationName) == Debug ( xcopy $(SolutionDir)\myProject\wwwroot\shared\app.constants.debug.js $(SolutionDir)\myProject\wwwroot\shared\app.constants.js /Y ) if $(ConfigurationName) == Release ( xcopy $(SolutionDir)\myProject\wwwroot\shared\app.constants.release.js $(SolutionDir)\myProject\wwwroot\shared\app.constants.js /Y ) 失败,但"scripts": { "precompile": [ "if $(%compile:Configuration%) == Debug ( xcopy %project:Directory%\\wwwroot\\shared\\app.constants.debug.js %project:Directory%\\wwwroot\\shared\\app.constants.js /Y ) if $(%compile:Configuration%) == Release ( xcopy %project:Directory%\\wwwroot\\shared\\app.constants.release.js %project:Directory%\\wwwroot\\shared\\app.constants.js /Y )" ], "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] } 成功启动了虚拟设备管理器,因此我不确定我的设置是否存在问题。

我也尝试过类似this的内容,但无法正常工作。

我该怎么办?

0 个答案:

没有答案