diff options
author | Jose <jose@zeroc.com> | 2018-12-21 20:49:57 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2018-12-21 20:50:47 +0100 |
commit | f87580189e3462bc36280291a5c92ddbf2d81bfb (patch) | |
tree | a33840a80201563da813c8bb22f704af964ffb7f /scripts/IceBoxUtil.py | |
parent | Removed un-used print method (diff) | |
download | ice-f87580189e3462bc36280291a5c92ddbf2d81bfb.tar.bz2 ice-f87580189e3462bc36280291a5c92ddbf2d81bfb.tar.xz ice-f87580189e3462bc36280291a5c92ddbf2d81bfb.zip |
Support building .NET applications with different Target frameworks
Diffstat (limited to 'scripts/IceBoxUtil.py')
-rw-r--r-- | scripts/IceBoxUtil.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/scripts/IceBoxUtil.py b/scripts/IceBoxUtil.py index bdfdcc865c0..3697328c369 100644 --- a/scripts/IceBoxUtil.py +++ b/scripts/IceBoxUtil.py @@ -22,14 +22,15 @@ class IceBox(ProcessFromBinDir, Server): # tests # if self.configFile: - if isinstance(mapping, CSharpMapping) and current.config.dotnetcore: + if isinstance(mapping, CSharpMapping) and (current.config.dotnetcore or current.config.framework): configFile = self.configFile.format(testdir=current.testsuite.getPath()) with open(configFile, 'r') as source: - framework = mapping.getLibTargetFramework(current) - newConfigFile = configFile + ".netcoreapp" + framework = mapping.getTargetFramework(current) + libframework = mapping.getLibTargetFramework(current) + newConfigFile = "{}.{}".format(configFile, framework) with open(newConfigFile, 'w') as target: for line in source.readlines(): - target.write(line.replace("\\net45\\", "\\netstandard2.0\\{0}\\".format(framework))) + target.write(line.replace("\\net45\\", "\\netstandard2.0\\{0}\\".format(libframework))) current.files.append(newConfigFile) def getExe(self, current): @@ -54,8 +55,8 @@ class IceBox(ProcessFromBinDir, Server): args = Server.getEffectiveArgs(self, current, args) if self.configFile: mapping = self.getMapping(current) - if isinstance(mapping, CSharpMapping) and current.config.dotnetcore: - args.append("--Ice.Config={0}".format(self.configFile + ".netcoreapp")) + if isinstance(mapping, CSharpMapping) and (current.config.dotnetcore or current.config.framework): + args.append("--Ice.Config={0}.{1}".format(self.configFile, mapping.getTargetFramework(current))) else: args.append("--Ice.Config={0}".format(self.configFile)) return args |