Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed the forcefully added Microsoft.CodeAnalysis.CSharp reference #18

Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Publish
on:
release:
types: [published]
push: {}
pull_request: {}

env:
Expand Down Expand Up @@ -40,4 +39,5 @@ jobs:
run: dotnet pack src\SourceGenerator.Foundations\SourceGenerator.Foundations.csproj -p:Version=${{env.GitVersion_AssemblySemVer}} -p:PackageVersion=${{env.GitVersion_FullSemVer}}
# -- Release Only --
- name: Push NuGet
if: github.event_name == 'release'
run: dotnet nuget push ${{env.ProjectDir}}bin\${{env.Configuration}}\*.nupkg --skip-duplicate --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
6 changes: 6 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
<RootNamespace>SGF</RootNamespace>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
<SGFSourceDir>$(MSBuildThisFileDirectory)</SGFSourceDir>
<ImgDir>$(MSBuildThisFileDirectory)..\img\</ImgDir>
<SGfIco>$(MSBuildThisFileDirectory)..\img\icon.png</SGfIco>
<!-- Icons -->
<ApplicationIcon>$(MSBuildThisFileDirectory)..\img\icon.ico</ApplicationIcon>


<!-- Paths | SGF Core -->
<SGFProjectDir>$(SGFSourceDir)SourceGenerator.Foundations\</SGFProjectDir>
<SGFProjectPath>$(SGFProjectDir)SourceGenerator.Foundations.csproj</SGFProjectPath>
Expand Down
6 changes: 5 additions & 1 deletion src/Nuget.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
===============================-->
<PropertyGroup>
<TItle>Source Generator Foundations</TItle>
<AUthors>Byron Mayne</AUthors>
<Authors>Byron Mayne</Authors>
<PackageIcon>SgfIcon.png</PackageIcon>
<Description>Provides boilerplate code to be used by source generators. Provides the ability to have nuget packages that are resolvable at runtime as well as much better exception handling.</Description>
<PackageProjectUrl>https://github.dev/ByronMayne/SourceGenerator.Foundations</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand All @@ -21,6 +22,9 @@
<!-- Changes the content of the nuget package by manually adding files-->
<Target Name="AppendNugetContent">
<ItemGroup>
<TfmSpecificPackageFile Include="$(ImgDir)icon.png">
<PackagePath>/$(PackageIcon)</PackagePath>
</TfmSpecificPackageFile>
<TfmSpecificPackageFile Include="$(SGFContractsProjectDir)bin\$(Configuration)\netstandard2.0\SourceGenerator.Foundations.Contracts.dll">
<PackagePath>lib/netstandard2.0/SourceGenerator.Foundations.Contracts.dll</PackagePath>
</TfmSpecificPackageFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,13 @@
<LangVersion>11</LangVersion>
<IsRoslynComponent>true</IsRoslynComponent>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);CustomNugetPack</TargetsForTfmSpecificContentInPackage>
<ApplicationIcon>icon.ico</ApplicationIcon>
<PackageIcon>icon.png</PackageIcon>
</PropertyGroup>
<ItemGroup>
<Content Include="icon.ico" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.3.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<None Include="..\..\img\icon.png">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="..\..\README.md" Pack="True" PackagePath="/" />
<None Update="SourceGenerator.Foundations.props" Pack="True" PackagePath="build/$(AssemblyName).props" />
<None Update="SourceGenerator.Foundations.targets" Pack="True" PackagePath="build/$(AssemblyName).targets" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@
<CompilerVisibleProperty Include="RootNamespace" />
<CompilerVisibleProperty Include="AssemblyName" />
<CompilerVisibleProperty Include="BaseOutputPath "/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.3.1" PrivateAssets="all" />
</ItemGroup>
<ItemGroup Condition="'$(IsNuGetPackage.ToLower())' == 'true'">
<SGF_EmbeddedAssembly Include="$(MSBuildThisFileDirectory)..\sgf\embedded\assemblies\*.*"/>

<!-- Core -->
<Compile Include="$(MSBuildThisFileDirectory)..\sgf\src\Core\**\*.cs" Visible="$(SgfShowImports)">
<Link>SGF/%(RecursiveDir)%(Filename)%(Extension)</Link>
Expand Down
Loading