Skip to content

Commit 4f31b5a

Browse files
committed
C#: Fix stub generator to use framework references from nuget packages
1 parent ada5dcc commit 4f31b5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

csharp/ql/src/Stubs/make_stubs_nuget.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def run_cmd(cmd, msg="Failed to run command"):
193193
pf.write('</Project>\n')
194194

195195
for pathInfo in pathInfos:
196-
if 'packs/' + framework.lower() in pathInfo.lower():
196+
if framework.lower() + '.ref' in pathInfo.lower():
197197
copiedFiles.add(pathInfo)
198198
shutil.copy2(pathInfos[pathInfo], os.path.join(
199199
frameworksDir, framework))
@@ -207,7 +207,7 @@ def run_cmd(cmd, msg="Failed to run command"):
207207
pf.write('</Project>\n')
208208

209209
for pathInfo in pathInfos:
210-
if 'packs/microsoft.netcore.app.ref/' in pathInfo.lower():
210+
if 'microsoft.netcore.app.ref/' in pathInfo.lower():
211211
copiedFiles.add(pathInfo)
212212
shutil.copy2(pathInfos[pathInfo], frameworkDir)
213213

0 commit comments

Comments
 (0)