mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Merge pull request #16310 from tamasvajk/buildless/nuget_versions
C#: Add integration test with multiple versions of the same nuget pac…
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
| [...]/newtonsoft.json/13.0.1/lib/netstandard2.0/Newtonsoft.Json.dll |
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import csharp
|
||||||
|
|
||||||
|
private string getPath(Assembly a) {
|
||||||
|
not a.getCompilation().getOutputAssembly() = a and
|
||||||
|
exists(string s | s = a.getFile().getAbsolutePath() |
|
||||||
|
exists(result.indexOf("Newtonsoft.Json")) and
|
||||||
|
result =
|
||||||
|
"[...]" +
|
||||||
|
s.substring(s.indexOf("test-db/working/") + "test-db/working/".length() + 16 +
|
||||||
|
"/packages".length(), s.length())
|
||||||
|
or
|
||||||
|
result = s and
|
||||||
|
not exists(s.indexOf("test-db/working/"))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
from Assembly a
|
||||||
|
select getPath(a)
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
class Program
|
||||||
|
{
|
||||||
|
static void Main(string[] args)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFrameworks>net8.0</TargetFrameworks>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Target Name="DeleteBinObjFolders" BeforeTargets="Clean">
|
||||||
|
<RemoveDir Directories=".\bin" />
|
||||||
|
<RemoveDir Directories=".\obj" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="8.0.1" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFrameworks>net8.0</TargetFrameworks>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Target Name="DeleteBinObjFolders" BeforeTargets="Clean">
|
||||||
|
<RemoveDir Directories=".\bin" />
|
||||||
|
<RemoveDir Directories=".\obj" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"sdk": {
|
||||||
|
"version": "8.0.101"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
from create_database_utils import *
|
||||||
|
|
||||||
|
run_codeql_database_create([], lang="csharp", extra_args=["--build-mode=none"])
|
||||||
Reference in New Issue
Block a user