Skip to content

Commit ae1fa04

Browse files
committed
init checkin
0 parents  commit ae1fa04

43 files changed

Lines changed: 3622 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[Oo]bj/
2+
[Bb]in/
3+
TestResults/
4+
_ReSharper.*/
5+
/packages/
6+
artifacts/
7+
PublishProfiles/
8+
*.user
9+
*.suo
10+
*.cache
11+
*.sln.ide
12+
.vs
13+
.build/
14+
.testPublish/
15+
msbuild.*

.nuget/NuGet.Config

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<solution>
4+
<add key="disableSourceControlIntegration" value="true" />
5+
</solution>
6+
<packageSources>
7+
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
8+
</packageSources>
9+
<packageRestore>
10+
<!-- Disables command-line, automatic, and MSBuild-Integrated restore -->
11+
<add key="enabled" value="True" />
12+
</packageRestore>
13+
</configuration>

.nuget/NuGet.exe

18 KB
Binary file not shown.

.nuget/NuGet.targets

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
5+
6+
<!-- Enable the restore command to run before builds -->
7+
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
8+
9+
<!-- Property that enables building a package from a project -->
10+
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
11+
12+
<!-- Determines if package restore consent is required to restore packages -->
13+
<RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
14+
15+
<!-- Download NuGet.exe if it does not already exist -->
16+
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
17+
</PropertyGroup>
18+
19+
<ItemGroup Condition=" '$(PackageSources)' == '' ">
20+
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
21+
<!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
22+
<!--
23+
<PackageSource Include="https://www.nuget.org/api/v2/" />
24+
<PackageSource Include="https://my-nuget-source/nuget/" />
25+
-->
26+
</ItemGroup>
27+
28+
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
29+
<!-- Windows specific commands -->
30+
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
31+
</PropertyGroup>
32+
33+
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
34+
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
35+
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
36+
</PropertyGroup>
37+
38+
<PropertyGroup>
39+
<PackagesProjectConfig Condition=" '$(OS)' == 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName.Replace(' ', '_')).config</PackagesProjectConfig>
40+
<PackagesProjectConfig Condition=" '$(OS)' != 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName).config</PackagesProjectConfig>
41+
</PropertyGroup>
42+
43+
<PropertyGroup>
44+
<PackagesConfig Condition="Exists('$(MSBuildProjectDirectory)\packages.config')">$(MSBuildProjectDirectory)\packages.config</PackagesConfig>
45+
<PackagesConfig Condition="Exists('$(PackagesProjectConfig)')">$(PackagesProjectConfig)</PackagesConfig>
46+
</PropertyGroup>
47+
48+
<PropertyGroup>
49+
<!-- NuGet command -->
50+
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
51+
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
52+
53+
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
54+
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
55+
56+
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
57+
58+
<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
59+
<NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>
60+
61+
<PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir>
62+
<PaddedSolutionDir Condition=" '$(OS)' != 'Windows_NT' ">"$(SolutionDir)"</PaddedSolutionDir>
63+
64+
<!-- Commands -->
65+
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>
66+
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>
67+
68+
<!-- We need to ensure packages are restored prior to assembly resolve -->
69+
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
70+
RestorePackages;
71+
$(BuildDependsOn);
72+
</BuildDependsOn>
73+
74+
<!-- Make the build depend on restore packages -->
75+
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
76+
$(BuildDependsOn);
77+
BuildPackage;
78+
</BuildDependsOn>
79+
</PropertyGroup>
80+
81+
<Target Name="CheckPrerequisites">
82+
<!-- Raise an error if we're unable to locate nuget.exe -->
83+
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
84+
<!--
85+
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
86+
This effectively acts as a lock that makes sure that the download operation will only happen once and all
87+
parallel builds will have to wait for it to complete.
88+
-->
89+
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
90+
</Target>
91+
92+
<Target Name="_DownloadNuGet">
93+
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
94+
</Target>
95+
96+
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
97+
<Exec Command="$(RestoreCommand)"
98+
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
99+
100+
<Exec Command="$(RestoreCommand)"
101+
LogStandardErrorAsError="true"
102+
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
103+
</Target>
104+
105+
<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
106+
<Exec Command="$(BuildCommand)"
107+
Condition=" '$(OS)' != 'Windows_NT' " />
108+
109+
<Exec Command="$(BuildCommand)"
110+
LogStandardErrorAsError="true"
111+
Condition=" '$(OS)' == 'Windows_NT' " />
112+
</Target>
113+
114+
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
115+
<ParameterGroup>
116+
<OutputFilename ParameterType="System.String" Required="true" />
117+
</ParameterGroup>
118+
<Task>
119+
<Reference Include="System.Core" />
120+
<Using Namespace="System" />
121+
<Using Namespace="System.IO" />
122+
<Using Namespace="System.Net" />
123+
<Using Namespace="Microsoft.Build.Framework" />
124+
<Using Namespace="Microsoft.Build.Utilities" />
125+
<Code Type="Fragment" Language="cs">
126+
<![CDATA[
127+
try {
128+
OutputFilename = Path.GetFullPath(OutputFilename);
129+
130+
Log.LogMessage("Downloading latest version of NuGet.exe...");
131+
WebClient webClient = new WebClient();
132+
webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename);
133+
134+
return true;
135+
}
136+
catch (Exception ex) {
137+
Log.LogErrorFromException(ex);
138+
return false;
139+
}
140+
]]>
141+
</Code>
142+
</Task>
143+
</UsingTask>
144+
</Project>

