-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
115 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
roslyn/src/NuGet/Microsoft.NETCore.Compilers/build/OpenSesame.NETCore.Compilers.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. --> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<Target Name="ValidateMSBuildToolsVersion" Condition="'$(BuildingProject)' == 'true'"> | ||
<!-- The new editorconfig support requires MSBuild version 16.3. --> | ||
<Error Text="Microsoft.NETCore.Compilers is only supported on MSBuild v16.3 and above" | ||
Condition="'$(MSBuildToolsVersion)' < '16.3'" /> | ||
</Target> | ||
|
||
<!-- Always use the local build task, even if we just shell out to an exe in case there are | ||
new properties in the local build task. --> | ||
<UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.Csc" | ||
AssemblyFile="$(MSBuildThisFileDirectory)..\tools\Microsoft.Build.Tasks.CodeAnalysis.dll" /> | ||
<UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.Vbc" | ||
AssemblyFile="$(MSBuildThisFileDirectory)..\tools\Microsoft.Build.Tasks.CodeAnalysis.dll" /> | ||
<UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.CopyRefAssembly" | ||
AssemblyFile="$(MSBuildThisFileDirectory)..\tools\Microsoft.Build.Tasks.CodeAnalysis.dll" /> | ||
|
||
<PropertyGroup> | ||
<!-- Don't use the compiler server by default in the NuGet package. --> | ||
<UseSharedCompilation Condition="'$(UseSharedCompilation)' == ''">false</UseSharedCompilation> | ||
<CSharpCoreTargetsPath>$(MSBuildThisFileDirectory)..\tools\Microsoft.CSharp.Core.targets</CSharpCoreTargetsPath> | ||
<VisualBasicCoreTargetsPath>$(MSBuildThisFileDirectory)..\tools\Microsoft.VisualBasic.Core.targets</VisualBasicCoreTargetsPath> | ||
</PropertyGroup> | ||
|
||
<!-- Older versions of the CLI didn't set the DOTNET_HOST_PATH variable, which | ||
means we have to use our shell wrappers and hope 'dotnet' is on the path. --> | ||
<PropertyGroup Condition="'$(DOTNET_HOST_PATH)' == ''"> | ||
<CscToolPath>$(MSBuildThisFileDirectory)..\tools\bincore</CscToolPath> | ||
<CscToolExe Condition="'$(OS)' == 'Windows_NT'">RunCsc.cmd</CscToolExe> | ||
<CscToolExe Condition="'$(OS)' != 'Windows_NT'">RunCsc</CscToolExe> | ||
<VbcToolPath>$(MSBuildThisFileDirectory)..\tools\bincore</VbcToolPath> | ||
<VbcToolExe Condition="'$(OS)' == 'Windows_NT'">RunVbc.cmd</VbcToolExe> | ||
<VbcToolExe Condition="'$(OS)' != 'Windows_NT'">RunVbc</VbcToolExe> | ||
</PropertyGroup> | ||
|
||
<!-- If packaged on Windows, the RunCsc and RunVbc scripts may not be marked | ||
executable. If we're not running on Windows, mark them as such, just in case --> | ||
<Target Name="MakeCompilerScriptsExecutable" | ||
Condition="'$(BuildingProject)' == 'true' AND | ||
'$(OS)' != 'Windows_NT' AND | ||
('$(CscToolPath)' != '' OR '$(VbcToolPath)' != '')" | ||
BeforeTargets="CoreCompile"> | ||
<Exec Command="chmod +x "$(CscToolPath)/$(CscToolExe)" "$(VbcToolPath)/$(VbcToolExe)"" /> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...yn/src/NuGet/Microsoft.Net.Compilers.Toolset/build/OpenSesame.Net.Compilers.Toolset.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. --> | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<_RoslynTargetDirectoryName Condition="'$(MSBuildRuntimeType)' == 'Core'">netcoreapp2.1</_RoslynTargetDirectoryName> | ||
<_RoslynTargetDirectoryName Condition="'$(MSBuildRuntimeType)' != 'Core'">net472</_RoslynTargetDirectoryName> | ||
<_RoslynTasksDirectory>$(MSBuildThisFileDirectory)..\tasks\$(_RoslynTargetDirectoryName)\</_RoslynTasksDirectory> | ||
<RoslynTasksAssembly>$(_RoslynTasksDirectory)Microsoft.Build.Tasks.CodeAnalysis.dll</RoslynTasksAssembly> | ||
<UseSharedCompilation Condition="'$(UseSharedCompilation)' == ''">true</UseSharedCompilation> | ||
<CSharpCoreTargetsPath>$(_RoslynTasksDirectory)Microsoft.CSharp.Core.targets</CSharpCoreTargetsPath> | ||
<VisualBasicCoreTargetsPath>$(_RoslynTasksDirectory)Microsoft.VisualBasic.Core.targets</VisualBasicCoreTargetsPath> | ||
</PropertyGroup> | ||
|
||
<UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.Csc" AssemblyFile="$(RoslynTasksAssembly)" /> | ||
<UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.Vbc" AssemblyFile="$(RoslynTasksAssembly)" /> | ||
<UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.CopyRefAssembly" AssemblyFile="$(RoslynTasksAssembly)" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
roslyn/src/NuGet/Microsoft.Net.Compilers/build/OpenSesame.Net.Compilers.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. --> | ||
<Project ToolsVersion="15.0" DefaultTargets="Build" InitialTargets="ValidateMSBuildToolsVersion" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<!-- The UsingTask, UseSharedCompilation, and ToolPath/Exe variables all interact to | ||
choose which compiler path to use and whether or not to use the compiler server. | ||
If UsingTask and UseSharedCompilation are set then the compiler server next to the | ||
task will be used (i.e., the one in this package). | ||
If UseSharedCompilation is false or ToolPath/Exe are set the compiler server will | ||
not be used and the compiler exe at the ToolPath, if set, will be executed, otherwise | ||
the executable in the MSBuild install path will be executed. --> | ||
|
||
<Target Name="ValidateMSBuildToolsVersion" Condition="'$(BuildingProject)' == 'true'"> | ||
<!-- The new editorconfig support requires MSBuild version 16.3. --> | ||
<Error Text="Microsoft.Net.Compilers is only supported on MSBuild v16.3 and above" | ||
Condition="'$(MSBuildToolsVersion)' < '16.3'" /> | ||
</Target> | ||
|
||
<!-- Always use the local build task, even if we just shell out to an exe in case there are | ||
new properties in the local build task. --> | ||
<UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.Csc" | ||
AssemblyFile="$(MSBuildThisFileDirectory)..\tools\Microsoft.Build.Tasks.CodeAnalysis.dll" /> | ||
<UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.Vbc" | ||
AssemblyFile="$(MSBuildThisFileDirectory)..\tools\Microsoft.Build.Tasks.CodeAnalysis.dll" /> | ||
<UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.CopyRefAssembly" | ||
AssemblyFile="$(MSBuildThisFileDirectory)..\tools\Microsoft.Build.Tasks.CodeAnalysis.dll" /> | ||
|
||
<PropertyGroup> | ||
<!-- By default don't use the compiler server in Visual Studio. --> | ||
<UseSharedCompilation Condition="'$(UseSharedCompilation)' == ''">false</UseSharedCompilation> | ||
<CSharpCoreTargetsPath>$(MSBuildThisFileDirectory)..\tools\Microsoft.CSharp.Core.targets</CSharpCoreTargetsPath> | ||
<VisualBasicCoreTargetsPath>$(MSBuildThisFileDirectory)..\tools\Microsoft.VisualBasic.Core.targets</VisualBasicCoreTargetsPath> | ||
</PropertyGroup> | ||
|
||
<!-- If we're not using the compiler server, set ToolPath/Exe to direct to | ||
the exes in this package --> | ||
<PropertyGroup Condition="'$(UseSharedCompilation)' != 'true'"> | ||
<CscToolPath>$(MSBuildThisFileDirectory)..\tools</CscToolPath> | ||
<CscToolExe>csc.exe</CscToolExe> | ||
<VbcToolPath>$(MSBuildThisFileDirectory)..\tools</VbcToolPath> | ||
<VbcToolExe>vbc.exe</VbcToolExe> | ||
</PropertyGroup> | ||
</Project> |