Skip to content

Commit 96185df

Browse files
author
Travis Illig
committed
Updated to latest .NET SDK, VS 2017, analyzers. FIE => 3.4.1 to avoid package restore issue with Castle.Core.
1 parent 26aa601 commit 96185df

7 files changed

Lines changed: 20 additions & 15 deletions

File tree

build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Import-Module $PSScriptRoot\Build\Autofac.Build.psd1 -Force
77

88
$artifactsPath = "$PSScriptRoot\artifacts"
99
$packagesPath = "$artifactsPath\packages"
10-
$sdkVersion = "1.0.1"
10+
$sdkVersion = (Get-Content "$PSScriptRoot\global.json" | ConvertFrom-Json).sdk.version
1111

1212
# Clean up artifacts folder
1313
if (Test-Path $artifactsPath) {

build/Autofac.Build.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function Install-DotNetCli
7777
# Download the dotnet CLI install script
7878
if (!(Test-Path .\dotnet\install.ps1))
7979
{
80-
Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.1/scripts/obtain/dotnet-install.ps1" -OutFile ".\.dotnet\dotnet-install.ps1"
80+
Invoke-WebRequest "https://dot.net/v1/dotnet-install.ps1" -OutFile ".\.dotnet\dotnet-install.ps1"
8181
}
8282

8383
# Run the dotnet CLI install
@@ -172,11 +172,11 @@ function Invoke-DotNetPack
172172

173173
if ($VersionSuffix -eq "")
174174
{
175-
& dotnet pack ("""" + $Project.FullName + """") --configuration Release --include-symbols --output $PackagesPath
175+
& dotnet pack ("""" + $Project.FullName + """") --configuration Release --output $PackagesPath
176176
}
177177
else
178178
{
179-
& dotnet pack ("""" + $Project.FullName + """") --configuration Release --version-suffix $VersionSuffix --include-symbols --output $PackagesPath
179+
& dotnet pack ("""" + $Project.FullName + """") --configuration Release --version-suffix $VersionSuffix --output $PackagesPath
180180
}
181181
if ($LASTEXITCODE -ne 0)
182182
{

global.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"sdk": {
3+
"version": "2.1.300"
4+
}
5+
}

src/Autofac.Extras.FakeItEasy/AutoFake.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public TService Provide<TService>(TService instance)
161161
/// <see langword="false" /> if this is getting run as part of finalization where
162162
/// managed resources may have already been cleaned up.
163163
/// </param>
164-
private void Dispose(bool disposing)
164+
protected virtual void Dispose(bool disposing)
165165
{
166166
if (!this._disposed)
167167
{

src/Autofac.Extras.FakeItEasy/Autofac.Extras.FakeItEasy.csproj

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
<PackageLicenseUrl>http://www.opensource.org/licenses/mit-license.php</PackageLicenseUrl>
1919
<RepositoryType>git</RepositoryType>
2020
<RepositoryUrl>https://github.com/autofac/Autofac.Extras.FakeItEasy</RepositoryUrl>
21-
<NetStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard1.6' ">1.6.0</NetStandardImplicitPackageVersion>
2221
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
2322
<GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>
2423
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
@@ -32,17 +31,20 @@
3231

3332
<ItemGroup>
3433
<PackageReference Include="Autofac" Version="4.0.1" />
35-
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="1.1.0">
34+
<PackageReference Include="FakeItEasy" Version="3.4.1" />
35+
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="2.6.0">
3636
<PrivateAssets>All</PrivateAssets>
3737
</PackageReference>
38-
<PackageReference Include="FakeItEasy" Version="3.0.0" />
39-
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta001">
38+
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.0">
4039
<PrivateAssets>All</PrivateAssets>
4140
</PackageReference>
42-
<PackageReference Include="System.Runtime.Analyzers" Version="1.2.0-beta2">
41+
<PackageReference Include="Microsoft.Net.RoslynDiagnostics" Version="2.6.0">
4342
<PrivateAssets>All</PrivateAssets>
4443
</PackageReference>
45-
<PackageReference Include="System.Runtime.InteropServices.Analyzers" Version="1.2.0-beta2">
44+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-62925-02" Condition="Exists('$(MSBuildThisFileDirectory)../../.git')">
45+
<PrivateAssets>All</PrivateAssets>
46+
</PackageReference>
47+
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta006">
4648
<PrivateAssets>All</PrivateAssets>
4749
</PackageReference>
4850
</ItemGroup>

src/Autofac.Extras.FakeItEasy/FakeRegistrationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public IEnumerable<IComponentRegistration> RegistrationsFor(
7676
{
7777
if (service == null)
7878
{
79-
throw new ArgumentNullException("service");
79+
throw new ArgumentNullException(nameof(service));
8080
}
8181

8282
var typedService = service as TypedService;

test/Autofac.Extras.FakeItEasy.Test/Autofac.Extras.FakeItEasy.Test.csproj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
1111
<PackageId>Autofac.Extras.FakeItEasy.Test</PackageId>
1212
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
13-
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
1413
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
1514
<CodeAnalysisRuleSet>../../build/Analyzers.ruleset</CodeAnalysisRuleSet>
1615
</PropertyGroup>
@@ -24,8 +23,7 @@
2423
<ItemGroup>
2524
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
2625
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
27-
<PackageReference Include="Microsoft.NETCore.Platforms" Version="1.0.2" />
28-
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta001">
26+
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta006">
2927
<PrivateAssets>All</PrivateAssets>
3028
</PackageReference>
3129
<PackageReference Include="xunit" Version="2.2.0" />

0 commit comments

Comments
 (0)