提交 fa5cdbfb 编写于 作者: O Omar Tawfik 提交者: GitHub

Merge pull request #15970 from dotnet/feature/add-csc-vbc-to-path

Add csc and vbc to PATH
......@@ -60,3 +60,6 @@ folder InstallDir:\MSBuild\15.0\Bin\Roslyn
file source=$(OutputPath)\Vsix\CompilerExtension\System.Xml.XmlDocument.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Xml.XPath.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Xml.XPath.XDocument.dll vs.file.ngenArchitecture=all
folder InstallDir:\Common7\Tools\vsdevcmd\ext
file source=$(OutputPath)\Insertion\roslyn.bat
......@@ -14,7 +14,12 @@
<Import Project="$(NuGetPackageRoot)\MicroBuild.Core\$(MicroBuildCoreVersion)\build\MicroBuild.Core.props" />
<Import Project="$(NuGetPackageRoot)\MicroBuild.Core\$(MicroBuildCoreVersion)\build\MicroBuild.Core.targets" />
<ItemGroup>
<RoslynVsixFileToCopy Include="..\..\MSBuildScripts\roslyn.bat" />
</ItemGroup>
<Target Name="BeforeBuild">
<Copy SourceFiles="@(RoslynVsixFileToCopy)" DestinationFolder="$(OutputPath)" OverwriteReadOnlyFiles="true" SkipUnchangedFiles="true" />
<MSBuild Projects="Microsoft.CodeAnalysis.Compilers.swixproj" Targets="Build" />
</Target>
......
set __VSCMD_script_err_count=0
if "%VSCMD_TEST%" NEQ "" goto :test
if "%VSCMD_ARG_CLEAN_ENV%" NEQ "" goto :clean_env
@REM ------------------------------------------------------------------------
:start
set "PATH=%VSINSTALLDIR%MSBuild\15.0\bin\Roslyn;%PATH%"
goto :end
@REM ------------------------------------------------------------------------
:test
setlocal
@REM Test whether csc.exe is now on PATH
where csc.exe > nul 2>&1
if "%ERRORLEVEL%" NEQ "0" (
@echo [ERROR:%~nx0] 'where csc.exe' failed
set /A __VSCMD_script_err_count=__VSCMD_script_err_count+1
)
@REM exports the value of _vscmd_script_err_count from the 'setlocal' region
endlocal & set __VSCMD_script_err_count=%__VSCMD_script_err_count%
goto :end
@REM ------------------------------------------------------------------------
:clean_env
@REM Since this script only adds to PATH, the vsdevcmd.bat core infrastructure
@REM will handle clean-up of PATH.
goto :end
@REM ------------------------------------------------------------------------
:end
@REM return value other than 0 if tests failed.
if "%__VSCMD_script_err_count%" NEQ "0" (
set __VSCMD_script_err_count=
exit /B 1
)
set __VSCMD_script_err_count=
exit /B 0
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册