Skip to content

Commit e4a1043

Browse files
Clean out the cobwebs (#128)
* .Net 4.5 is no longer supported. Raise the bar to 4.6.2. * Rev to 3.11-preview for following work.
1 parent a47558d commit e4a1043

10 files changed

Lines changed: 24 additions & 89 deletions

.nuget/NuGet.Config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<add key="disableSourceControlIntegration" value="true" />
55
</solution>
66
<packageSources>
7+
<clear />
78
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
89
</packageSources>
910
<packageRestore>

Clean.cmd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ set logOptions=/v:n /flp:Summary;Verbosity=diag;LogFile=msbuild.log /flp1:warnin
1313
REM set logOptions=/v:diag /flp:Summary;Verbosity=diag;LogFile=msbuild.log /flp1:warningsonly;logfile=msbuild.wrn /flp2:errorsonly;logfile=msbuild.err
1414

1515
%MSBUILDEXE% "%~dp0\RoslynCodeProvider.msbuild" /t:Clean %logOptions% /maxcpucount /nodeReuse:false %cfgOption%%*
16-
rd /q /s Roslyn45
1716
rd /q /s Roslyn46
1817
rd /q /s Roslyn472
1918
rd /q /s RoslynLatest

src/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<AppDesignerFolder>Properties</AppDesignerFolder>
1111
<RootNamespace>Microsoft.CodeDom.Providers.DotNetCompilerPlatform</RootNamespace>
1212
<AssemblyName>Microsoft.CodeDom.Providers.DotNetCompilerPlatform</AssemblyName>
13-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
1515
<SignAssembly>true</SignAssembly>
1616
<DelaySign>true</DelaySign>
@@ -22,6 +22,7 @@
2222
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
2323
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
2424
<RestorePackages>true</RestorePackages>
25+
<TargetFrameworkProfile />
2526
</PropertyGroup>
2627
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2728
<DebugSymbols>true</DebugSymbols>

src/Packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.nuproj

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
<ItemGroup>
1111
<NuGetContent Include="$(AssemblyName).dll">
1212
<Source>$(AssemblyPath)</Source>
13-
<Destination>lib\net45</Destination>
13+
<Destination>lib\net462</Destination>
1414
</NuGetContent>
1515
<NuGetContent Include="$(AssemblyName).xml">
1616
<Source>$(OutputPath)</Source>
17-
<Destination>lib\net45</Destination>
17+
<Destination>lib\net462</Destination>
1818
</NuGetContent>
1919
<NuGetContent Include="$(AssemblyName).pdb" Condition="'$(NuGetPackSymbols)' == 'true'">
2020
<Source>$(OutputPath)</Source>
21-
<Destination>lib\net45</Destination>
21+
<Destination>lib\net462</Destination>
2222
</NuGetContent>
2323
<NuGetContentProject Include="$(RepositoryRoot)\src\$(MSBuildProjectName)\$(MSBuildProjectName).csproj" Condition="'$(NuGetPackSymbols)' == 'true'" />
2424
<NuGetContent Include="DotNetCompilerPlatformTasks.dll">
@@ -29,18 +29,6 @@
2929
<Source>$(OutputPath)</Source>
3030
<Destination>tasks</Destination>
3131
</NuGetContent>
32-
<NuGetContent Include="Content\config.install.xdt">
33-
<Destination>content\net45\app.config.install.xdt</Destination>
34-
</NuGetContent>
35-
<NuGetContent Include="Content\config.install.xdt">
36-
<Destination>content\net45\web.config.install.xdt</Destination>
37-
</NuGetContent>
38-
<NuGetContent Include="Content\config.uninstall.xdt">
39-
<Destination>content\net45\app.config.uninstall.xdt</Destination>
40-
</NuGetContent>
41-
<NuGetContent Include="Content\config.uninstall.xdt">
42-
<Destination>content\net45\web.config.uninstall.xdt</Destination>
43-
</NuGetContent>
4432
<NuGetContent Include="Content\config.install.xdt">
4533
<Destination>content\net46\app.config.install.xdt</Destination>
4634
</NuGetContent>
@@ -65,33 +53,18 @@
6553
<NuGetContent Include="Content\config.uninstall.xdt">
6654
<Destination>content\net472\web.config.uninstall.xdt</Destination>
6755
</NuGetContent>
68-
<NuGetContent Include="build\*">
69-
<Destination>build\net45</Destination>
70-
</NuGetContent>
7156
<NuGetContent Include="build\*">
7257
<Destination>build\net472</Destination>
7358
</NuGetContent>
7459
<NuGetContent Include="build\*">
7560
<Destination>build\net46</Destination>
7661
</NuGetContent>
77-
<NuGetContent Include="build\net45\*">
78-
<Destination>build\net45</Destination>
79-
</NuGetContent>
8062
<NuGetContent Include="build\net46\*">
8163
<Destination>build\net46</Destination>
8264
</NuGetContent>
8365
<NuGetContent Include="build\net472\*">
8466
<Destination>build\net472</Destination>
8567
</NuGetContent>
86-
<NuGetContent Include="tools\*.ps1" Condition="'$(SignAssembly)' != 'true'">
87-
<Destination>tools\net45</Destination>
88-
</NuGetContent>
89-
<NuGetContent Include="tools\signed\*.ps1" Condition="'$(SignAssembly)' == 'true'">
90-
<Destination>tools\net45</Destination>
91-
</NuGetContent>
92-
<NuGetContent Include="tools\$(LocalRoslyn45FolderName)\*">
93-
<Destination>tools\$(LocalRoslyn45FolderName)</Destination>
94-
</NuGetContent>
9568
<NuGetContent Include="tools\$(LocalRoslyn46FolderName)\*">
9669
<Destination>tools\$(LocalRoslyn46FolderName)</Destination>
9770
</NuGetContent>

src/Packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/build/net45/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Extensions.targets

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/Packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/tools/install.ps1

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88

99
param($installPath, $toolsPath, $package, $project)
1010

11-
$assemblyVersion = '3.6.0.0'
11+
$assemblyVersion = '3.11.0.0'
1212
$roslynSubFolder = 'roslyn'
1313

1414
if ($project -eq $null) {
1515
$project = Get-Project
1616
}
1717

18-
$libDirectory = Join-Path $installPath 'lib\net45'
18+
$libDirectory = Join-Path $installPath 'lib\net46'
1919
$projectRoot = $project.Properties.Item('FullPath').Value
2020
$projectTargetFramework = $project.Properties.Item('TargetFrameworkMoniker').Value
2121
$binDirectory = Join-Path $projectRoot 'bin'
@@ -32,13 +32,7 @@ $compilerPackageDirectory = Join-Path $packageDirectory $compilerPackageFolderNa
3232
$compilerPackageToolsDirectory = Join-Path $compilerPackageDirectory 'tools\roslyn472'
3333
$csLanguageVersion = '7.3'
3434
$vbLanguageVersion = 'default'
35-
if ($projectTargetFramework -match 'v4\.5')
36-
{
37-
$compilerPackageToolsDirectory = Join-Path $compilerPackageDirectory 'tools\roslyn45'
38-
$csLanguageVersion = '6' # Leave this at 6 for compat
39-
$vbLanguageVersion = '14'
40-
}
41-
elseif (($projectTargetFramework -match 'v4\.6') -or ($projectTargetFramework -match 'v4\.7[^\.]') -or ($projectTargetFramework -match 'v4\.7\.[01]'))
35+
if (($projectTargetFramework -match 'v4\.6') -or ($projectTargetFramework -match 'v4\.7[^\.]') -or ($projectTargetFramework -match 'v4\.7\.[01]'))
4236
{
4337
$compilerPackageToolsDirectory = Join-Path $compilerPackageDirectory 'tools\roslyn46'
4438
$csLanguageVersion = '7.0' # This was 'default' which is 7.0 for this version of ms.net.compilers

src/Packages/Packages.csproj

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory),RoslynCodeProvider.sln))\tools\RoslynCodeProvider.settings.targets" />
44
<PropertyGroup>
55
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
@@ -12,22 +12,24 @@
1212
<SccLocalPath>SAK</SccLocalPath>
1313
<SccAuxPath>SAK</SccAuxPath>
1414
<SccProvider>SAK</SccProvider>
15+
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
16+
<TargetFrameworkProfile />
1517
</PropertyGroup>
1618
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1719
<UseVSHostingProcess>false</UseVSHostingProcess>
20+
<Prefer32Bit>false</Prefer32Bit>
21+
</PropertyGroup>
22+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
23+
<Prefer32Bit>false</Prefer32Bit>
1824
</PropertyGroup>
19-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
2025
<ItemGroup>
2126
<NuGetProject Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.nuproj" />
2227
<None Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.nuspec" />
2328
</ItemGroup>
2429
<ItemGroup>
2530
<None Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.targets" />
26-
<None Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Extensions.targets" />
2731
<None Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Extensions.targets" />
2832
<None Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform\build\net472\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Extensions.targets" />
29-
<None Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform\tools\Roslyn45\Microsoft.CSharp.Core.targets" />
30-
<None Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform\tools\Roslyn45\Microsoft.VisualBasic.Core.targets" />
3133
<None Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform\tools\Roslyn46\Microsoft.CSharp.Core.targets" />
3234
<None Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform\tools\Roslyn46\Microsoft.Managed.Core.targets" />
3335
<None Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform\tools\Roslyn46\Microsoft.VisualBasic.Core.targets" />

