Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project>
<PropertyGroup>
<Version>1.0.1</Version>
<Authors>axeok; nortages</Authors>
<Company>Shintio</Company>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/axeok/Shintio.Net</PackageProjectUrl>
<RepositoryUrl>https://github.com/axeok/Shintio.Net.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>
</Project>
28 changes: 28 additions & 0 deletions Shintio.Net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shintio.Communication.SubPr
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shintio.Communication.SubProcess.Server", "src\Communication\Shintio.Communication.SubProcess.Server\Shintio.Communication.SubProcess.Server.csproj", "{FE81F905-A25A-4264-A59E-017D681681B2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shintio.SourceGenerators", "src\DevTools\Shintio.SourceGenerators\Shintio.SourceGenerators.csproj", "{4FC18C12-0DDB-47DF-AE8C-996DB2D935F5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shintio.CodeBuilder.CSharp", "src\DevTools\Shintio.CodeBuilder.CSharp\Shintio.CodeBuilder.CSharp.csproj", "{24A492A0-3F2D-4B11-8645-3018E9D922FA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shintio.CodeBuilder.CSharp.SourceGenerators", "src\DevTools\Shintio.CodeBuilder.CSharp.SourceGenerators\Shintio.CodeBuilder.CSharp.SourceGenerators.csproj", "{F5EFBD2B-8776-4D64-8E1C-A5E9E4BCCC77}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shintio.Net.SourceGenerator", "dev\Shintio.Net.SourceGenerator\Shintio.Net.SourceGenerator.csproj", "{D87DBC2A-A84A-497B-AA64-B67E5C9E2FB7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -294,6 +302,22 @@ Global
{FE81F905-A25A-4264-A59E-017D681681B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FE81F905-A25A-4264-A59E-017D681681B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FE81F905-A25A-4264-A59E-017D681681B2}.Release|Any CPU.Build.0 = Release|Any CPU
{4FC18C12-0DDB-47DF-AE8C-996DB2D935F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4FC18C12-0DDB-47DF-AE8C-996DB2D935F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FC18C12-0DDB-47DF-AE8C-996DB2D935F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4FC18C12-0DDB-47DF-AE8C-996DB2D935F5}.Release|Any CPU.Build.0 = Release|Any CPU
{24A492A0-3F2D-4B11-8645-3018E9D922FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{24A492A0-3F2D-4B11-8645-3018E9D922FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{24A492A0-3F2D-4B11-8645-3018E9D922FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{24A492A0-3F2D-4B11-8645-3018E9D922FA}.Release|Any CPU.Build.0 = Release|Any CPU
{F5EFBD2B-8776-4D64-8E1C-A5E9E4BCCC77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F5EFBD2B-8776-4D64-8E1C-A5E9E4BCCC77}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F5EFBD2B-8776-4D64-8E1C-A5E9E4BCCC77}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F5EFBD2B-8776-4D64-8E1C-A5E9E4BCCC77}.Release|Any CPU.Build.0 = Release|Any CPU
{D87DBC2A-A84A-497B-AA64-B67E5C9E2FB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D87DBC2A-A84A-497B-AA64-B67E5C9E2FB7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D87DBC2A-A84A-497B-AA64-B67E5C9E2FB7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D87DBC2A-A84A-497B-AA64-B67E5C9E2FB7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{EEF6B366-84B6-4A15-8697-B3F2D2F33C31} = {8BC18793-45C6-4A3E-A364-4B1D3C1418DD}
Expand Down Expand Up @@ -350,5 +374,9 @@ Global
{7351BF35-9320-4B3A-9B0D-57152885C5C8} = {3C296E37-A0A1-4166-BFF1-7C04BC558E85}
{5989FCE7-FC12-4121-B400-E918E6B04FB1} = {3C296E37-A0A1-4166-BFF1-7C04BC558E85}
{FE81F905-A25A-4264-A59E-017D681681B2} = {3C296E37-A0A1-4166-BFF1-7C04BC558E85}
{4FC18C12-0DDB-47DF-AE8C-996DB2D935F5} = {EEF6B366-84B6-4A15-8697-B3F2D2F33C31}
{24A492A0-3F2D-4B11-8645-3018E9D922FA} = {EEF6B366-84B6-4A15-8697-B3F2D2F33C31}
{F5EFBD2B-8776-4D64-8E1C-A5E9E4BCCC77} = {EEF6B366-84B6-4A15-8697-B3F2D2F33C31}
{D87DBC2A-A84A-497B-AA64-B67E5C9E2FB7} = {BB04FCBF-89F4-42B3-BDF8-E2625FCCFC5A}
EndGlobalSection
EndGlobal
10 changes: 5 additions & 5 deletions libs/Newtonsoft.Json/Newtonsoft.Json.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<!-- <TargetFrameworks Condition="'$(LibraryFrameworks)'==''">net6.0;net45;net40;net35;net20;netstandard1.0;netstandard1.3;netstandard2.0</TargetFrameworks>-->
<!-- <TargetFrameworks Condition="'$(LibraryFrameworks)'!=''">$(LibraryFrameworks)</TargetFrameworks>-->
<TargetFrameworks>net20;net6.0;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net20;net6.0;net8.0;net9.0</TargetFrameworks>
<LangVersion>9.0</LangVersion>
<!-- version numbers will be updated by build -->
<AssemblyVersion>11.0.0.0</AssemblyVersion>
Expand Down Expand Up @@ -49,10 +49,10 @@
<None Include="packageIcon.png" Pack="true" PackagePath="\" />
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="$(MicrosoftCodeAnalysisNetAnalyzersPackageVersion)" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="$(MicrosoftSourceLinkGitHubPackageVersion)" PrivateAssets="All" />
</ItemGroup>
<!-- <ItemGroup>-->
<!-- <PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="$(MicrosoftCodeAnalysisNetAnalyzersPackageVersion)" PrivateAssets="All" />-->
<!-- <PackageReference Include="Microsoft.SourceLink.GitHub" Version="$(MicrosoftSourceLinkGitHubPackageVersion)" PrivateAssets="All" />-->
<!-- </ItemGroup>-->
Comment on lines +52 to +55
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

Clarify why analyzer and source-link references are disabled.

The Microsoft.CodeAnalysis.NetAnalyzers and Microsoft.SourceLink.GitHub PackageReferences are commented out without explanation. Removing these can degrade code quality checks and source traceability.

If this change is intentional, add an inline comment explaining the rationale (e.g., build performance, compatibility issue, etc.). If temporary, consider restoring them or opening a tracking issue.



---

🏁 Script executed:

```shell
#!/bin/bash
# Check the full context of the .csproj file around lines 52-55
cat libs/Newtonsoft.Json/Newtonsoft.Json.csproj | head -60 | tail -20

Length of output: 2728


🏁 Script executed:

#!/bin/bash
# Check git history for this specific file to understand when/why changes were made
git log --oneline -n 20 -- libs/Newtonsoft.Json/Newtonsoft.Json.csproj

Length of output: 178


🏁 Script executed:

#!/bin/bash
# Search for any inline comments or patterns related to analyzers being disabled
rg -n "NetAnalyzers|SourceLink" libs/Newtonsoft.Json/Newtonsoft.Json.csproj -C 3

Length of output: 626


🏁 Script executed:

#!/bin/bash
# Check if similar PackageReferences exist in other .csproj files
fd -e csproj -x rg -l "Microsoft.CodeAnalysis.NetAnalyzers|Microsoft.SourceLink.GitHub" {}

Length of output: 45


🏁 Script executed:

#!/bin/bash
# Check the entire Newtonsoft.Json.csproj file for structure and any other commented sections
cat libs/Newtonsoft.Json/Newtonsoft.Json.csproj

Length of output: 13738


🏁 Script executed:

#!/bin/bash
# Look for any TODO or FIXME comments near the disabled references
rg -n "TODO|FIXME|XXX|HACK" libs/Newtonsoft.Json/Newtonsoft.Json.csproj -C 5

Length of output: 0


Add explanation for disabling analyzer and source-link package references.

These references are commented out without documentation. The recent commit "Fix newtonsoft for dotnet 10" suggests this is intentional, likely due to compatibility issues. However, the reason should be documented inline.

Either uncomment and resolve any .NET 10 compatibility issues, or add an inline comment explaining why they're disabled (e.g., <!-- Disabled due to incompatibility with .NET 10; see issue #XXX -->).

🤖 Prompt for AI Agents
In libs/Newtonsoft.Json/Newtonsoft.Json.csproj around lines 52 to 55, the
PackageReference entries for Microsoft.CodeAnalysis.NetAnalyzers and
Microsoft.SourceLink.GitHub are commented out with no explanation; add an inline
XML comment explaining why they are disabled (e.g., compatibility issue with
.NET 10 and reference to the tracking issue or PR number) or alternatively
re-enable them by uncommenting and fixing any .NET 10 compatibility problems;
ensure the comment includes the reason and a reference (issue/PR) so future
maintainers know whether to restore them.

<PropertyGroup Condition="'$(TargetFramework)'=='net6.0' OR '$(TargetFramework)'=='net8.0' OR '$(TargetFramework)'=='net9.0'">
<AssemblyTitle>Json.NET .NET 6.0</AssemblyTitle>
<DefineConstants>HAVE_ADO_NET;HAVE_APP_DOMAIN;HAVE_ASYNC;HAVE_ASYNC_DISPOSABLE;HAVE_BIG_INTEGER;HAVE_BINARY_FORMATTER;HAVE_BINARY_SERIALIZATION;HAVE_BINARY_EXCEPTION_SERIALIZATION;HAVE_CHAR_TO_LOWER_WITH_CULTURE;HAVE_CHAR_TO_STRING_WITH_CULTURE;HAVE_COM_ATTRIBUTES;HAVE_COMPONENT_MODEL;HAVE_CONCURRENT_COLLECTIONS;HAVE_COVARIANT_GENERICS;HAVE_DATA_CONTRACTS;HAVE_DATE_TIME_OFFSET;HAVE_DB_NULL_TYPE_CODE;HAVE_DYNAMIC;HAVE_EMPTY_TYPES;HAVE_ENTITY_FRAMEWORK;HAVE_EXPRESSIONS;HAVE_FAST_REVERSE;HAVE_FSHARP_TYPES;HAVE_FULL_REFLECTION;HAVE_GUID_TRY_PARSE;HAVE_HASH_SET;HAVE_ICLONEABLE;HAVE_ICONVERTIBLE;HAVE_IGNORE_DATA_MEMBER_ATTRIBUTE;HAVE_INOTIFY_COLLECTION_CHANGED;HAVE_INOTIFY_PROPERTY_CHANGING;HAVE_ISET;HAVE_LINQ;HAVE_MEMORY_BARRIER;HAVE_METHOD_IMPL_ATTRIBUTE;HAVE_NON_SERIALIZED_ATTRIBUTE;HAVE_READ_ONLY_COLLECTIONS;HAVE_REFLECTION_EMIT;HAVE_REGEX_TIMEOUTS;HAVE_SECURITY_SAFE_CRITICAL_ATTRIBUTE;HAVE_SERIALIZATION_BINDER_BIND_TO_NAME;HAVE_STREAM_READER_WRITER_CLOSE;HAVE_STRING_JOIN_WITH_ENUMERABLE;HAVE_TIME_SPAN_PARSE_WITH_CULTURE;HAVE_TIME_SPAN_TO_STRING_WITH_CULTURE;HAVE_TIME_ZONE_INFO;HAVE_TRACE_WRITER;HAVE_TYPE_DESCRIPTOR;HAVE_UNICODE_SURROGATE_DETECTION;HAVE_VARIANT_TYPE_PARAMETERS;HAVE_VERSION_TRY_PARSE;HAVE_XLINQ;HAVE_XML_DOCUMENT;HAVE_XML_DOCUMENT_TYPE;HAVE_CONCURRENT_DICTIONARY;HAVE_INDEXOF_STRING_COMPARISON;HAVE_REPLACE_STRING_COMPARISON;HAVE_REPLACE_STRING_COMPARISON;HAVE_GETHASHCODE_STRING_COMPARISON;HAVE_NULLABLE_ATTRIBUTES;HAVE_DYNAMIC_CODE_COMPILED;HAS_ARRAY_EMPTY;HAVE_DATE_ONLY;$(AdditionalConstants)</DefineConstants>
Expand Down
5 changes: 5 additions & 0 deletions src/Bots/Shintio.Bots.Core/Shintio.Bots.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup>
<PackageId>Shintio.Bots.Core</PackageId>
<Description>Bots Core</Description>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0"/>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0"/>
Expand Down
5 changes: 5 additions & 0 deletions src/Bots/Shintio.Bots.Telegram/Shintio.Bots.Telegram.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

<PropertyGroup>
<PackageId>Shintio.Bots.Telegram</PackageId>
<Description>Bots Telegram</Description>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Shintio.Bots.Core\Shintio.Bots.Core.csproj"/>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
<LangVersion Condition="'$(TargetFramework)' == 'netcoreapp2.2.8'">8</LangVersion>
</PropertyGroup>

<PropertyGroup>
<PackageId>Shintio.Communication.Core</PackageId>
<Description>Communication Core</Description>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\Shintio.Essentials\Shintio.Essentials.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
<LangVersion Condition="'$(TargetFramework)' == 'netcoreapp2.2.8'">8</LangVersion>
</PropertyGroup>

<PropertyGroup>
<PackageId>Shintio.Communication.ReflectionPipes</PackageId>
<Description>Communication ReflectionPipes</Description>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\Misc\Shintio.ReflectionBomb\Shintio.ReflectionBomb.csproj" />
<ProjectReference Include="..\Shintio.Communication.Core\Shintio.Communication.Core.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
<LangVersion Condition="'$(TargetFramework)' == 'netcoreapp2.2.8'">8</LangVersion>
</PropertyGroup>

<PropertyGroup>
<PackageId>Shintio.Communication.SubProcess.Client</PackageId>
<Description>Communication SubProcess Client</Description>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Shintio.Communication.SubProcess\Shintio.Communication.SubProcess.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
<LangVersion Condition="'$(TargetFramework)' == 'netcoreapp2.2.8'">8</LangVersion>
</PropertyGroup>

<PropertyGroup>
<PackageId>Shintio.Communication.SubProcess.Server</PackageId>
<Description>Communication SubProcess Server</Description>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Shintio.Communication.SubProcess\Shintio.Communication.SubProcess.csproj" />
<ProjectReference Include="..\..\Misc\Shintio.ReflectionBomb\Shintio.ReflectionBomb.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@ public void StartClient(byte[] executable)
{
var path = $"{TempPath}/{Name}.exe";

FileWrapper.WriteAllBytesViaCmd(path, executable);
// FileWrapper.WriteAllBytesViaCmd(path, executable);

StartClient(path);
}

public void StartClient(string path)
{
Process = ProcessWrapper.Start(new ProcessStartInfo
{
FileName = path,
ArgumentList = { Name },
UseShellExecute = false,
CreateNoWindow = true,
RedirectStandardOutput = true,
RedirectStandardInput = true,
});
// Process = ProcessWrapper.Start(new ProcessStartInfo
// {
// FileName = path,
// ArgumentList = { Name },
// UseShellExecute = false,
// CreateNoWindow = true,
// RedirectStandardOutput = true,
// RedirectStandardInput = true,
// });

InitWorkers();
}
Comment on lines 41 to 54
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Critical: Process remains null after StartClient(string path) exits.

Lines 43–51 are commented out, so ProcessWrapper.Start() is never called and the Process property is never assigned. This causes:

  1. InitWorkers() (called on line 53) immediately returns because of the null check at lines 78–81.
  2. No background message-reading or ping tasks are started.
  3. Subsequent calls to BeginRequest() (lines 56–59) and Send() (lines 70–74) will attempt to dereference a null Process and throw NullReferenceException at runtime.

This appears to be incomplete or debug code left in place. Either:

  • Uncomment lines 43–51 to restore process creation, or
  • Remove/rework this method to clarify the intended behavior if process management is being replaced.
🤖 Prompt for AI Agents
In
src/Communication/Shintio.Communication.SubProcess.Server/Utils/ClientRunner.cs
around lines 41 to 54, the code that starts and assigns the child process has
been commented out so the Process property remains null; restore process
creation and assignment so InitWorkers() can run correctly. Re-enable the
ProcessWrapper.Start(...) call (or otherwise create and assign Process with the
correct ProcessStartInfo including FileName=path, ArgumentList.Add(Name),
UseShellExecute=false, CreateNoWindow=true, RedirectStandardOutput=true,
RedirectStandardInput=true) before calling InitWorkers(), and ensure any
exceptions from starting the process are handled/logged and Process is not left
null.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
<LangVersion Condition="'$(TargetFramework)' == 'netcoreapp2.2.8'">8</LangVersion>
</PropertyGroup>

<PropertyGroup>
<PackageId>Shintio.Communication.SubProcess</PackageId>
<Description>Communication SubProcess</Description>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\Misc\Shintio.ReflectionBomb\Shintio.ReflectionBomb.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup>
<PackageId>Shintio.Communication.SystemPipes</PackageId>
<Description>Communication SystemPipes</Description>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Shintio.Communication.Core\Shintio.Communication.Core.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup>
<PackageId>Shintio.Compression.Extensions</PackageId>
<Description>Compression Extensions</Description>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0"/>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

<PropertyGroup>
<PackageId>Shintio.Compression.LZ4</PackageId>
<Description>Compression LZ4</Description>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Shintio.Compression\Shintio.Compression.csproj"/>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

<PropertyGroup>
<PackageId>Shintio.Compression.Snappy</PackageId>
<Description>Compression Snappy</Description>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Shintio.Compression\Shintio.Compression.csproj"/>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
<LangVersion Condition="'$(TargetFramework)' == 'netcoreapp2.2.8'">8</LangVersion>
</PropertyGroup>

<PropertyGroup>
<PackageId>Shintio.Compression.System</PackageId>
<Description>Compression System</Description>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Shintio.Compression\Shintio.Compression.csproj"/>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
<LangVersion Condition="'$(TargetFramework)' == 'netcoreapp2.2.8'">8</LangVersion>
</PropertyGroup>

<PropertyGroup>
<PackageId>Shintio.Compression.Zlib</PackageId>
<Description>Compression Zlib</Description>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Shintio.Compression\Shintio.Compression.csproj"/>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

<PropertyGroup>
<PackageId>Shintio.Compression.Zstd</PackageId>
<Description>Compression Zstd</Description>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Shintio.Compression\Shintio.Compression.csproj"/>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@
<LangVersion Condition="'$(TargetFramework)' == 'netcoreapp2.2.8'">8</LangVersion>
</PropertyGroup>

<PropertyGroup>
<PackageId>Shintio.Compression</PackageId>
<Description>Compression</Description>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup>
<PackageId>Shintio.Database.MySql</PackageId>
<Description>Database MySql</Description>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Shintio.Database\Shintio.Database.csproj" />
</ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions src/Database/Shintio.Database/Shintio.Database.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup>
<PackageId>Shintio.Database</PackageId>
<Description>Database</Description>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0"/>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Microsoft.CodeAnalysis;
using Shintio.CodeBuilder.CSharp.CodeBlocks;
using Shintio.CodeBuilder.CSharp.Factories;

namespace Shintio.CodeBuilder.CSharp.SourceGenerators.Factories;

public static class ClassCodeBlockFactoryExtensions
{
public static ClassCodeBlock Create(this ClassCodeBlockFactory factory, INamedTypeSymbol symbol)
{
return factory.Create(symbol.Name).Partial();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using Microsoft.CodeAnalysis;
using Shintio.CodeBuilder.CSharp.CodeBlocks;
using Shintio.CodeBuilder.CSharp.Factories;

namespace Shintio.CodeBuilder.CSharp.SourceGenerators.Factories;

public static class FileCodeBlockFactoryExtensions
{
public static FileCodeBlock Create(
this FileCodeBlockFactory factory,
IEnumerable<string> usings,
INamedTypeSymbol symbol,
Action<ClassCodeBlock> builder
)
{
return factory.Create(usings, symbol.ToString(), builder);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" />
</ItemGroup>
Comment on lines +9 to +12
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

Specify an explicit version for Microsoft.CodeAnalysis.

The PackageReference for Microsoft.CodeAnalysis on Line 10 lacks a Version attribute, while Microsoft.CodeAnalysis.CSharp explicitly specifies v4.4.0. Omitting the version can lead to non-deterministic builds and unexpected package updates.

Add an explicit version constraint to match your repository's dependency management approach:

-        <PackageReference Include="Microsoft.CodeAnalysis" PrivateAssets="all" />
+        <PackageReference Include="Microsoft.CodeAnalysis" Version="4.4.0" PrivateAssets="all" />




</web_search>

---

🏁 Script executed:

```shell
#!/bin/bash
# Find all .csproj files to check version pinning patterns
fd -t f '\.csproj$' -x cat {} \; | grep -A2 -B2 'PackageReference'

Length of output: 5817


🏁 Script executed:

#!/bin/bash
# Check if the specific source generator project file exists and inspect it
find . -name "Shintio.CodeBuilder.CSharp.SourceGenerators.csproj" -type f -exec cat {} \;

Length of output: 560


🌐 Web query:

Microsoft.CodeAnalysis version compatibility 4.4.0 source generators

💡 Result:

Short answer

  • Roslyn/Microsoft.CodeAnalysis 4.4.0 introduced APIs (e.g. newer IncrementalGenerator helpers) that source generators may want to use, but a generator that references Microsoft.CodeAnalysis 4.4.0 will fail to load on older compiler/SDK hosts that provide an older Microsoft.CodeAnalysis assembly (you’ll see CS8032 / "Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.4.0.0'"). [1][2][4]

What to do

  • If you need the 4.4.0 APIs: multi-target your generator (produce builds that reference older Microsoft.CodeAnalysis versions and one that references 4.4.0) or ship a 4.4-targeted build alongside older-targeted builds (this is the approach used by Microsoft-built generators). This lets the generator run on both newer and older SDKs. [2][5][3]
  • If you want widest compatibility and can avoid new APIs: target the lowest Microsoft.CodeAnalysis version that provides the APIs you actually need (so the generator will load on older SDKs). [2][4]

References

  • Microsoft.CodeAnalysis 4.4.0 NuGet package. [1]
  • Andrew Lock — "Supporting multiple .NET SDK versions in analyzers and source generators" (walkthrough, CS8032 example and multi-targeting approach). [2]
  • Microsoft Docs — Roslyn/source generators overview (general guidance on generators and host interaction). [3]
  • StackOverflow example showing CS8032 when analyzer references a newer Microsoft.CodeAnalysis. [4]
  • Discussion/summary of compatibility trade-offs for Roslyn components (multi-targeting explanation). [5]

If you want, I can show a minimal csproj multi-targeting example that supports both older Roslyn and 4.4.0.


Specify an explicit version for Microsoft.CodeAnalysis.

The PackageReference for Microsoft.CodeAnalysis on line 10 lacks a Version attribute, while Microsoft.CodeAnalysis.CSharp explicitly specifies v4.4.0. This inconsistency creates two problems: (1) unversioned packages float to the latest version, causing non-deterministic builds, and (2) version mismatches between Microsoft.CodeAnalysis and Microsoft.CodeAnalysis.CSharp can trigger CS8032 errors at runtime when the source generator cannot load on older SDK hosts. All other PackageReferences in the repository explicitly pin versions.

Add an explicit version constraint matching Microsoft.CodeAnalysis.CSharp:

-        <PackageReference Include="Microsoft.CodeAnalysis" PrivateAssets="all" />
+        <PackageReference Include="Microsoft.CodeAnalysis" Version="4.4.0" PrivateAssets="all" />
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis" Version="4.4.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" />
</ItemGroup>
🤖 Prompt for AI Agents
In
src/DevTools/Shintio.CodeBuilder.CSharp.SourceGenerators/Shintio.CodeBuilder.CSharp.SourceGenerators.csproj
around lines 9 to 12, the PackageReference for Microsoft.CodeAnalysis is missing
a Version attribute which can lead to floating versions and runtime CS8032
errors; update that PackageReference to explicitly pin Version="4.4.0" (matching
Microsoft.CodeAnalysis.CSharp), keep PrivateAssets="all", and ensure the project
file uses the same version for both references to produce deterministic builds
and avoid runtime mismatches.


<ItemGroup>
<ProjectReference Include="..\Shintio.CodeBuilder.CSharp\Shintio.CodeBuilder.CSharp.csproj" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions src/DevTools/Shintio.CodeBuilder.CSharp/CSharpBuilder.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
namespace Shintio.CodeBuilder.CSharp;
Loading