Skip to content

Commit 84ea3a9

Browse files
authored
Merge pull request #16310 from tamasvajk/buildless/nuget_versions
C#: Add integration test with multiple versions of the same nuget pac…
2 parents f828f8e + 53eb753 commit 84ea3a9

File tree

7 files changed

+65
-0
lines changed

7 files changed

+65
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
| [...]/newtonsoft.json/13.0.1/lib/netstandard2.0/Newtonsoft.Json.dll |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import csharp
2+
3+
private string getPath(Assembly a) {
4+
not a.getCompilation().getOutputAssembly() = a and
5+
exists(string s | s = a.getFile().getAbsolutePath() |
6+
exists(result.indexOf("Newtonsoft.Json")) and
7+
result =
8+
"[...]" +
9+
s.substring(s.indexOf("test-db/working/") + "test-db/working/".length() + 16 +
10+
"/packages".length(), s.length())
11+
or
12+
result = s and
13+
not exists(s.indexOf("test-db/working/"))
14+
)
15+
}
16+
17+
from Assembly a
18+
select getPath(a)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class Program
2+
{
3+
static void Main(string[] args)
4+
{
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFrameworks>net8.0</TargetFrameworks>
6+
</PropertyGroup>
7+
8+
<Target Name="DeleteBinObjFolders" BeforeTargets="Clean">
9+
<RemoveDir Directories=".\bin" />
10+
<RemoveDir Directories=".\obj" />
11+
</Target>
12+
13+
<ItemGroup>
14+
<PackageReference Include="Newtonsoft.Json" Version="8.0.1" />
15+
</ItemGroup>
16+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFrameworks>net8.0</TargetFrameworks>
6+
</PropertyGroup>
7+
8+
<Target Name="DeleteBinObjFolders" BeforeTargets="Clean">
9+
<RemoveDir Directories=".\bin" />
10+
<RemoveDir Directories=".\obj" />
11+
</Target>
12+
13+
<ItemGroup>
14+
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
15+
</ItemGroup>
16+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"sdk": {
3+
"version": "8.0.101"
4+
}
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from create_database_utils import *
2+
3+
run_codeql_database_create([], lang="csharp", extra_args=["--build-mode=none"])

0 commit comments

Comments
 (0)