private string GetTargetAssemblyFileName() { var assemblyName = _targetAssemblyNameParam; if (assemblyName.Equals("_default", StringComparison.OrdinalIgnoreCase)) { var unitTestAssemblyName = _projectFileHelper.GetAssemblyName(GetUnitTestProjectFile()); assemblyName = unitTestAssemblyName.Replace(".Tests", ""); } var assemblyFileName = $"{assemblyName}.dll"; var assemblyProjectFile = string.Empty; if (_projectFileHelper.TryFindReferencedProjectFileByAssemblyName( GetUnitTestProjectFile(), assemblyName, out assemblyProjectFile)) { return(Path.Combine(Path.GetDirectoryName(assemblyProjectFile), @"bin\Debug", assemblyFileName)); } return(Path.Combine(GetUnitTestProjectPath(), @"bin\Debug", assemblyFileName)); }