Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3183

Code packaged in NuGet package is not visible

$
0
0

I've packaged and published my code generator, including code fixes and a DLL specifically for the attribute that triggers everything. The attribute isn't available when I add the package to my .NET 8 project.

If I look at the package with NuGet Package Explorer I see this:

enter image description here

The attribute defined in the DLL is public. What am I missing to make it usable?

This is what I have in the project that does the packing:

<PropertyGroup><TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);_AddAnalyzersToOutput</TargetsForTfmSpecificContentInPackage></PropertyGroup><ItemGroup><ProjectReference Include="..\RegisterWithDi.Attribute\RegisterWithDi.Attribute.csproj" /><ProjectReference Include="..\RegisterWithDi.CodeFixes\RegisterWithDi.CodeFixes.csproj" /><ProjectReference Include="..\RegisterWithDi\RegisterWithDi.csproj" /></ItemGroup><ItemGroup><None Include="..\README.md"><Pack>True</Pack><PackagePath>\</PackagePath></None></ItemGroup><Target Name="_AddAnalyzersToOutput"><ItemGroup><TfmSpecificPackageFile Include="$(OutputPath)\RegisterWithDi.dll" PackagePath="analyzers/dotnet/cs" /><TfmSpecificPackageFile Include="$(OutputPath)\RegisterWithDi.CodeFixes.dll" PackagePath="analyzers/dotnet/cs" /><TfmSpecificPackageFile Include="$(OutputPath)\RegisterWithDi.Attribute.dll" PackagePath="analyzers/dotnet/cs" /><TfmSpecificPackageFile Include="$(OutputPath)\RegisterWithDi.Attribute.dll" PackagePath="lib\netstandard2.0" /></ItemGroup></Target>

Viewing all articles
Browse latest Browse all 3183

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>