ewilliams
ewilliams
CC#
Created by ewilliams on 3/2/2024 in #help
Removing Logging Abstractions from Libraries
No description
7 replies
CC#
Created by ewilliams on 3/2/2024 in #help
Removing Logging Abstractions from Libraries
No description
7 replies
CC#
Created by ewilliams on 3/2/2024 in #help
Removing Logging Abstractions from Libraries
nice, thanks!
7 replies
CC#
Created by ewilliams on 3/2/2024 in #help
Removing Logging Abstractions from Libraries
Damn now I feel dumb:) I thought that interface was part of asp, does it go back to standard 2.0?
7 replies
CC#
Created by ewilliams on 11/30/2023 in #help
Source Generators In Nuget Packages
Adding the Include DLL => /analyzers path did the trick. Also means nothing special has to happen when the package is pulled into another project.
<ItemGroup>
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
<None Include="..\..\docs\c3c_logo.png">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="..\..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
<None Include="..\..\docs\c3c_logo.png">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="..\..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>
7 replies
CC#
Created by ewilliams on 11/30/2023 in #help
Source Generators In Nuget Packages
Thanks. I did just get this working and will share my solution.
7 replies
CC#
Created by ewilliams on 11/30/2023 in #help
Source Generators In Nuget Packages
Project Including Nuget
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>12</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="C3C.Application" Version="1.0.0" />
<PackageReference Include="C3C.Domain" Version="1.0.0" />
<PackageReference Include="C3C.Drivers" Version="1.0.0" />
<PackageReference Include="C3C.Drivers.Generator" Version="1.1.1" OutputItemType="Analyzer"
ReferenceOutputAssembly="false"/>/>

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

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>12</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="C3C.Application" Version="1.0.0" />
<PackageReference Include="C3C.Domain" Version="1.0.0" />
<PackageReference Include="C3C.Drivers" Version="1.0.0" />
<PackageReference Include="C3C.Drivers.Generator" Version="1.1.1" OutputItemType="Analyzer"
ReferenceOutputAssembly="false"/>/>

</ItemGroup>
</Project>
7 replies
CC#
Created by ewilliams on 11/30/2023 in #help
Source Generators In Nuget Packages
Generator Project
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>latestmajor</LangVersion>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageOutputPath>..\..\release</PackageOutputPath>
<Version>1.1.1</Version>
</PropertyGroup>


<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" />
</ItemGroup>

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

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>latestmajor</LangVersion>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageOutputPath>..\..\release</PackageOutputPath>
<Version>1.1.1</Version>
</PropertyGroup>


<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" />
</ItemGroup>

</Project>
7 replies