Merge pull request #4217 from livarcocc/remove_unofficial_csc

Replace Microsoft.Net.Compilers.Targets.NetCore
This commit is contained in:
Livar 2016-09-23 11:14:41 -07:00 committed by GitHub
commit 13d18f198e
10 changed files with 48 additions and 17 deletions

View file

@ -3,7 +3,7 @@
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.CodeAnalysis.CSharp": "1.3.0"
"Microsoft.CodeAnalysis.CSharp": "2.0.0-beta6-60922-08"
},
"frameworks": {
"net46": {}

View file

@ -4,7 +4,7 @@
"preserveCompilationContext": true
},
"dependencies": {
"Microsoft.CodeAnalysis.CSharp": "1.3.0"
"Microsoft.CodeAnalysis.CSharp": "2.0.0-beta6-60922-08"
},
"frameworks": {
"netcoreapp1.0": {

View file

@ -4,7 +4,7 @@
"keyFile": "../../tools/Key.snk"
},
"dependencies": {
"Microsoft.CodeAnalysis.CSharp": "1.3.0",
"Microsoft.CodeAnalysis.CSharp": "2.0.0-beta6-60922-08",
"Microsoft.DotNet.ProjectModel": {
"target": "project"
},

View file

@ -10,7 +10,7 @@
"Microsoft.DotNet.Compiler.Common": {
"target": "project"
},
"Microsoft.CodeAnalysis.CSharp.Workspaces": "1.3.0",
"Microsoft.CodeAnalysis.CSharp.Workspaces": "2.0.0-beta6-60922-08",
"Microsoft.DotNet.PlatformAbstractions": "1.0.1-beta-000933"
},
"frameworks": {

View file

@ -4,8 +4,8 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using Microsoft.DotNet.Cli;
using Microsoft.DotNet.Cli.Utils;
namespace Microsoft.DotNet.Tools.MSBuild
{
@ -32,20 +32,21 @@ namespace Microsoft.DotNet.Tools.MSBuild
return new Dictionary<string, string>
{
{ "MSBuildExtensionsPath", AppContext.BaseDirectory },
{ "DotnetHostPath", GetHostPath() },
{ "CscToolExe", GetRunCscPath() }
};
}
private static string GetHostPath()
{
return new Muxer().MuxerPath;
}
private static string GetMSBuildExePath()
{
return Path.Combine(
AppContext.BaseDirectory,
s_msbuildExeName);
}
private static string GetRunCscPath()
{
var scriptExtension = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".cmd" : ".sh";
return Path.Combine(AppContext.BaseDirectory, $"RunCsc{scriptExtension}");
}
}
}

6
src/redist/RunCsc.cmd Normal file
View file

@ -0,0 +1,6 @@
@echo off
REM Copyright (c) .NET Foundation and contributors. All rights reserved.
REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
%~dp0..\..\dotnet %~dp0csc.exe %*

17
src/redist/RunCsc.sh Executable file
View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
#
# Copyright (c) .NET Foundation and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
#
set -e
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
"$DIR/../../dotnet" "$DIR/csc.exe" "$@"

View file

@ -1,7 +1,13 @@
{
"version": "1.0.0-preview3-*",
"buildOptions": {
"emitEntryPoint": true
"emitEntryPoint": true,
"copyToOutput": {
"include": ["RunCsc.sh", "RunCsc.cmd"]
}
},
"publishOptions": {
"include": ["RunCsc.sh", "RunCsc.cmd"]
},
"dependencies": {
"Microsoft.NETCore.App": {
@ -19,6 +25,7 @@
"Microsoft.Build.Utilities.Core": "0.1.0-preview-00039-160922",
"Microsoft.Build.Targets": "0.1.0-preview-00039-160922",
"Microsoft.Build": "0.1.0-preview-00039-160922",
"Microsoft.CodeAnalysis.Build.Tasks": "2.0.0-beta6-60922-08",
"System.Runtime.Serialization.Xml": "4.1.1",
"NuGet.Build.Tasks": "3.6.0-beta.1.msbuild.9",
"Microsoft.TestPlatform.CLI": "15.0.0-preview-20160915-01"

View file

@ -8,8 +8,8 @@
"type": "platform",
"version": "1.0.1"
},
"Microsoft.CodeAnalysis.CSharp": "1.3.0",
"Microsoft.Net.Compilers.netcore": "1.3.0",
"Microsoft.CodeAnalysis.CSharp": "2.0.0-beta6-60922-08",
"Microsoft.Net.Compilers.netcore": "2.0.0-beta6-60922-08",
"Microsoft.DiaSymReader.Native": "1.4.0-rc2"
},
"frameworks": {

View file

@ -10,11 +10,11 @@
},
"MSBuild": "0.1.0-preview-00039-160922",
"Microsoft.Build.Targets": "0.1.0-preview-00039-160922",
"Microsoft.Net.Compilers.netcore": "1.3.0",
"Microsoft.Net.Compilers.Targets.NetCore": "0.1.5-dev",
"Microsoft.Net.Compilers.netcore": "2.0.0-beta6-60922-08",
"Microsoft.CodeAnalysis.Build.Tasks": "2.0.0-beta6-60922-08",
"Microsoft.Cci": "4.0.0-rc3-24128-00",
"Microsoft.Composition": "1.0.30",
"Microsoft.NuGet.Build.Tasks": "1.0.0-alpha-000002"
"Microsoft.NuGet.Build.Tasks": "1.0.0-alpha-000004"
},
"frameworks": {
"netcoreapp1.0": {