AnnaSasDev
AnnaSasDev
CC#
Created by AnnaSasDev on 1/9/2025 in #help
Roslyn not finding a referenced package
right, I've learned something new today then ... Thanks so much!
8 replies
CC#
Created by AnnaSasDev on 1/9/2025 in #help
Roslyn not finding a referenced package
... what the .. yeah that fixed it?!? I'm so confused why this works ... but okay
8 replies
CC#
Created by AnnaSasDev on 1/9/2025 in #help
Roslyn not finding a referenced package
<!-- Ensure important files are packaged correctly -->
<ItemGroup Condition="'$(Configuration)' != 'Benchmark'">
<None Include="$(SolutionDir)LICENSE" Pack="true" PackagePath="" Visible="false" />
<None Include="$(SolutionDir)README.md" Pack="true" PackagePath="" Visible="false" />
<None Include="$(SolutionDir)assets/icon.png" Pack="true" PackagePath="" Visible="false" />
</ItemGroup>

<!-- Reference dependencies -->
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.12.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.12.0" PrivateAssets="all" />
</ItemGroup>

</Project>
<!-- Ensure important files are packaged correctly -->
<ItemGroup Condition="'$(Configuration)' != 'Benchmark'">
<None Include="$(SolutionDir)LICENSE" Pack="true" PackagePath="" Visible="false" />
<None Include="$(SolutionDir)README.md" Pack="true" PackagePath="" Visible="false" />
<None Include="$(SolutionDir)assets/icon.png" Pack="true" PackagePath="" Visible="false" />
</ItemGroup>

<!-- Reference dependencies -->
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.12.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.12.0" PrivateAssets="all" />
</ItemGroup>

</Project>
8 replies
CC#
Created by AnnaSasDev on 1/9/2025 in #help
Roslyn not finding a referenced package
csproj file of CodeOfChaos.GeneratorTools :
<Project Sdk="Microsoft.NET.Sdk">

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

<DevelopmentDependency>true</DevelopmentDependency>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>

<!-- Main package metadata -->
<PackageId>CodeOfChaos.GeneratorTools</PackageId>
<Version>1.1.0</Version>
<Authors>Anna Sas</Authors>
<Description>A library to help you create code generators more easily</Description>
<PackageProjectUrl>https://github.com/code-of-chaos/cs-code_of_chaos-generator_tools/</PackageProjectUrl>
<PackageTags>roslyn code-generator generator source-generator source</PackageTags>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<DebugType>embedded</DebugType>
<PackageLicenseFile Condition="'$(Configuration)' != 'Benchmark'">LICENSE</PackageLicenseFile>
<PackageReadmeFile Condition="'$(Configuration)' != 'Benchmark'">README.md</PackageReadmeFile>
<PackageIcon Condition="'$(Configuration)' != 'Benchmark'">icon.png</PackageIcon>
</PropertyGroup>
<Project Sdk="Microsoft.NET.Sdk">

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

<DevelopmentDependency>true</DevelopmentDependency>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>

<!-- Main package metadata -->
<PackageId>CodeOfChaos.GeneratorTools</PackageId>
<Version>1.1.0</Version>
<Authors>Anna Sas</Authors>
<Description>A library to help you create code generators more easily</Description>
<PackageProjectUrl>https://github.com/code-of-chaos/cs-code_of_chaos-generator_tools/</PackageProjectUrl>
<PackageTags>roslyn code-generator generator source-generator source</PackageTags>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<DebugType>embedded</DebugType>
<PackageLicenseFile Condition="'$(Configuration)' != 'Benchmark'">LICENSE</PackageLicenseFile>
<PackageReadmeFile Condition="'$(Configuration)' != 'Benchmark'">README.md</PackageReadmeFile>
<PackageIcon Condition="'$(Configuration)' != 'Benchmark'">icon.png</PackageIcon>
</PropertyGroup>
8 replies
CC#
Created by AnnaSasDev on 1/9/2025 in #help
Roslyn not finding a referenced package
<!-- Include external files -->
<ItemGroup>
<None Include="../../LICENSE" Pack="true" PackagePath="" Visible="false" />
<None Include="../../README.md" Pack="true" PackagePath="" Visible="false" />
<None Include="../../assets/icon.png" Pack="true" PackagePath="" Visible="false" />
</ItemGroup>

