复制子项目复制到bin文件夹的所有文件时出现问题

时间:2019-12-26 02:38:14

标签: c# visual-studio

我有一个C#解决方案,其中有2个项目-library(tidyverse) library(furrr) # Make a CSV file out of the NASA stock dataset for demo purposes raw_data_path <- tempfile(fileext = ".csv") nasa %>% as_tibble() %>% write_csv(raw_data_path) # Get the row count of the raw data, incl. header row, without loading the # actual data raw_data_nrow <- length(count.fields(raw_data_path)) # Hard-code the largest batch size you can, given your RAM in relation to the # data size per row batch_size <- 1e3 # Set up parallel processing of multiple chunks at a time, leaving one virtual # core, as usual plan(multiprocess, workers = availableCores() - 1) filtered_data <- # Define the sequence of start-point row numbers for each chunk (each number # is actually the start point minus 1 since we're using the seq. no. as the # no. of rows to skip) seq(from = 0, # Add the batch size to ensure that the last chunk is large enough to grab # all the remainder rows to = raw_data_nrow + batch_size, by = batch_size) %>% future_map_dfr( ~ read_csv( raw_data_path, skip = .x, n_max = batch_size, # Can't read in col. names in each chunk since they're only present in the # 1st chunk col_names = FALSE, # This reads in each column as character, which is safest but slowest and # most memory-intensive. If you're sure that each batch will contain # enough values in each column so that the type detection in each batch # will come to the same conclusions, then comment this out and leave just # the guess_max col_types = cols(.default = "c"), guess_max = batch_size ) %>% # This is where you'd insert your filter condition(s) filter(TRUE), # Progress bar! So you know how many chunks you have left to go .progress = TRUE ) %>% # The first row will be the header values, so set the column names to equal # that first row, and then drop it set_names(slice(., 1)) %>% slice(-1) MainProjectSubProject引用了MainProject项目。在SubProject中,我有一个文件夹SubProject,其中包含许多项目,包括托管和非托管DLL,图像文件,脚本,配置文件等。

RequiredStuff中,我使用命令SubProject进行了构建后事件。当我构建该项目时,copy "$(ProjectDir)RequiredStuff\*" "$(ProjectDir)$(OutDir)"中的所有所有文件都复制到了我想要的RequiredStuff文件夹中(而不是bin)。

在构建整个解决方案时,仅复制了{em {1}}中的某些文件。经过仔细的检查,我发现了某种模式。示例:

  • bin\RequiredStuff:未复制
  • RequiredStuff:已复制

如何确保将所有文件复制到FooBar.dll的bin文件夹中?

1 个答案:

答案 0 :(得分:0)

我认为应该是$(ProjectDir)$(OutDir)RequiredStuff。复制之前,必须确保已创建文件夹,例如:

dir "$(ProjectDir)$(OutDir)RequiredStuff\" >nul 2>&1
if "%errorlevel%" neq "0" mkdir "$(ProjectDir)$(OutDir)RequiredStuff"
copy "$(ProjectDir)RequiredStuff\*" "$(ProjectDir)$(OutDir)RequiredStuff\"
相关问题