tools/RoslynCodeProvider.Extensions.targets

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
<Project DefaultTargets="UnitTest" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<PropertyGroup>
33
<NupkgToolPath>$(RepositoryRoot)src\Packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform\tools\</NupkgToolPath>
4-
<LocalRoslyn45FolderName>Roslyn45</LocalRoslyn45FolderName>
54
<LocalRoslyn46FolderName>Roslyn46</LocalRoslyn46FolderName>
65
<LocalRoslyn472FolderName>Roslyn472</LocalRoslyn472FolderName>
76
</PropertyGroup>
87

98
<UsingTask TaskName="DownloadRoslynBinaries" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
109
<ParameterGroup>
1110
<NupkgToolPath ParameterType="System.String" Required="true" />
12-
<LocalRoslyn45FolderName ParameterType="System.String" Required="true" />
1311
<LocalRoslyn46FolderName ParameterType="System.String" Required="true" />
1412
<LocalRoslyn472FolderName ParameterType="System.String" Required="true" />
15-
<ReferenceRoslyn45NupkgVersion ParameterType="System.String" Required="true" />
1613
<ReferenceRoslyn46NupkgVersion ParameterType="System.String" Required="true" />
1714
<ReferenceRoslyn472NupkgVersion ParameterType="System.String" Required="true" />
1815
</ParameterGroup>
@@ -31,31 +28,9 @@
3128
var roslynNugetBaseUri = "https://api.nuget.org/packages/microsoft.net.compilers.{0}.nupkg";
3229
var roslynPackageName = "microsoft.net.compilers.{0}.nupkg";
3330
34-
var targetFilePath = Path.Combine(Path.GetTempPath(), string.Format(roslynPackageName, ReferenceRoslyn45NupkgVersion));
35-
var targetExtractPath = Path.Combine(Path.GetTempPath(), LocalRoslyn45FolderName);
36-
var packageToolsPath = Path.Combine(NupkgToolPath, LocalRoslyn45FolderName);
37-
if (Directory.Exists(targetExtractPath))
38-
{
39-
Directory.Delete(targetExtractPath, true);
40-
}
41-
if (Directory.Exists(packageToolsPath))
42-
{
43-
Directory.Delete(packageToolsPath, true);
44-
}
45-
46-
wc.DownloadFile(string.Format(roslynNugetBaseUri, ReferenceRoslyn45NupkgVersion), targetFilePath);
47-
Log.LogMessage("Microsoft.Net.Compilers.{0}.nupkg is downloaded", ReferenceRoslyn45NupkgVersion);
48-
49-
ZipFile.ExtractToDirectory(targetFilePath, targetExtractPath);
50-
Directory.CreateDirectory(packageToolsPath);
51-
foreach(var file in Directory.GetFiles(Path.Combine(targetExtractPath, "tools"))){
52-
var fi = new FileInfo(file);
53-
File.Copy(file, Path.Combine(packageToolsPath, fi.Name));
54-
}
55-
56-
targetFilePath = Path.Combine(Path.GetTempPath(), string.Format(roslynPackageName, ReferenceRoslyn46NupkgVersion));
57-
targetExtractPath = Path.Combine(Path.GetTempPath(), LocalRoslyn46FolderName);
58-
packageToolsPath = Path.Combine(NupkgToolPath, LocalRoslyn46FolderName);
31+
var targetFilePath = Path.Combine(Path.GetTempPath(), string.Format(roslynPackageName, ReferenceRoslyn46NupkgVersion));
32+
var targetExtractPath = Path.Combine(Path.GetTempPath(), LocalRoslyn46FolderName);
33+
var packageToolsPath = Path.Combine(NupkgToolPath, LocalRoslyn46FolderName);
5934
if (Directory.Exists(targetExtractPath))
6035
{
6136
Directory.Delete(targetExtractPath, true);

tools/RoslynCodeProvider.settings.targets

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,16 @@
1010
<!-- Configurable properties-->
1111

1212
<PropertyGroup>
13-
<BuildQuality Condition="'$(BuildQuality)' == ''">rtm</BuildQuality>
13+
<BuildQuality Condition="'$(BuildQuality)' == ''">preview</BuildQuality>
1414
<VersionStartYear>2020</VersionStartYear>
1515
<VersionMajor>3</VersionMajor>
16-
<VersionMinor>6</VersionMinor>
16+
<VersionMinor>11</VersionMinor>
1717
<VersionRelease>0</VersionRelease>
1818
</PropertyGroup>
1919

2020
<PropertyGroup Label="NuGet package dependencies">
21-
<MSNetCompilers45NuGetPackageVersion>1.3.2</MSNetCompilers45NuGetPackageVersion>
2221
<MSNetCompilers46NuGetPackageVersion>2.10.0</MSNetCompilers46NuGetPackageVersion>
23-
<MSNetCompilers472NuGetPackageVersion>3.6.0</MSNetCompilers472NuGetPackageVersion>
22+
<MSNetCompilers472NuGetPackageVersion>3.11.0</MSNetCompilers472NuGetPackageVersion>
2423
</PropertyGroup>
2524

2625
<Target Name="SuperClean" AfterTargets="Clean" Condition="'$(MSBuildProjectExtension)' != '.nuproj'">

tools/RoslynCodeProvider.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<!-- We really only need to do this in the Packages project. It's superfluous and causing intermittent
3434
build errors in all the other projects. -->
3535
<Target Name="DownloadRoslynBinariesToToolsFolder" Condition="'$(MSBuildProjectExtension)' == '.nuproj'">
36-
<DownloadRoslynBinaries NupkgToolPath="$(NupkgToolPath)" LocalRoslyn45FolderName="$(LocalRoslyn45FolderName)" LocalRoslyn46FolderName="$(LocalRoslyn46FolderName)" LocalRoslyn472FolderName="$(LocalRoslyn472FolderName)"
37-
ReferenceRoslyn45NupkgVersion="$(MSNetCompilers45NuGetPackageVersion)" ReferenceRoslyn46NupkgVersion="$(MSNetCompilers46NuGetPackageVersion)" ReferenceRoslyn472NupkgVersion="$(MSNetCompilers472NuGetPackageVersion)" />
36+
<DownloadRoslynBinaries NupkgToolPath="$(NupkgToolPath)" LocalRoslyn46FolderName="$(LocalRoslyn46FolderName)" LocalRoslyn472FolderName="$(LocalRoslyn472FolderName)"
37+
ReferenceRoslyn46NupkgVersion="$(MSNetCompilers46NuGetPackageVersion)" ReferenceRoslyn472NupkgVersion="$(MSNetCompilers472NuGetPackageVersion)" />
3838
</Target>
3939
</Project>

0 commit comments

Comments
 (0)