<!-- Package dependencies -->
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.12.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.12.0" PrivateAssets="all" />
<PackageReference Include="CodeOfChaos.GeneratorTools" Version="1.1.0" Pack="true" GeneratePathProperty="true" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
<None Include="$(PkgCodeOfChaos_GeneratorTools)\lib\netstandard2.0\*.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
</ItemGroup>

</Project>
<!-- Include external files -->
<ItemGroup>
<None Include="../../LICENSE" Pack="true" PackagePath="" Visible="false" />
<None Include="../../README.md" Pack="true" PackagePath="" Visible="false" />
<None Include="../../assets/icon.png" Pack="true" PackagePath="" Visible="false" />
</ItemGroup>

<!-- Package dependencies -->
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.12.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.12.0" PrivateAssets="all" />
<PackageReference Include="CodeOfChaos.GeneratorTools" Version="1.1.0" Pack="true" GeneratePathProperty="true" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
<None Include="$(PkgCodeOfChaos_GeneratorTools)\lib\netstandard2.0\*.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
</ItemGroup>

</Project>
8 replies
CC#
Created by AnnaSasDev on 1/9/2025 in #help
Roslyn not finding a referenced package
csproj file of AterraEngine.Unions.Generators : (had to split the file because of max message length)
<Project Sdk="Microsoft.NET.Sdk">

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

<GeneratePackageOnBuild>true</GeneratePackageOnBuild> <!-- Generates a package at build -->
<IncludeBuildOutput>false</IncludeBuildOutput> <!-- Do not include the generator as a lib dependency -->
<IsDeveloperDependency>true</IsDeveloperDependency>
<DevelopmentDependency>true</DevelopmentDependency>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
<IsRoslynComponent>true</IsRoslynComponent>
<NoWarn>NU5128</NoWarn>

<!-- Package metadata -->
<PackageId>AterraEngine.Unions.Generators</PackageId>
<Version>3.5.0</Version>
<Authors>Anna Sas</Authors>
<Description>The Source Generator for AterraEngine.Unions</Description>
<PackageProjectUrl>https://github.com/AterraEngine/unions-cs/</PackageProjectUrl>
<PackageTags>discriminated unions;rosyln;generator</PackageTags>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<DebugType>embedded</DebugType>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIcon>icon.png</PackageIcon>
</PropertyGroup>
<Project Sdk="Microsoft.NET.Sdk">

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

<GeneratePackageOnBuild>true</GeneratePackageOnBuild> <!-- Generates a package at build -->
<IncludeBuildOutput>false</IncludeBuildOutput> <!-- Do not include the generator as a lib dependency -->
<IsDeveloperDependency>true</IsDeveloperDependency>
<DevelopmentDependency>true</DevelopmentDependency>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
<IsRoslynComponent>true</IsRoslynComponent>
<NoWarn>NU5128</NoWarn>

<!-- Package metadata -->
<PackageId>AterraEngine.Unions.Generators</PackageId>
<Version>3.5.0</Version>
<Authors>Anna Sas</Authors>
<Description>The Source Generator for AterraEngine.Unions</Description>
<PackageProjectUrl>https://github.com/AterraEngine/unions-cs/</PackageProjectUrl>
<PackageTags>discriminated unions;rosyln;generator</PackageTags>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<DebugType>embedded</DebugType>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIcon>icon.png</PackageIcon>
</PropertyGroup>
8 replies
CC#
Created by AnnaSasDev on 1/9/2025 in #help
Roslyn not finding a referenced package
I haven't created a new latest nuget package for AterraEngine.Unions.Generators yet as the code isn't working. Within the project there is a Sample project AterraEngine.Unions.Generators.Sample which when I try and build outputs:
1>CSC: Warning CS8785 : Generator 'UnionGenerator' failed to generate source. 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 'CodeOfChaos.GeneratorTools, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.'.
1>CSC: Warning CS8785 : Generator 'UnionGenerator' failed to generate source. 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 'CodeOfChaos.GeneratorTools, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.'.
AterraEngine.Unions.Generators is on the latest uploaded version of CodeOfChaos.GeneratorTools which is 1.1.0
8 replies