Commit Graph

135 Commits

Author SHA1 Message Date
Michael Nebel
ca7fa2e7c8 C#: Use ASP.NET dlls when needed and available. 2023-08-14 11:18:19 +02:00
Michael Nebel
b71c41018c C#: Re-factor the GetRuntime method. 2023-08-14 11:18:19 +02:00
Michael Nebel
5bc8804242 C#: Introduce method to decide whether we need to include ASP.NET dlls in standalone compilation. 2023-08-14 11:18:19 +02:00
Michael Nebel
88b51e6ad3 C#: Re-factor logic for fetching info from group and remove a redundant continue statement. 2023-08-14 11:18:18 +02:00
Michael Nebel
881d86321e C#: Introduce regex for framework reference and project sdk and make some minor re-writes. 2023-08-14 11:18:18 +02:00
Michael Nebel
1942ea8396 C#: Paths can contain whitespace (this is indeed common on windows). 2023-08-14 10:40:00 +02:00
Michael Nebel
280a27d9ca C#: Log some more info during dotnet --list-runtimes execution. 2023-08-14 10:40:00 +02:00
Michael Nebel
78c732db97 C#: Re-factor of ProgressMonitor and introduce LogInfo. 2023-08-14 10:40:00 +02:00
Michael Nebel
ef9453e862 C#: Selected runtime location should be logged as information. 2023-08-14 10:40:00 +02:00
Michael Nebel
6bb9e6d122 C#: Address review comments. 2023-08-07 13:40:37 +02:00
Michael Nebel
ab4e643bf8 C#: Turn RuntimeVersion into a record type. 2023-08-01 12:54:55 +02:00
Tamas Vajk
65ed244f34 C#: Add missing parameter to interface 2023-07-07 16:10:41 +02:00
Tamás Vajk
9cef290bc3 Merge pull request #13687 from tamasvajk/standalone/nugetconfig
C#: Use `nuget.config` file for `dotnet restore` fallback logic
2023-07-07 15:53:07 +02:00
Tamas Vajk
23f3e44fa1 C#: Use nuget.config file for dotnet restore fallback logic 2023-07-07 14:47:07 +02:00
Michael Nebel
e4aaa43c43 C#: Also support alpha, beta, rc candidates. 2023-07-07 14:06:11 +02:00
Michael Nebel
f065ba9aa1 C#: Add unit tests for runtime version fetching. 2023-07-07 13:21:02 +02:00
Michael Nebel
4270425f14 C#: Cater for preview versions. 2023-07-07 13:16:35 +02:00
Michael Nebel
bffdbbcf95 C#: Address review comments. 2023-07-07 13:16:34 +02:00
Michael Nebel
6a87755ff1 C#: Use dotnet --list-runtimes to find runtime locations. 2023-07-06 13:27:22 +02:00
Tamás Vajk
14caaf119c Merge pull request #13658 from tamasvajk/cs/standalone/restore-impr
C#: Improve dotnet restore success rate in standalone extraction
2023-07-06 10:10:05 +02:00
Tamas Vajk
d0b8b683af Adjust error handling when dotnet --info is called 2023-07-05 14:26:00 +02:00
Tamas Vajk
9b2fd8df9f Add todo comment 2023-07-04 14:03:04 +02:00
Tamas Vajk
ffc09c44c2 Minor fixes in standalone extraction 2023-07-04 13:54:23 +02:00
Tamas Vajk
ef0e102cd7 Retrieve package IDs from files and restore the not yet restored ones
Read all files in the repo and look for `PackageReference` XML elements
to extract the package IDs, then restore the packages that are not yet
restored. This change improves the percentage of found assemblies on the
Powershell repo from 95% to 97% compared to a traced extraction. Also,
it increases the number of assemblied only referenced in the standalone
extraction from 79 to 134.
2023-07-04 13:52:12 +02:00
Tamas Vajk
cd6419503f Execute dotnet restore on all projects in standalone
Previously, we only did this for the solution files in the repository, but
there might be projects that are not added to any solution. This change
improves the percentage of found assemblies on the Powershell repo from
81% to 95%.
2023-07-04 13:52:12 +02:00
Tamas Vajk
728f3bce2d Refactor dotnet restore command invocation 2023-07-04 13:52:12 +02:00
Tamas Vajk
d2b0c872f5 Code quality improvements 2023-07-04 13:52:12 +02:00
Tamas Vajk
2de356dbfe C#: Remove the renaming of Directory.Build.props from standalone extraction 2023-06-29 15:06:46 +02:00
Tamas Vajk
cdf1c2639d C#: Only include CoreLib.dll when UseMscorlib option is set 2023-06-12 11:03:26 +02:00
Tamas Vajk
bf3677df16 C#: Make sure System.Private.CoreLib is added only once as a reference in standalone extraction 2023-06-09 11:29:44 +02:00
Tamas Vajk
75bc8756f2 C#: Change standalone extraction to allow unsafe code 2023-06-06 14:43:09 +02:00
Michael Nebel
470e4b64ea C#: Delete assembly load code as it always throws a PlatformNotSupported exception. 2023-02-02 10:06:04 +01:00
Michael Nebel
3a4e5700e8 C#: Update project targets, workflows and other scripts to use .NET 7. 2023-01-31 13:20:59 +01:00
Tom Hvitved
780297152c C#: Downgrade Microsoft.Build nuget package
17.4.0 does not officially support .NET 6 (it supports .NET 7), so downgrade
to avoid warnings.
2022-11-17 11:00:25 +01:00
Tom Hvitved
eda028721e C#: Update all nuget packages 2022-11-15 09:19:33 +01:00
Michael Nebel
ea40e7b29d C#: Use the extractor option to decide, whether CIL should be enabled. 2022-08-30 14:34:54 +02:00
Tom Hvitved
c463dc9d1a C#: Remove legacy odasa support
The following environment variables are no longer supported:

