Skip to content
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
6 changes: 3 additions & 3 deletions samples/Samples/Samples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.14.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.10.1" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="18.10.1" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.msbuild" Version="2.9.3" Condition="'$(TargetFramework)' == 'net48'" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5" />
<PackageReference Include="xunit.runner.visualstudio" Version="4.0.0" />
<PackageReference Include="Stunts" Version="$(Version)" />
</ItemGroup>

Expand Down
46 changes: 20 additions & 26 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,23 @@
<PackageVersion Include="ThisAssembly" Version="2.1.5" />
<PackageVersion Include="NuGetizer" Version="1.5.0" />
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.6.3" />
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.2" />
</ItemGroup>

<ItemGroup Label="Roslyn">
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.14.0"/>
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="3.8.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="5.9.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="5.9.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="5.9.0"/>
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="5.9.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="5.9.0" />
<!-- Required to unify this dependency across projects. -->
<PackageVersion Include="System.Runtime.CompilerServices.Unsafe" Version="6.1.2" />

<!-- When running under .netframework, this dependency will be needed -->
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
<PackageVersion Include="System.ValueTuple" Version="4.6.2" />

<!-- For packaging purposes -->
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.0" />
<PackageVersion Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.12" />
<PackageVersion Include="Microsoft.Bcl.HashCode" Version="6.0.0" />

<!-- Native SQLite for tests on macOS. 3.x drops the vulnerable SQLitePCLRaw.lib.e_sqlite3 package. -->
<PackageVersion Include="SQLitePCLRaw.bundle_e_sqlite3" Version="3.0.5" />
Expand All @@ -39,31 +37,27 @@
</ItemGroup>

<ItemGroup Label="Tests">
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageVersion Include="Microsoft.TestPlatform.ObjectModel" Version="17.14.1" />
<PackageVersion Include="Moq" Version="4.16.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.10.1" />
<PackageVersion Include="Microsoft.TestPlatform.ObjectModel" Version="18.10.1" />
<PackageVersion Include="Moq" Version="4.21.0" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.runner.console" Version="2.9.3" />
<PackageVersion Include="xunit.runner.msbuild" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
<PackageVersion Include="System.ComponentModel.Composition" Version="5.0.0" />

<PackageVersion Include="NuGet.Client" Version="4.2.0" />
<PackageVersion Include="NuGet.Protocol" Version="7.9.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="4.0.0" />
</ItemGroup>

<ItemGroup Label="MSBuild">
<PackageVersion Include="Microsoft.Build" Version="18.9.6" />
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="17.14.28" />
<PackageVersion Include="Microsoft.Build.Locator" Version="1.4.1" />
<PackageVersion Include="MSBuild.StructuredLogger" Version="2.1.500" />
<PackageVersion Include="Microsoft.Build" Version="18.10.1" />
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="18.10.1" />
<PackageVersion Include="Microsoft.Build.Locator" Version="1.11.2" />
<PackageVersion Include="MSBuild.StructuredLogger" Version="2.3.246" />
</ItemGroup>

<ItemGroup>
<PackageVersion Include="TypeNameFormatter.Sources" Version="1.1.1" />
<PackageVersion Include="Castle.Core" Version="4.4.1" />
<PackageVersion Include="Superpower" Version="2.3.0" />
<PackageVersion Include="docfx.console" Version="2.57.2" />
<PackageVersion Include="TypeNameFormatter.Sources" Version="1.1.2" />
<PackageVersion Include="Castle.Core" Version="5.2.1" />
<PackageVersion Include="Superpower" Version="3.2.1" />
<PackageVersion Include="docfx.console" Version="2.59.4" />
</ItemGroup>

</Project>
5 changes: 4 additions & 1 deletion src/Directory.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@

<!-- We need this in .props so it kicks-in before all the common.props defaulting -->
<PropertyGroup Label="Stunts.StaticProxy" Condition="$(MSBuildProjectName) == 'Stunts.StaticProxy'">
<RoslynVersion>4.14.0</RoslynVersion>
<!-- Compile against the 5.0 public API. tools\5.0 is the 5.x band, so the
same generator loads on 5.0 through the latest 5.x compiler. -->
<RoslynVersion>5.0.0</RoslynVersion>
<RoslynToolsVersion>5.0</RoslynToolsVersion>
<BaseIntermediateOutputPath>obj\$(RoslynVersion)\</BaseIntermediateOutputPath>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<OutputPath>bin\$(RoslynVersion)\$(Configuration)</OutputPath>
Expand Down
3 changes: 2 additions & 1 deletion src/Stunts.CodeAnalysis/Stunts.CodeAnalysis.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

<ItemGroup>
<PackageReference Include="Superpower" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Pack="false" />
<!-- 5.0 is the floor of the 5.x compiler line. The generator is packed once under tools\5.0. -->
<PackageReference Include="Microsoft.CodeAnalysis.Common" VersionOverride="5.0.0" Pack="false" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" PrivateAssets="all" />
</ItemGroup>

Expand Down
10 changes: 5 additions & 5 deletions src/Stunts.IntegrationTests/Stunts.IntegrationTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,26 @@

<ItemGroup Label="Targets">
<PackageReference Include="Microsoft.ApplicationInsights" />
<PackageVersion Include="Microsoft.ApplicationInsights" Version="2.17.0" />
<PackageVersion Include="Microsoft.ApplicationInsights" Version="3.1.2" />
</ItemGroup>

<ItemGroup Label="net10 Targets" Condition="'$(TargetFramework)' == 'net10.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="5.0.5" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="10.0.12" />

