math2
math2
CC#
Created by math2 on 4/30/2025 in #help
issues with code generator
tyvm
17 replies
CC#
Created by math2 on 4/30/2025 in #help
issues with code generator
im testing the nuget package, and the generators all work fine except for one that uses Microsoft.Extensions.Primitives
0>CSC: Warning CS8784 : Generator 'AssetGenerator' failed to initialize. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'FileNotFoundException' with message 'Could not load file or assembly 'Microsoft.Extensions.Primitives, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.'.
0>CSC: Warning CS8784 : Generator 'AssetGenerator' failed to initialize. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'FileNotFoundException' with message 'Could not load file or assembly 'Microsoft.Extensions.Primitives, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.'.
17 replies
CC#
Created by math2 on 4/30/2025 in #help
issues with code generator
apologies im p new to nuget stuff
17 replies
CC#
Created by math2 on 4/30/2025 in #help
issues with code generator
wasnt aware you could test nuget packages locally, ty
17 replies
CC#
Created by math2 on 4/30/2025 in #help
issues with code generator
ic
17 replies
CC#
Created by math2 on 4/30/2025 in #help
issues with code generator
i wanted to put it over on nuget, but i wanted to make sure the dll actually worked first
17 replies
CC#
Created by math2 on 4/30/2025 in #help
issues with code generator
and here is the testbench csproj im using to test the generators:
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<Reference Include="AnalyzerExperiment" OutputItemType="Analyzer" ReferenceOutputAssembly="false">
<HintPath>..\..\AnalyzerExperiment\AnalyzerExperiment\bin\Debug\netstandard2.0\AnalyzerExperiment.dll</HintPath> <!-- this generates nothing-->
</Reference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\AnalyzerExperiment\AnalyzerExperiment\AnalyzerExperiment.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/> <!-- this however executes the generator-->
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<Reference Include="AnalyzerExperiment" OutputItemType="Analyzer" ReferenceOutputAssembly="false">
<HintPath>..\..\AnalyzerExperiment\AnalyzerExperiment\bin\Debug\netstandard2.0\AnalyzerExperiment.dll</HintPath> <!-- this generates nothing-->
</Reference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\AnalyzerExperiment\AnalyzerExperiment\AnalyzerExperiment.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/> <!-- this however executes the generator-->
</ItemGroup>

</Project>
ive ensured the dll is in the build output and all, im really unsure of whats happening, if this is an actual issue or if im just a little dumb
17 replies
CC#
Created by math2 on 3/19/2024 in #help
help with shared code between 2 projects
tyvm
11 replies
CC#
Created by math2 on 3/19/2024 in #help
help with shared code between 2 projects
not rlly even an issue, was just wondering if there was a better way to do it rather than having to copypaste yeah
11 replies
CC#
Created by math2 on 3/19/2024 in #help
help with shared code between 2 projects
No description
11 replies