mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C#: Update stub generator script to target .NET 10.
This commit is contained in:
@@ -56,7 +56,7 @@ def remove_files(path, ext):
|
|||||||
def write_csproj_prefix(ioWrapper):
|
def write_csproj_prefix(ioWrapper):
|
||||||
ioWrapper.write('<Project Sdk="Microsoft.NET.Sdk">\n')
|
ioWrapper.write('<Project Sdk="Microsoft.NET.Sdk">\n')
|
||||||
ioWrapper.write(' <PropertyGroup>\n')
|
ioWrapper.write(' <PropertyGroup>\n')
|
||||||
ioWrapper.write(' <TargetFramework>net9.0</TargetFramework>\n')
|
ioWrapper.write(' <TargetFramework>net10.0</TargetFramework>\n')
|
||||||
ioWrapper.write(' <AllowUnsafeBlocks>true</AllowUnsafeBlocks>\n')
|
ioWrapper.write(' <AllowUnsafeBlocks>true</AllowUnsafeBlocks>\n')
|
||||||
ioWrapper.write(' <OutputPath>bin\</OutputPath>\n')
|
ioWrapper.write(' <OutputPath>bin\</OutputPath>\n')
|
||||||
ioWrapper.write(
|
ioWrapper.write(
|
||||||
@@ -73,7 +73,7 @@ class Generator:
|
|||||||
self.projectDirIn = os.path.join(self.workDir, self.projectNameIn)
|
self.projectDirIn = os.path.join(self.workDir, self.projectNameIn)
|
||||||
self.template = template
|
self.template = template
|
||||||
print("\n* Creating new input project")
|
print("\n* Creating new input project")
|
||||||
self.run_cmd(['dotnet', 'new', self.template, "-f", "net9.0", "--language", "C#", '--name',
|
self.run_cmd(['dotnet', 'new', self.template, "-f", "net10.0", "--language", "C#", '--name',
|
||||||
self.projectNameIn, '--output', self.projectDirIn])
|
self.projectNameIn, '--output', self.projectDirIn])
|
||||||
remove_files(self.projectDirIn, '.cs')
|
remove_files(self.projectDirIn, '.cs')
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ class Generator:
|
|||||||
bqrsFile = os.path.join(rawOutputDir, outputName + '.bqrs')
|
bqrsFile = os.path.join(rawOutputDir, outputName + '.bqrs')
|
||||||
jsonFile = os.path.join(rawOutputDir, outputName + '.json')
|
jsonFile = os.path.join(rawOutputDir, outputName + '.json')
|
||||||
|
|
||||||
sdk_version = '9.0.300'
|
sdk_version = '10.0.100'
|
||||||
print("\n* Creating new global.json file and setting SDK to " + sdk_version)
|
print("\n* Creating new global.json file and setting SDK to " + sdk_version)
|
||||||
self.run_cmd(['dotnet', 'new', 'globaljson', '--force', '--sdk-version', sdk_version, '--output', self.workDir])
|
self.run_cmd(['dotnet', 'new', 'globaljson', '--force', '--sdk-version', sdk_version, '--output', self.workDir])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user