<PackageReference Include="Microsoft.AspNetCore.Mvc" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc" Version="2.3.13" />
</ItemGroup>

<ItemGroup Label="net48 Targets" Condition="'$(TargetFramework)' == 'net48'">
<PackageReference Include="EntityFramework" />
<PackageVersion Include="EntityFramework" Version="6.4.4" />
<PackageVersion Include="EntityFramework" Version="6.5.2" />

<PackageReference Include="Microsoft.AspNet.Mvc" />
<PackageVersion Include="Microsoft.AspNet.Mvc" Version="5.2.7" />
<PackageVersion Include="Microsoft.AspNet.Mvc" Version="5.3.0" />

<PackageReference Include="Microsoft.AspNet.WebApi" />
<PackageVersion Include="Microsoft.AspNet.WebApi" Version="5.2.7" />
<PackageVersion Include="Microsoft.AspNet.WebApi" Version="5.3.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Stunts.Package/Stunts.Package.msbuildproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.Build.NoTargets/3.7.134" DefaultTargets="Pack">
<Project Sdk="Microsoft.Build.NoTargets/3.7.134" DefaultTargets="Pack">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<!-- NoTargets 3.7 excludes these projects from generated solutions. This one is the package project. -->
Expand Down
8 changes: 4 additions & 4 deletions src/Stunts.Package/Stunts.targets
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
Condition="'$(EnableCompileTimeStunts)' == 'true' AND '$(SkipCompilerExecution)' != 'true' AND '$(DesignTimeBuild)' != 'true'">

<PropertyGroup>
<!-- One generator, built against the public Roslyn 4.14 API. The host
compiler supplies Microsoft.CodeAnalysis. -->
<StuntsAnalyzerDir>$([MSBuild]::NormalizePath($(MSBuildThisFileDirectory)..\..\tools\4.14.0))</StuntsAnalyzerDir>
<!-- One generator, built against the public Roslyn 5.0 API so it loads
on any 5.x compiler. The host supplies Microsoft.CodeAnalysis. -->
<StuntsAnalyzerDir>$([MSBuild]::NormalizePath($(MSBuildThisFileDirectory)..\..\tools\5.0))</StuntsAnalyzerDir>
</PropertyGroup>

<Error Condition="!Exists('$(StuntsAnalyzerDir)\Stunts.StaticProxy.dll')" Code="ST010"
Text="Stunts.StaticProxy was not found under tools\4.14.0. Install the Stunts.DynamicProxy package to use run-time stunts." />
Text="Stunts.StaticProxy was not found under tools\5.0. Install the Stunts.DynamicProxy package to use run-time stunts." />

<ItemGroup>
<Analyzer Include="$(StuntsAnalyzerDir)\Stunts.StaticProxy.dll" NuGetPackageId="Stunts" NuGetPackageVersion="$(StuntsVersion)" />
Expand Down
1 change: 0 additions & 1 deletion src/Stunts.StaticProxy/Stunts.StaticProxy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>true</IsPackable>
<RoslynVersion>4.14.0</RoslynVersion>
<!-- ISourceGenerator is obsolete in Roslyn 4.14 (RS1042). Extended analyzer rules also ban
that API and the assembly probing in DependencyResolver (RS1035). Incremental generators
are a separate change, so RS1036 stays suppressed until then. -->
Expand Down
5 changes: 3 additions & 2 deletions src/Stunts.StaticProxy/Stunts.StaticProxy.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

<!-- When packaged as part of Stunts.Package, we get this property as false so we pack differently as a tool -->
<PropertyGroup Condition="'$(IsPackable)' != 'true'">
<PackFolder>tools\$(RoslynVersion)</PackFolder>
<RoslynToolsVersion Condition="'$(RoslynToolsVersion)' == ''">5.0</RoslynToolsVersion>
<PackFolder>tools\$(RoslynToolsVersion)</PackFolder>
<DisableTransitiveProjectReferences>true</DisableTransitiveProjectReferences>
<DisableTransitiveFrameworkReferences>true</DisableTransitiveFrameworkReferences>
</PropertyGroup>
Expand Down Expand Up @@ -41,7 +42,7 @@
and '%(Filename)' != 'Microsoft.CodeAnalysis'
and '%(Filename)' != 'Microsoft.CodeAnalysis.CSharp'
and '%(Filename)' != 'Microsoft.CodeAnalysis.VisualBasic'" />
<PackageFile Include="@(AnalyzerFile -> '%(FullPath)')" PackagePath="tools\$(RoslynVersion)\%(Filename)%(Extension)" />
<PackageFile Include="@(AnalyzerFile -> '%(FullPath)')" PackagePath="tools\$(RoslynToolsVersion)\%(Filename)%(Extension)" />
</ItemGroup>
</Target>

Expand Down
6 changes: 6 additions & 0 deletions src/Stunts.UnitTests/Stunts.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
<RootNamespace>Stunts.UnitTests</RootNamespace>
<!-- Used in WriteCscCommandLineArgs target -->
<ProvideCommandLineArgs>true</ProvideCommandLineArgs>
<!-- Tests load MSBuild from the SDK via Microsoft.Build.Locator and delete the
NuGet copies afterward. Locator 1.11+ errors if those assemblies are copied. -->
<DisableMSBuildAssemblyCopyCheck>true</DisableMSBuildAssemblyCopyCheck>
<!-- Microsoft.Build 18.10 targets net11.0 and net472. net10.0 restores the net472 assets. -->
<NoWarn>$(NoWarn);NU1701</NoWarn>
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading
Loading