```
ODASA_BUILD_ERROR_DIR
ODASA_CSHARP_LAYOUT
ODASA_SNAPSHOT
SEMMLE_DIST
SEMMLE_EXTRACTOR_OPTIONS
SEMMLE_PLATFORM_TOOLS
SEMMLE_PRESERVE_SYMLINKS
SOURCE_ARCHIVE
TRAP_FOLDER
```
2022-03-09 09:19:37 +01:00
Michael Nebel
62dc23f6a5 C#: Move the StandaloneAnalyser to the Standalone project. 2022-02-24 13:51:43 +01:00
Michael Nebel
efab3bfa89 C#: Make an extractor class in the standalone project with some of the specifics for the standalone extractor. 2022-02-24 13:51:43 +01:00
Michael Nebel
d2c872079b C#: Move ExitCode enum out of Extractor class. 2022-02-24 13:51:42 +01:00
Michael Nebel
b0c62c8a10 C#: Refactor functionality to run standalone extractor into own method. 2022-02-24 13:51:42 +01:00
Michael Nebel
d947861690 C#: Minor refactoring. 2022-02-24 13:51:42 +01:00
Tom Hvitved
516bd9f77f C#: Fix deprecation warnings 2022-02-02 19:25:30 +01:00
Tom Hvitved
d7eeb1fec8 C#: Use .NET 6 2022-02-02 19:25:30 +01:00
Tom Hvitved
1c230d0888 C#: Update nuget packages 2021-12-10 10:42:29 +01:00
Tom Hvitved
6ba6d9931c C#: Skip dotnet restore in standalone extraction when nuget_restore: false is set 2021-07-12 15:16:16 +02:00
Tamas Vajk
31795c3e6b Introduce test option to include files from projects 2021-06-23 09:26:54 +02:00
Tamas Vajk
c547907784 C#: Use invariant culture in the extractor 2021-05-04 11:17:33 +02:00
Tamas Vajk
78843882f9 C#: Upgrade nuget packages 2021-03-17 09:35:57 +01:00
Tom Hvitved
63686b5c4e C#: Use is [not] null throughout in the extractor 2021-03-05 16:28:12 +01:00