void removeNIUnderDirs(const std::string& rootPaths)
{
auto convert = [](const std::string& path, const std::string& filename) {
- if (isR2RImage(path)) {
+ //The .ni.dll file can be renamed .dll.
+ if (isR2RImage(path) && isNativeImage(path)) {
std::string assemblyPath = changeExtension(path, ".ni.dll", ".dll");
if (exist(assemblyPath)) {
if (remove(path.c_str())) {
static void removeNIUnderTAC(const std::string& rootPaths)
{
auto convert = [&rootPaths](const std::string& path, const std::string& filename) {
- if (isNativeImage(path)) {
+ //The .ni.dll file can be renamed .dll.
+ if (isR2RImage(path) && isNativeImage(path)) {
std::string assemblyPath = changeExtension(path, ".ni.dll", ".dll");
if (exist(assemblyPath)) {
if (removeFile(assemblyPath)) {