Build.cmd

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
@ECHO OFF
2+
3+
setlocal
4+
5+
set EnableNuGetPackageRestore=true
6+
7+
set logOptions=/flp:Summary;Verbosity=normal;LogFile=msbuild.log /flp1:warningsonly;logfile=msbuild.wrn /flp2:errorsonly;logfile=msbuild.err
8+
9+
REM Find the most recent 32bit MSBuild.exe on the system. Require v12.0 (installed with VS2013) or later since .NET 4.0
10+
REM is not supported. Always quote the %MSBuild% value when setting the variable and never quote %MSBuild% references.
11+
set MSBuild="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
12+
if not exist %MSBuild% @set MSBuild="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe"
13+
if not exist %MSBuild% (
14+
echo Could not find msbuild.exe. Please run this from a Visual Studio developer prompt
15+
goto BuildFail
16+
)
17+
18+
%MSBuild% "%~dp0\RoslynCodeProvider.msbuild" %logOptions% /v:minimal /maxcpucount /nodeReuse:false %*
19+
if %ERRORLEVEL% neq 0 goto BuildFail
20+
goto BuildSuccess
21+
22+
:BuildFail
23+
echo.
24+
echo *** BUILD FAILED ***
25+
exit /B 999
26+
27+
:BuildSuccess
28+
echo.
29+
echo **** BUILD SUCCESSFUL ***
30+
exit /B 0

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
###Microsoft.CodeDom.Providers.DotNetCompilerPlatform
2+
3+
Replacement CodeDOM providers that use the new .NET Compiler Platform ("Roslyn") compiler as a service APIs. This provides support for new language features in systems using CodeDOM (e.g. ASP.NET runtime compilation) as well as improving the compilation performance of these systems.
4+
5+
Please see the blog [Enabling the .NET Compiler Platform (“Roslyn”) in ASP.NET applications](https://blogs.msdn.microsoft.com/webdev/2014/05/12/enabling-the-net-compiler-platform-roslyn-in-asp-net-applications/)
6+
for an introduction to Microsoft.CodeDom.Providers.DotNetCompilerPlatform.
7+
8+
##Updates
9+
*[Announcing the DotNetCompilerPlatform 1.0.2 release](https://blogs.msdn.microsoft.com/webdev/2016/09/20/announcing-the-dotnetcompilerplatform-1-0-2-release/)

RoslynCodeProvider.msbuild

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Import Project="tools\RoslynCodeProvider.settings.targets"/>
3+
4+
<UsingTask AssemblyFile="..\Build\tools\Microsoft.Web.MsBuildTasks2.dll" TaskName="Microsoft.Web.MsBuildTasks.PoliCheck"/>
5+
6+
<ItemGroup>
7+
<AssemblyProject Include="src\Microsoft.CodeDom.Providers.DotNetCompilerPlatform\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.csproj" />
8+
</ItemGroup>
9+
<ItemGroup>
10+
<AssemblyProject Include="RoslynCodeProviderTest\Microsoft.CodeDom.Providers.DotNetCompilerPlatformTest.csproj" />
11+
</ItemGroup>
12+
13+
<ItemGroup>
14+
<PackageProject Include="src\Packages\Packages.csproj" />
15+
</ItemGroup>
16+
17+
<!-- Composite targets -->
18+
<Target Name="BuildCI" DependsOnTargets="Clean;Build" />
19+
20+
<Target Name="Build" DependsOnTargets="BuildAssemblies;BuildPackages" />
21+
<Target Name="Clean" DependsOnTargets="CleanPackages;CleanAssemblies" />
22+
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />
23+
24+
<!-- Core build-->
25+
26+
<Target Name="BuildAssemblies" DependsOnTargets="RestorePackages">
27+
<MSBuild Targets="Build" Projects="@(AssemblyProject)" />
28+
</Target>
29+
30+
<Target Name="CleanAssemblies">
31+
<MSBuild Targets="Clean" Projects="@(AssemblyProject)" />
32+
</Target>
33+
34+
<Target Name="RebuildAssemblies" DependsOnTargets="Clean;Build" />
35+
36+
<!-- Packages build -->
37+
38+
<Target Name="BuildPackages" DependsOnTargets="RestorePackages">
39+
<MSBuild Targets="" Projects="@(PackageProject)" />
40+
</Target>
41+
42+
<Target Name="CleanPackages">
43+
<MSBuild Targets="Clean" Projects="@(PackageProject)" />
44+
</Target>
45+
46+
<Target Name="RebuildPackages" DependsOnTargets="CleanPackages;BuildPackages" />
47+
48+
<Target Name="RestorePackages">
49+
<Exec Command=".nuget\NuGet.exe restore" />
50+
</Target>
51+
52+
<Import Project="tools\RoslynCodeProvider.targets" />
53+
</Project>

RoslynCodeProvider.sln

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.25420.1
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{566A9F52-15C9-4BD0-AD3A-9CC7D391834E}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{770A45B7-BC65-4FC4-94FF-7F99838F3219}"
9+
EndProject
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.CodeDom.Providers.DotNetCompilerPlatformTest", "RoslynCodeProviderTest\Microsoft.CodeDom.Providers.DotNetCompilerPlatformTest.csproj", "{12B521BD-F065-4F81-BD7A-D6F715B38F12}"
11+
EndProject
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.CodeDom.Providers.DotNetCompilerPlatform", "src\Microsoft.CodeDom.Providers.DotNetCompilerPlatform\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.csproj", "{BE52ED6A-F180-499D-80BB-B0237B50023C}"
13+
EndProject
14+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Packages", "src\Packages\Packages.csproj", "{7EC5863F-7FF1-41C7-A384-8FFF81531E7A}"
15+
ProjectSection(ProjectDependencies) = postProject
16+
{BE52ED6A-F180-499D-80BB-B0237B50023C} = {BE52ED6A-F180-499D-80BB-B0237B50023C}
17+
EndProjectSection
18+
EndProject
19+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{793EB7E3-C526-48B6-9614-7AA972D9BB46}"
20+
ProjectSection(SolutionItems) = preProject
21+
packages\repositories.config = packages\repositories.config
22+
RoslynCodeProvider.msbuild = RoslynCodeProvider.msbuild
23+
tools\RoslynCodeProvider.settings.targets = tools\RoslynCodeProvider.settings.targets
24+
EndProjectSection
25+
EndProject
26+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{6EB4E0F1-33C7-4743-A925-C8D5BC32FB81}"
27+
ProjectSection(SolutionItems) = preProject
28+
.nuget\NuGet.Config = .nuget\NuGet.Config
29+
.nuget\NuGet.exe = .nuget\NuGet.exe
30+
.nuget\NuGet.targets = .nuget\NuGet.targets
31+
EndProjectSection
32+
EndProject
33+
Global
34+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
35+
Debug|Any CPU = Debug|Any CPU
36+
Release|Any CPU = Release|Any CPU
37+
EndGlobalSection
38+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
39+
{12B521BD-F065-4F81-BD7A-D6F715B38F12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
40+
{12B521BD-F065-4F81-BD7A-D6F715B38F12}.Debug|Any CPU.Build.0 = Debug|Any CPU
41+
{12B521BD-F065-4F81-BD7A-D6F715B38F12}.Release|Any CPU.ActiveCfg = Release|Any CPU
42+
{12B521BD-F065-4F81-BD7A-D6F715B38F12}.Release|Any CPU.Build.0 = Release|Any CPU
43+
{BE52ED6A-F180-499D-80BB-B0237B50023C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
44+
{BE52ED6A-F180-499D-80BB-B0237B50023C}.Debug|Any CPU.Build.0 = Debug|Any CPU
45+
{BE52ED6A-F180-499D-80BB-B0237B50023C}.Release|Any CPU.ActiveCfg = Release|Any CPU
46+
{BE52ED6A-F180-499D-80BB-B0237B50023C}.Release|Any CPU.Build.0 = Release|Any CPU
47+
{7EC5863F-7FF1-41C7-A384-8FFF81531E7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
48+
{7EC5863F-7FF1-41C7-A384-8FFF81531E7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
49+
{7EC5863F-7FF1-41C7-A384-8FFF81531E7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
50+
{7EC5863F-7FF1-41C7-A384-8FFF81531E7A}.Release|Any CPU.Build.0 = Release|Any CPU
51+
EndGlobalSection
52+
GlobalSection(SolutionProperties) = preSolution
53+
HideSolutionNode = FALSE
54+
EndGlobalSection
55+
GlobalSection(NestedProjects) = preSolution
56+
{12B521BD-F065-4F81-BD7A-D6F715B38F12} = {770A45B7-BC65-4FC4-94FF-7F99838F3219}
57+
{BE52ED6A-F180-499D-80BB-B0237B50023C} = {566A9F52-15C9-4BD0-AD3A-9CC7D391834E}
58+
{7EC5863F-7FF1-41C7-A384-8FFF81531E7A} = {566A9F52-15C9-4BD0-AD3A-9CC7D391834E}
59+
EndGlobalSection
60+
EndGlobal
160 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)