mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-26 03:58:45 +08:00
fix for failing tests due missing path to schema
This commit is contained in:
@@ -17,20 +17,20 @@ namespace mRemoteNGTests
|
||||
public string GetTargetPath([CallerFilePath] string sourceFilePath = "")
|
||||
{
|
||||
const string debugOrRelease =
|
||||
#if DEBUG
|
||||
#if DEBUG
|
||||
"Debug";
|
||||
#else
|
||||
#else
|
||||
"Release";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
const string normalOrPortable =
|
||||
#if PORTABLE
|
||||
" Portable";
|
||||
#else
|
||||
#if PORTABLE
|
||||
" Portable";
|
||||
#else
|
||||
"";
|
||||
#endif
|
||||
#endif
|
||||
var path = Path.GetDirectoryName(sourceFilePath);
|
||||
var filePath = $"{path}\\..\\mRemoteNG\\bin\\{debugOrRelease}{normalOrPortable}\\mRemoteNG.exe";
|
||||
var filePath = $"{path}\\..\\mRemoteNG\\bin\\x64\\{debugOrRelease}{normalOrPortable}\\mRemoteNG.exe";
|
||||
return filePath;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,6 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Xml
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
var xml = _serializer.Serialize(_connectionTreeModel);
|
||||
|
||||
var schemaFileName = $"mremoteng_confcons_v{_serializer.Version.Major}_{_serializer.Version.Minor}.xsd";
|
||||
var schemaFile = GetTargetPath(schemaFileName);
|
||||
_xmlReaderSettings.Schemas.Add("http://mremoteng.org", schemaFile);
|
||||
@@ -69,21 +68,8 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Xml
|
||||
|
||||
public string GetTargetPath(string fileName, [CallerFilePath] string sourceFilePath = "")
|
||||
{
|
||||
const string debugOrRelease =
|
||||
#if DEBUG
|
||||
"Debug";
|
||||
#else
|
||||
"Release";
|
||||
#endif
|
||||
|
||||
const string normalOrPortable =
|
||||
#if PORTABLE
|
||||
" Portable";
|
||||
#else
|
||||
"";
|
||||
#endif
|
||||
var path = Path.GetDirectoryName(sourceFilePath);
|
||||
var filePath = $@"{path}\..\..\..\..\..\mRemoteNG\bin\{debugOrRelease}{normalOrPortable}\Schemas\{fileName}";
|
||||
var filePath = $@"{path}\..\..\..\..\..\mRemoteNG\Schemas\{fileName}";
|
||||
|
||||
return filePath;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user