mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C#: Clear possibly inherited Directory.Build.props and Directory.Build.targets in stub generator
This commit is contained in:
@@ -77,6 +77,14 @@ class Generator:
|
|||||||
self.projectNameIn, '--output', self.projectDirIn])
|
self.projectNameIn, '--output', self.projectDirIn])
|
||||||
remove_files(self.projectDirIn, '.cs')
|
remove_files(self.projectDirIn, '.cs')
|
||||||
|
|
||||||
|
# Clear possibly inherited Directory.Build.props and Directory.Build.targets:
|
||||||
|
with open(os.path.join(self.workDir, 'Directory.Build.props'), 'w') as f:
|
||||||
|
f.write('<Project>\n')
|
||||||
|
f.write('</Project>\n')
|
||||||
|
with open(os.path.join(self.workDir, 'Directory.Build.targets'), 'w') as f:
|
||||||
|
f.write('<Project>\n')
|
||||||
|
f.write('</Project>\n')
|
||||||
|
|
||||||
def run_cmd(self, cmd, msg="Failed to run command"):
|
def run_cmd(self, cmd, msg="Failed to run command"):
|
||||||
run_cmd_cwd(cmd, self.workDir, msg)
|
run_cmd_cwd(cmd, self.workDir, msg)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user