Compare commits

..
5 Commits
Author SHA1 Message Date
Alex Corrado 3f71a4bfc2 Update fsharp.py 2019-11-24 14:06:21 -05:00
Alex Corrado 394ed52275 Update fsharp.py 2019-11-23 21:12:53 -05:00
Alex Corrado 8a2d0cb8a7 Update fsharp.py 2019-11-22 23:25:41 -05:00
Alex Corrado 670e1ea3cb [fsharp] Remove failing patch 2019-11-22 18:35:53 -05:00
Alex Corrado c759092277 [fsharp] Try to build with F# 4.7 2019-11-22 14:58:32 -05:00
310 changed files with 2954 additions and 6354 deletions

No files matched your search

-1
View File
@@ -10,7 +10,6 @@ mkinstalldirs crlf=input
*.sources crlf=input
.gitattributes crlf=input
*akefile* crlf=input
m4/mono-output.m4 crlf=input
# ensure native line endings on checkout
*.c crlf
+51 -5
View File
@@ -2,10 +2,33 @@ ACLOCAL_AMFLAGS = -I m4
AM_CFLAGS = $(WERROR_CFLAGS)
SUBDIRS = @MONO_SUBDIRS@
DIST_SUBDIRS = $(SUBDIRS) m4 netcore netcore/corerun
MONOTOUCH_SUBDIRS = $(libgc_dir) mono
if !ENABLE_NETCORE
# Some tools might not build when cross-compiling
if CROSS_COMPILING
tools_dir =
else
tools_dir = tools
endif
if ENABLE_MSVC
build_with_msvc = msvc
build_without_msvc =
else
build_with_msvc =
build_without_msvc = msvc
endif
if ENABLE_NETCORE
update_submodules =
SUBDIRS = mk llvm mono runtime netcore
else
update_submodules = update_submodules
SUBDIRS = $(build_with_msvc) mk po $(libgc_dir) llvm mono $(ikvm_native_dir) support data runtime scripts man samples $(tools_dir) $(build_without_msvc) $(docs_dir) acceptance-tests
endif
# Keep in sync with SUBDIRS
DIST_SUBDIRS = $(build_with_msvc) m4 mk po $(libgc_dir) llvm mono ikvm-native support data runtime scripts man samples tools $(build_without_msvc) docs acceptance-tests netcore netcore/corerun
all: $(update_submodules)
@@ -93,6 +116,31 @@ mcs-do-compiler-tests:
bootstrap-world: compiler-tests
$(MAKE) install
if INSTALL_MONOTOUCH
monotouch-do-build: config.h
@list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
case "x$$subdir" in \
xmono ) target="monotouch-do-build";; \
* ) target="all";; \
esac; \
echo "Making $$target in $$subdir"; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
done;
(cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-build)
monotouch-do-clean:
@list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
case "x$$subdir" in \
xmono ) target="monotouch-do-clean";; \
* ) target="clean";; \
esac; \
echo "Making $$target in $$subdir"; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
done;
(cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-clean)
endif
update-csproj:
-rm msvc/scripts/order
-rm msvc/scripts/order.xml
@@ -135,5 +183,3 @@ update-solution-files:
update-solution-files-with-tests:
$(MAKE) "GENPROJ_ARGS=2012 true true" update-solution-files
endif
+5 -14
View File
@@ -104,10 +104,12 @@ if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
fi
fi
# Parse parameters
#
# Plug in the extension module
#
has_ext_mod=false
ext_mod_args=''
has_disable_boehm=false
for PARAM; do
if [[ $PARAM =~ "--enable-extension-module" ]] ; then
has_ext_mod=true
@@ -115,14 +117,8 @@ for PARAM; do
ext_mod_args=`echo $PARAM | cut -d= -f2`
fi
fi
if [[ $PARAM =~ "--disable-boehm" ]] ; then
has_disable_boehm=true
fi
done
#
# Plug in the extension module
#
if test x$has_ext_mod = xtrue; then
pushd $top_srcdir../mono-extensions/scripts
sh ./prepare-repo.sh $ext_mod_args || exit 1
@@ -154,12 +150,7 @@ automake $am_opt ||
echo "Running autoconf ..."
autoconf || { echo "**Error**: autoconf failed."; exit 1; }
# Update all submodules recursively to ensure everything is checked out
if test -e $srcdir/scripts/update_submodules.sh; then
(cd $srcdir && scripts/update_submodules.sh)
fi
if test x$has_disable_boehm = xfalse -a -d $srcdir/external/bdwgc; then
if test -d $srcdir/external/bdwgc; then
echo Running external/bdwgc/autogen.sh ...
(cd $srcdir/external/bdwgc ; NOCONFIGURE=1 ./autogen.sh "$@")
echo Done running external/bdwgc/autogen.sh ...
+297 -229
View File
@@ -4,10 +4,10 @@
# This line is parsed by tools besides autoconf, such as msvc/mono.winconfig.targets.
# It should remain in the format they expect.
#
AC_INIT(mono, [6.11.0],
AC_INIT(mono, [6.9.0],
[https://github.com/mono/mono/issues/new])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_SRCDIR([README.md])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_SYSTEM
@@ -63,7 +63,7 @@ MONO_VERSION_BUILD=`echo $VERSION | cut -d . -f 3`
# This line is parsed by tools besides autoconf, such as msvc/mono.winconfig.targets.
# It should remain in the format they expect.
#
MONO_CORLIB_VERSION=97b07b51-46d8-4084-b48e-77aa5c192654
MONO_CORLIB_VERSION=423e7794-9279-49a3-a477-f1cb2432e9f4
#
# Put a quoted #define in config.h.
@@ -358,10 +358,6 @@ case "$host" in
# https://bugzilla.novell.com/show_bug.cgi?id=504411
disable_munmap=yes
;;
powerpc*-*-freebsd*)
# https://bugzilla.novell.com/show_bug.cgi?id=504411
disable_munmap=yes
;;
riscv*)
support_boehm=no
with_gc=sgen
@@ -514,8 +510,8 @@ case "$host" in
dnl We still set this for *FLAGS, however, because we may not
dnl be setting OBJECT_MODE.
LDFLAGS="$LDFLAGS -maix64"
CPPFLAGS="$CPPFLAGS -maix64 -DGC_AIX_THREADS -D_ALL_SOURCE -pthread -D_THREAD_SAFE -D_LARGE_FILES -D_REENTRANT"
libmono_cflags="-pthread -D_THREAD_SAFE -D_REENTRANT"
CPPFLAGS="$CPPFLAGS -maix64 -DGC_AIX_THREADS -D_ALL_SOURCE -D_THREAD_SAFE -D_LARGE_FILES -D_REENTRANT"
libmono_cflags="-D_THREAD_SAFE -D_REENTRANT"
dnl Would you believe GNU nm doesn't know how to process AIX libraries?
dnl Hardcode IBM binutils in case GNU ones end up on our path. Also
dnl specifiy 64-bit mode for tools. (OBJECT_MODE is finicky with cmake.)
@@ -1210,10 +1206,8 @@ AC_ARG_ENABLE(cxx, [ --enable-cxx compile some code as C++])
# mono/corefx/native has a lot of invalid C++98 in its headers
# dotnet/corefx/native looks a lot better, i.e. 44e5bdafb8d989a220c9cf1b94f31a64a6e4f052
# use these C99 print macros in the command line, since glib may not win first inttypes include
#CXXFLAGS_COMMON=' -std=gnu++98 -fno-exceptions -fno-rtti '
CXXFLAGS_COMMON=' -std=gnu++0x -fno-exceptions -fno-rtti '
CXXFLAGS_COMMON="$CXXFLAGS_COMMON -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS"
# "c++0x" instead of C++11, for compat with Centos6/gcc4.4
# -stdlib=libc++ is needed by clang for iOS 6.0 (-miphoneos-version-min=6.0)
@@ -1755,7 +1749,7 @@ AM_CONDITIONAL(ENABLE_STATIC_GCC_LIBS, test "x$enable_static_gcc_libs" = "xyes")
AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsystems.
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug, appdomains, verifier, dllmap,
reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, interpreter, simd, soft_debug, perfcounters, normalization, desktop_loader, shared_perfcounters, remoting,
security, lldb, mdb, assert_messages, cfgdir_config, cleanup, sgen_marksweep_conc, sgen_split_nursery, sgen_gc_bridge, sgen_debug_helpers, sockets, gac, threads.],
security, lldb, mdb, assert_messages, cleanup, sgen_marksweep_conc, sgen_split_nursery, sgen_gc_bridge, sgen_debug_helpers, sockets, gac, threads.],
[
for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
eval "mono_feature_disable_$feature='yes'"
@@ -1931,11 +1925,6 @@ if test "x$mono_feature_disable_assert_messages" = "xyes"; then
AC_MSG_NOTICE([Disabled assertion messages.])
fi
if test "x$mono_feature_disable_cfgdir_config" = "xyes"; then
AC_DEFINE(DISABLE_CFGDIR_CONFIG, 1, [Disable config directories.])
AC_MSG_NOTICE([Disabled config directories.])
fi
if test "x$mono_feature_disable_cleanup" = "xyes"; then
AC_DEFINE(DISABLE_CLEANUP, 1, [Disable runtime cleanup.])
AC_MSG_NOTICE([Disabled runtime cleanup.])
@@ -2042,8 +2031,13 @@ if test "x$support_boehm" = "xyes"; then
LIBGC_CPPFLAGS=
LIBGC_LIBS=
LIBGC_STATIC_LIBS=
libgc_dir=
case "x$libgc" in
xincluded)
if test "x$support_boehm" = "xyes"; then
libgc_dir=external/bdwgc
fi
LIBGC_CPPFLAGS='-I$(top_srcdir)/external/bdwgc/include -I$(top_srcdir)/external/bdwgc/libatomic_ops/src'
LIBGC_LIBS='$(top_builddir)/external/bdwgc/libgc.la'
LIBGC_STATIC_LIBS='$(top_builddir)/external/bdwgc/libgc-static.la'
@@ -2091,6 +2085,7 @@ if test "x$support_boehm" = "xyes"; then
AC_SUBST(LIBGC_CPPFLAGS)
AC_SUBST(LIBGC_LIBS)
AC_SUBST(LIBGC_STATIC_LIBS)
AC_SUBST(libgc_dir)
AC_SUBST(BOEHM_DEFINES)
fi
@@ -2221,10 +2216,14 @@ if test x$host_win32 = xno; then
dnl ******************************************************************
AC_ARG_WITH(ikvm-native, [ --with-ikvm-native=yes,no build the IKVM JNI interface library (defaults to yes)],[with_ikvm_native=$withval],[with_ikvm_native=$ikvm_native])
ikvm_native_dir=
if test x$with_ikvm_native = xyes; then
ikvm_native_dir=ikvm-native
jdk_headers_found="IKVM Native"
fi
AC_SUBST(ikvm_native_dir)
AC_CHECK_HEADERS(execinfo.h)
AC_CHECK_HEADERS(sys/auxv.h sys/resource.h)
@@ -4467,7 +4466,7 @@ case "$host" in
;;
macppc-*-openbsd* | powerpc*-*-linux* | powerpc-*-openbsd* | \
powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* | \
powerpc*-*-freebsd* | powerpc*-*-aix* | powerpc*-*-os400* )
powerpc-*-freebsd* | powerpc*-*-aix* | powerpc*-*-os400* )
if test "x$ac_cv_sizeof_void_p" = "x8"; then
TARGET=POWERPC64;
CPPFLAGS="$CPPFLAGS -D__mono_ppc__ -D__mono_ppc64__"
@@ -5965,6 +5964,13 @@ fi
AM_CONDITIONAL(BTLS_ANDROID, test x$btls_android = xyes)
if test x$DISABLE_MCS_DOCS = xyes; then
docs_dir=""
else
docs_dir=docs
fi
AC_SUBST(docs_dir)
## Maybe should also disable if mcsdir is invalid. Let's punt the issue for now.
AM_CONDITIONAL(BUILD_MCS, [test x$cross_compiling = xno && test x$enable_mcs_build != xno])
AM_CONDITIONAL(BUILD_SUPPORT, [test x$enable_support_build != xno])
@@ -6061,8 +6067,8 @@ fi
AC_SUBST(mono_runtime)
AC_SUBST(mono_runtime_wrapper)
CSC_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/csc.exe
VBCS_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/VBCSCompiler.exe
CSC_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.3.0/csc.exe
VBCS_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.3.0/VBCSCompiler.exe
if test $csc_compiler = mcs; then
CSC=$mcs_topdir/class/lib/build/mcs.exe
@@ -6094,192 +6100,166 @@ AC_SUBST(mono_cfg_dir)
AC_SUBST(CSC)
if test "x$with_core" != "xonly"; then
AC_CONFIG_FILES([po/mcs/Makefile.in])
AC_CONFIG_COMMANDS([runtime/etc/mono/1.0/machine.config],
[ depth=../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/1.0
cd runtime/etc/mono/1.0
rm -f machine.config
$LN_S $reldir/data/net_1_1/machine.config machine.config
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_FILES([acceptance-tests/microbench-perf.sh],[chmod +x acceptance-tests/microbench-perf.sh])
AC_CONFIG_FILES([runtime/mono-wrapper],[chmod +x runtime/mono-wrapper])
AC_CONFIG_FILES([runtime/monodis-wrapper],[chmod +x runtime/monodis-wrapper])
AC_CONFIG_FILES([runtime/bin/mono-hang-watchdog],[chmod +x runtime/bin/mono-hang-watchdog])
AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/machine.config],
[ depth=../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/2.0
cd runtime/etc/mono/2.0
rm -f machine.config
$LN_S $reldir/data/net_2_0/machine.config machine.config
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/1.0/machine.config],
[ depth=../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/1.0
cd runtime/etc/mono/1.0
rm -f machine.config
$LN_S $reldir/data/net_1_1/machine.config machine.config
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/web.config],
[ depth=../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/2.0
cd runtime/etc/mono/2.0
rm -f web.config
$LN_S $reldir/data/net_2_0/web.config web.config
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/machine.config],
[ depth=../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/2.0
cd runtime/etc/mono/2.0
rm -f machine.config
$LN_S $reldir/data/net_2_0/machine.config machine.config
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/browscap.ini],
[ depth=../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/
cd runtime/etc/mono/
rm -f browscap.ini
$LN_S $reldir/data/browscap.ini browscap.ini
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/web.config],
[ depth=../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/2.0
cd runtime/etc/mono/2.0
rm -f web.config
$LN_S $reldir/data/net_2_0/web.config web.config
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/Browsers/Compat.browser],
[ depth=../../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/2.0/Browsers/
cd runtime/etc/mono/2.0/Browsers
rm -f Compat.browser
$LN_S $reldir/data/Browsers/Compat.browser Compat.browser
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/browscap.ini],
[ depth=../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/
cd runtime/etc/mono/
rm -f browscap.ini
$LN_S $reldir/data/browscap.ini browscap.ini
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/Browsers/Compat.browser],
[ depth=../../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/4.0/Browsers/
cd runtime/etc/mono/4.0/Browsers
rm -f Compat.browser
$LN_S $reldir/data/Browsers/Compat.browser Compat.browser
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/Browsers/Compat.browser],
[ depth=../../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/2.0/Browsers/
cd runtime/etc/mono/2.0/Browsers
rm -f Compat.browser
$LN_S $reldir/data/Browsers/Compat.browser Compat.browser
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/4.5/Browsers/Compat.browser],
[ depth=../../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/4.5/Browsers/
cd runtime/etc/mono/4.5/Browsers
rm -f Compat.browser
$LN_S $reldir/data/Browsers/Compat.browser Compat.browser
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/Browsers/Compat.browser],
[ depth=../../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/4.0/Browsers/
cd runtime/etc/mono/4.0/Browsers
rm -f Compat.browser
$LN_S $reldir/data/Browsers/Compat.browser Compat.browser
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/machine.config],
[ depth=../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/4.0
cd runtime/etc/mono/4.0
rm -f machine.config
$LN_S $reldir/data/net_4_0/machine.config machine.config
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/4.5/Browsers/Compat.browser],
[ depth=../../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/4.5/Browsers/
cd runtime/etc/mono/4.5/Browsers
rm -f Compat.browser
$LN_S $reldir/data/Browsers/Compat.browser Compat.browser
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/web.config],
[ depth=../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/4.0
cd runtime/etc/mono/4.0
rm -f web.config
$LN_S $reldir/data/net_4_0/web.config web.config
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/machine.config],
[ depth=../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/4.0
cd runtime/etc/mono/4.0
rm -f machine.config
$LN_S $reldir/data/net_4_0/machine.config machine.config
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/4.5/machine.config],
[ depth=../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/4.5
cd runtime/etc/mono/4.5
rm -f machine.config
$LN_S $reldir/data/net_4_5/machine.config machine.config
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/web.config],
[ depth=../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/4.0
cd runtime/etc/mono/4.0
rm -f web.config
$LN_S $reldir/data/net_4_0/web.config web.config
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/4.5/web.config],
[ depth=../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/4.5
cd runtime/etc/mono/4.5
rm -f web.config
$LN_S $reldir/data/net_4_5/web.config web.config
cd $depth
],[LN_S='$LN_S'])
fi
AC_CONFIG_COMMANDS([runtime/etc/mono/4.5/machine.config],
[ depth=../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/4.5
cd runtime/etc/mono/4.5
rm -f machine.config
$LN_S $reldir/data/net_4_5/machine.config machine.config
cd $depth
],[LN_S='$LN_S'])
# Top level Makefile.am subdirs
if test "x$with_core" = "xonly"; then
MONO_SUBDIRS="llvm mono"
else
if test "x$support_boehm" = "xyes" -a "x$libgc" = "xincluded"; then
mono_subdirs_libgc=external/bdwgc
fi
if test x$enable_support_build != xno; then
mono_subdirs_support=support
fi
if test x$cross_compiling = xno; then
# Some tools might not build when cross-compiling
mono_subdirs_tools=tools
fi
if test x$DISABLE_MCS_DOCS != xyes; then
mono_subdirs_docs=docs
fi
if test x$with_ikvm_native = xyes; then
mono_subdirs_ikvm_native=ikvm-native
fi
MONO_SUBDIRS="po $mono_subdirs_libgc llvm mono $mono_subdirs_ikvm_native $mono_subdirs_support data runtime scripts man samples $mono_subdirs_tools $mono_subdirs_docs msvc acceptance-tests"
fi
AC_SUBST(MONO_SUBDIRS)
AC_CONFIG_COMMANDS([runtime/etc/mono/4.5/web.config],
[ depth=../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/4.5
cd runtime/etc/mono/4.5
rm -f web.config
$LN_S $reldir/data/net_4_5/web.config web.config
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([quiet-libtool], [sed -e 's/echo "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool; sed -e 's/$ECHO "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool])
AC_CONFIG_COMMANDS([nolock-libtool], [sed -e 's/lock_old_archive_extraction=yes/lock_old_archive_extraction=no/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool])
@@ -6719,7 +6699,95 @@ if test "x$with_core" != "xonly"; then
(cd $srcdir && scripts/update_submodules.sh)
fi
AC_MONO_OUTPUT()
AC_OUTPUT([
Makefile
mono-uninstalled.pc
acceptance-tests/Makefile
llvm/Makefile
scripts/mono-find-provides
scripts/mono-find-requires
mk/Makefile
mono/Makefile
mono/btls/Makefile
mono/native/Makefile
mono/utils/Makefile
mono/utils/jemalloc/Makefile
mono/metadata/Makefile
mono/zlib/Makefile
mono/dis/Makefile
mono/cil/Makefile
mono/arch/Makefile
mono/arch/x86/Makefile
mono/arch/amd64/Makefile
mono/arch/ppc/Makefile
mono/arch/sparc/Makefile
mono/arch/s390x/Makefile
mono/arch/arm/Makefile
mono/arch/arm64/Makefile
mono/arch/mips/Makefile
mono/arch/riscv/Makefile
mono/sgen/Makefile
mono/native/platform-type.c
mono/native/platform-type-compat.c
mono/native/platform-type-unified.c
mono/tests/Makefile
mono/tests/assembly-load-reference/Makefile
mono/tests/tests-config
mono/tests/gc-descriptors/Makefile
mono/tests/testing_gac/Makefile
mono/tests/fullaot-mixed/Makefile
mono/tests/llvmonly-mixed/Makefile
mono/unit-tests/Makefile
mono/benchmark/Makefile
mono/mini/Makefile
mono/profiler/Makefile
mono/eglib/Makefile
mono/eglib/eglib-config.h
mono/eglib/test/Makefile
m4/Makefile
ikvm-native/Makefile
scripts/Makefile
man/Makefile
docs/Makefile
data/Makefile
data/net_2_0/Makefile
data/net_4_0/Makefile
data/net_4_5/Makefile
data/net_2_0/Browsers/Makefile
data/net_4_0/Browsers/Makefile
data/net_4_5/Browsers/Makefile
data/mint.pc
data/mono-2.pc
data/monosgen-2.pc
data/mono.pc
data/mono-cairo.pc
data/mono-options.pc
data/mono-lineeditor.pc
data/monodoc.pc
data/dotnet.pc
data/dotnet35.pc
data/wcf.pc
data/cecil.pc
data/system.web.extensions_1.0.pc
data/system.web.extensions.design_1.0.pc
data/system.web.mvc.pc
data/system.web.mvc2.pc
data/system.web.mvc3.pc
data/aspnetwebstack.pc
data/reactive.pc
samples/Makefile
support/Makefile
data/config
tools/Makefile
tools/locale-builder/Makefile
tools/sgen/Makefile
tools/pedump/Makefile
tools/mono-hang-watchdog/Makefile
runtime/Makefile
msvc/Makefile
po/Makefile
netcore/corerun/Makefile
])
if test x$host_win32 = xyes; then
# Get rid of 'cyg' prefixes in library names
@@ -6735,6 +6803,40 @@ if test x$host_darwin = xyes; then
sed -e 's,lock_old_archive_extraction=yes,lock_old_archive_extraction=no,g' < libtool > libtool.new && mv libtool.new libtool && chmod +x libtool
fi
force_enable_compiler_server=no;
AC_MSG_CHECKING([compiler server])
AC_ARG_WITH(compiler-server, [ --with-compiler-server=yes,no,default,force Enables or disables compiler server],[
if test x$withval = xyes; then
enable_compiler_server=yes;
# force will bypass any automatic disables to allow you to test the compiler server
# in scenarios where it is disabled
elif test x$withval = xforce; then
enable_compiler_server=yes;
force_enable_compiler_server=yes;
elif test x$withval = xno; then
enable_compiler_server=no;
elif test x$withval = xdefault; then
enable_compiler_server=yes;
else
AC_MSG_ERROR([You must supply one of "yes", "no", "default" or "force" to the --with-compiler-server option])
fi
],[enable_compiler_server=yes])
AC_MSG_RESULT($enable_compiler_server)
if test x$enable_compiler_server = xyes; then
if test x$force_enable_compiler_server = xyes; then
AC_MSG_WARN([forcing compiler server to stay enabled])
elif test x$host_darwin = xyes || test x$host_win32 = xyes; then
AC_MSG_WARN([compiler server temporarily disabled on darwin and win32])
enable_compiler_server=no;
elif test x$csc_compiler = xmcs; then
AC_MSG_WARN([mcs does not support the compiler server])
enable_compiler_server=no;
fi
fi
(
case $prefix in
NONE) prefix=$ac_default_prefix ;;
@@ -6864,40 +6966,6 @@ fi
echo "MONO_NATIVE_USING_COMPAT=false" >> $srcdir/$mcsdir/build/config.make
fi
force_enable_compiler_server=no;
AC_MSG_CHECKING([compiler server])
AC_ARG_WITH(compiler-server, [ --with-compiler-server=yes,no,default,force Enables or disables compiler server],[
if test x$withval = xyes; then
enable_compiler_server=yes;
# force will bypass any automatic disables to allow you to test the compiler server
# in scenarios where it is disabled
elif test x$withval = xforce; then
enable_compiler_server=yes;
force_enable_compiler_server=yes;
elif test x$withval = xno; then
enable_compiler_server=no;
elif test x$withval = xdefault; then
enable_compiler_server=yes;
else
AC_MSG_ERROR([You must supply one of "yes", "no", "default" or "force" to the --with-compiler-server option])
fi
],[enable_compiler_server=yes])
AC_MSG_RESULT($enable_compiler_server)
if test x$enable_compiler_server = xyes; then
if test x$force_enable_compiler_server = xyes; then
AC_MSG_WARN([forcing compiler server to stay enabled])
elif test x$host_darwin = xyes || test x$host_win32 = xyes; then
AC_MSG_WARN([compiler server temporarily disabled on darwin and win32])
enable_compiler_server=no;
elif test x$csc_compiler = xmcs; then
AC_MSG_WARN([mcs does not support the compiler server])
enable_compiler_server=no;
fi
fi
echo "MONO_NATIVE_PLATFORM_TYPE=$MONO_NATIVE_PLATFORM_TYPE" >> $srcdir/$mcsdir/build/config.make
echo "MONO_NATIVE_PLATFORM=$MONO_NATIVE_PLATFORM" >> $srcdir/$mcsdir/build/config.make
if test x$enable_compiler_server = xyes; then
+4 -4
View File
@@ -15,13 +15,13 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.19608.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.19567.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>71ce4c736b882e6112b395a0e92313be5dcb4328</Sha>
<Sha>928efaa081ffd17b37f6c662fee44775f2d0b90f</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.19608.1">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.19567.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>71ce4c736b882e6112b395a0e92313be5dcb4328</Sha>
<Sha>928efaa081ffd17b37f6c662fee44775f2d0b90f</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
+26 -27
View File
@@ -5,12 +5,11 @@ param(
)
Add-Type -AssemblyName System.IO.Compression.FileSystem
. $PSScriptRoot\pipeline-logging-functions.ps1
function FirstMatchingSymbolDescriptionOrDefault {
param(
[string] $FullPath, # Full path to the module that has to be checked
[string] $TargetServerParameter, # Parameter to pass to `Symbol Tool` indicating the server to lookup for symbols
[string] $TargetServerParam, # Parameter to pass to `Symbol Tool` indicating the server to lookup for symbols
[string] $SymbolsPath
)
@@ -22,36 +21,36 @@ function FirstMatchingSymbolDescriptionOrDefault {
# checking and which type of file was uploaded.
# The file itself is returned
$SymbolPath = $SymbolsPath + '\' + $FileName
$SymbolPath = $SymbolsPath + "\" + $FileName
# PDB file for the module
$PdbPath = $SymbolPath.Replace($Extension, '.pdb')
$PdbPath = $SymbolPath.Replace($Extension, ".pdb")
# PDB file for R2R module (created by crossgen)
$NGenPdb = $SymbolPath.Replace($Extension, '.ni.pdb')
$NGenPdb = $SymbolPath.Replace($Extension, ".ni.pdb")
# DBG file for a .so library
$SODbg = $SymbolPath.Replace($Extension, '.so.dbg')
$SODbg = $SymbolPath.Replace($Extension, ".so.dbg")
# DWARF file for a .dylib
$DylibDwarf = $SymbolPath.Replace($Extension, '.dylib.dwarf')
$DylibDwarf = $SymbolPath.Replace($Extension, ".dylib.dwarf")
.\dotnet-symbol.exe --symbols --modules --windows-pdbs $TargetServerParameter $FullPath -o $SymbolsPath | Out-Null
.\dotnet-symbol.exe --symbols --modules --windows-pdbs $TargetServerParam $FullPath -o $SymbolsPath | Out-Null
if (Test-Path $PdbPath) {
return 'PDB'
return "PDB"
}
elseif (Test-Path $NGenPdb) {
return 'NGen PDB'
return "NGen PDB"
}
elseif (Test-Path $SODbg) {
return 'DBG for SO'
return "DBG for SO"
}
elseif (Test-Path $DylibDwarf) {
return 'Dwarf for Dylib'
return "Dwarf for Dylib"
}
elseif (Test-Path $SymbolPath) {
return 'Module'
return "Module"
}
else {
return $null
@@ -69,7 +68,7 @@ function CountMissingSymbols {
}
# Extensions for which we'll look for symbols
$RelevantExtensions = @('.dll', '.exe', '.so', '.dylib')
$RelevantExtensions = @(".dll", ".exe", ".so", ".dylib")
# How many files are missing symbol information
$MissingSymbols = 0
@@ -77,7 +76,7 @@ function CountMissingSymbols {
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
$PackageGuid = New-Guid
$ExtractPath = Join-Path -Path $ExtractPath -ChildPath $PackageGuid
$SymbolsPath = Join-Path -Path $ExtractPath -ChildPath 'Symbols'
$SymbolsPath = Join-Path -Path $ExtractPath -ChildPath "Symbols"
[System.IO.Compression.ZipFile]::ExtractToDirectory($PackagePath, $ExtractPath)
@@ -87,31 +86,31 @@ function CountMissingSymbols {
Get-ChildItem -Recurse $ExtractPath |
Where-Object {$RelevantExtensions -contains $_.Extension} |
ForEach-Object {
if ($_.FullName -Match '\\ref\\') {
if ($_.FullName -Match "\\ref\\") {
Write-Host "`t Ignoring reference assembly file" $_.FullName
return
}
$SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault -FullPath $_.FullName -TargetServerParameter '--microsoft-symbol-server' -SymbolsPath $SymbolsPath
$SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault -FullPath $_.FullName -TargetServerParameter '--internal-server' -SymbolsPath $SymbolsPath
$SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--microsoft-symbol-server" $SymbolsPath
$SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--internal-server" $SymbolsPath
Write-Host -NoNewLine "`t Checking file" $_.FullName "... "
if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) {
Write-Host "Symbols found on MSDL (${$SymbolsOnMSDL}) and SymWeb (${$SymbolsOnSymWeb})"
Write-Host "Symbols found on MSDL (" $SymbolsOnMSDL ") and SymWeb (" $SymbolsOnSymWeb ")"
}
else {
$MissingSymbols++
if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) {
Write-Host 'No symbols found on MSDL or SymWeb!'
Write-Host "No symbols found on MSDL or SymWeb!"
}
else {
if ($SymbolsOnMSDL -eq $null) {
Write-Host 'No symbols found on MSDL!'
Write-Host "No symbols found on MSDL!"
}
else {
Write-Host 'No symbols found on SymWeb!'
Write-Host "No symbols found on SymWeb!"
}
}
}
@@ -130,26 +129,26 @@ function CheckSymbolsAvailable {
Get-ChildItem "$InputPath\*.nupkg" |
ForEach-Object {
$FileName = $_.Name
# These packages from Arcade-Services include some native libraries that
# our current symbol uploader can't handle. Below is a workaround until
# we get issue: https://github.com/dotnet/arcade/issues/2457 sorted.
if ($FileName -Match 'Microsoft\.DotNet\.Darc\.') {
if ($FileName -Match "Microsoft\.DotNet\.Darc\.") {
Write-Host "Ignoring Arcade-services file: $FileName"
Write-Host
return
}
elseif ($FileName -Match 'Microsoft\.DotNet\.Maestro\.Tasks\.') {
elseif ($FileName -Match "Microsoft\.DotNet\.Maestro\.Tasks\.") {
Write-Host "Ignoring Arcade-services file: $FileName"
Write-Host
return
}
Write-Host "Validating $FileName "
$Status = CountMissingSymbols "$InputPath\$FileName"
if ($Status -ne 0) {
Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Missing symbols for $Status modules in the package $FileName"
Write-Error "Missing symbols for $Status modules in the package $FileName"
}
Write-Host
+4 -18
View File
@@ -16,7 +16,7 @@
# condition: eq(variables['Agent.OS'], 'Windows_NT')
# inputs:
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
# arguments: -ConfigFile ${Env:BUILD_SOURCESDIRECTORY}/NuGet.config -Password $Env:Token
# env:
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
@@ -95,15 +95,10 @@ function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) {
}
if (!(Test-Path $ConfigFile -PathType Leaf)) {
Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
Write-Host "Couldn't find the file NuGet config file: $ConfigFile"
ExitWithExitCode 1
}
if (!$Password) {
Write-PipelineTelemetryError -Category 'Build' -Message 'Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Please supply a valid PAT'
ExitWithExitCode 1
}
# Load NuGet.config
$doc = New-Object System.Xml.XmlDocument
$filename = (Get-Item $ConfigFile).FullName
@@ -126,16 +121,7 @@ if ($creds -eq $null) {
# Insert credential nodes for Maestro's private feeds
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password
$dotnet3Source = $sources.SelectSingleNode("add[@key='dotnet3']")
if ($dotnet3Source -ne $null) {
AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
}
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
if ($dotnet31Source -ne $null) {
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
}
AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
$doc.Save($filename)
+23 -55
View File
@@ -17,7 +17,7 @@
# displayName: Setup Private Feeds Credentials
# inputs:
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
# arguments: $(Build.SourcesDirectory)/NuGet.config $Token
# arguments: $BUILD_SOURCESDIRECTORY/NuGet.config $Token
# condition: ne(variables['Agent.OS'], 'Windows_NT')
# env:
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
@@ -42,12 +42,7 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
. "$scriptroot/tools.sh"
if [ ! -f "$ConfigFile" ]; then
Write-PipelineTelemetryError -Category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
ExitWithExitCode 1
fi
if [ -z "$CredToken" ]; then
Write-PipelineTelemetryError -category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Please supply a valid PAT"
echo "Couldn't find the file NuGet config file: $ConfigFile"
ExitWithExitCode 1
fi
@@ -57,7 +52,7 @@ if [[ `uname -s` == "Darwin" ]]; then
fi
# Ensure there is a <packageSources>...</packageSources> section.
grep -i "<packageSources>" $ConfigFile
grep -i "<packageSources>" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding <packageSources>...</packageSources> section."
ConfigNodeHeader="<configuration>"
@@ -67,7 +62,7 @@ if [ "$?" != "0" ]; then
fi
# Ensure there is a <packageSourceCredentials>...</packageSourceCredentials> section.
grep -i "<packageSourceCredentials>" $ConfigFile
grep -i "<packageSourceCredentials>" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding <packageSourceCredentials>...</packageSourceCredentials> section."
@@ -77,64 +72,37 @@ if [ "$?" != "0" ]; then
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" NuGet.config
fi
PackageSources=()
# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources
grep -i "<add key=\"dotnet3-internal\">" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet3-internal to the packageSources."
# Ensure dotnet3-internal and dotnet3-internal-transport are in the packageSources if the public dotnet3 feeds are present
grep -i "<add key=\"dotnet3\"" $ConfigFile
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2\" />"
if [ "$?" == "0" ]; then
grep -i "<add key=\"dotnet3-internal\">" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet3-internal to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2\" />"
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=('dotnet3-internal')
grep -i "<add key=\"dotnet3-internal-transport\"" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet3-internal-transport to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2\" />"
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=('dotnet3-internal-transport')
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config
fi
# Ensure dotnet3.1-internal and dotnet3.1-internal-transport are in the packageSources if the public dotnet3.1 feeds are present
grep -i "<add key=\"dotnet3.1\"" $ConfigFile
if [ "$?" == "0" ]; then
grep -i "<add key=\"dotnet3.1-internal\"" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet3.1-internal to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet3.1-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2\" />"
# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources
grep -i "<add key=\"dotnet3-internal-transport\">" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet3-internal-transport to the packageSources."
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=('dotnet3.1-internal')
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2\" />"
grep -i "<add key=\"dotnet3.1-internal-transport\">" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet3.1-internal-transport to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet3.1-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2\" />"
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=('dotnet3.1-internal-transport')
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config
fi
# I want things split line by line
PrevIFS=$IFS
IFS=$'\n'
PackageSources+="$IFS"
PackageSources+=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"')
PackageSources=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"')
IFS=$PrevIFS
PackageSources+=('dotnet3-internal')
PackageSources+=('dotnet3-internal-transport')
for FeedName in ${PackageSources[@]} ; do
# Check if there is no existing credential for this FeedName
grep -i "<$FeedName>" $ConfigFile
@@ -144,6 +112,6 @@ for FeedName in ${PackageSources[@]} ; do
PackageSourceCredentialsNodeFooter="</packageSourceCredentials>"
NewCredential="${TB}${TB}<$FeedName>${NL}<add key=\"Username\" value=\"dn-bot\" />${NL}<add key=\"ClearTextPassword\" value=\"$CredToken\" />${NL}</$FeedName>"
sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile
sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" NuGet.config
fi
done
+129 -140
View File
@@ -6,15 +6,140 @@ param(
[Parameter(Mandatory=$true)][string] $GHCommit # GitHub commit SHA used to build the packages
)
# Cache/HashMap (File -> Exist flag) used to consult whether a file exist
# in the repository at a specific commit point. This is populated by inserting
# all files present in the repo at a specific commit point.
$global:RepoFiles = @{}
$ValidatePackage = {
param(
[string] $PackagePath # Full path to a Symbols.NuGet package
)
# Ensure input file exist
if (!(Test-Path $PackagePath)) {
throw "Input file does not exist: $PackagePath"
}
# Extensions for which we'll look for SourceLink information
# For now we'll only care about Portable & Embedded PDBs
$RelevantExtensions = @(".dll", ".exe", ".pdb")
Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... "
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
$ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
$FailedFiles = 0
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Directory]::CreateDirectory($ExtractPath);
$zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
$zip.Entries |
Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
ForEach-Object {
$FileName = $_.FullName
$Extension = [System.IO.Path]::GetExtension($_.Name)
$FakeName = -Join((New-Guid), $Extension)
$TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName
# We ignore resource DLLs
if ($FileName.EndsWith(".resources.dll")) {
return
}
[System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
$ValidateFile = {
param(
[string] $FullPath, # Full path to the module that has to be checked
[string] $RealPath,
[ref] $FailedFiles
)
# Makes easier to reference `sourcelink cli`
Push-Location $using:SourceLinkToolPath
$SourceLinkInfos = .\sourcelink.exe print-urls $FullPath | Out-String
if ($LASTEXITCODE -eq 0 -and -not ([string]::IsNullOrEmpty($SourceLinkInfos))) {
$NumFailedLinks = 0
# We only care about Http addresses
$Matches = (Select-String '(http[s]?)(:\/\/)([^\s,]+)' -Input $SourceLinkInfos -AllMatches).Matches
if ($Matches.Count -ne 0) {
$Matches.Value |
ForEach-Object {
$Link = $_
$CommitUrl = -Join("https://raw.githubusercontent.com/", $using:GHRepoName, "/", $using:GHCommit, "/")
$FilePath = $Link.Replace($CommitUrl, "")
$Status = 200
$Cache = $using:RepoFiles
if ( !($Cache.ContainsKey($FilePath)) ) {
try {
$Uri = $Link -as [System.URI]
# Only GitHub links are valid
if ($Uri.AbsoluteURI -ne $null -and $Uri.Host -match "github") {
$Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
}
else {
$Status = 0
}
}
catch {
$Status = 0
}
}
if ($Status -ne 200) {
if ($NumFailedLinks -eq 0) {
if ($FailedFiles.Value -eq 0) {
Write-Host
}
Write-Host "`tFile $RealPath has broken links:"
}
Write-Host "`t`tFailed to retrieve $Link"
$NumFailedLinks++
}
}
}
if ($NumFailedLinks -ne 0) {
$FailedFiles.value++
$global:LASTEXITCODE = 1
}
}
Pop-Location
}
&$ValidateFile $TargetFile $FileName ([ref]$FailedFiles)
}
$zip.Dispose()
if ($FailedFiles -eq 0) {
Write-Host "Passed."
}
}
function ValidateSourceLinkLinks {
if (!($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) {
Write-PipelineTelemetryError -Category "Build" -Message "GHRepoName should be in the format <org>/<repo>"
Write-Host "GHRepoName should be in the format <org>/<repo>"
$global:LASTEXITCODE = 1
return
}
if (!($GHCommit -Match "^[0-9a-fA-F]{40}$")) {
Write-PipelineTelemetryError -Category "Build" -Message "GHCommit should be a 40 chars hexadecimal string"
Write-Host "GHCommit should be a 40 chars hexadecimal string"
$global:LASTEXITCODE = 1
return
}
@@ -35,7 +160,7 @@ function ValidateSourceLinkLinks {
}
}
catch {
Write-PipelineTelemetryError -Category "Build" -Message "Problems downloading the list of files from the repo. Url used: $RepoTreeURL"
Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL"
$global:LASTEXITCODE = 1
return
}
@@ -56,140 +181,4 @@ function ValidateSourceLinkLinks {
}
}
try {
. $PSScriptRoot\pipeline-logging-functions.ps1
# Cache/HashMap (File -> Exist flag) used to consult whether a file exist
# in the repository at a specific commit point. This is populated by inserting
# all files present in the repo at a specific commit point.
$global:RepoFiles = @{}
$ValidatePackage = {
param(
[string] $PackagePath # Full path to a Symbols.NuGet package
)
# Ensure input file exist
if (!(Test-Path $PackagePath)) {
throw "Input file does not exist: $PackagePath"
}
# Extensions for which we'll look for SourceLink information
# For now we'll only care about Portable & Embedded PDBs
$RelevantExtensions = @(".dll", ".exe", ".pdb")
Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... "
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
$ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
$FailedFiles = 0
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Directory]::CreateDirectory($ExtractPath);
$zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
$zip.Entries |
Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
ForEach-Object {
$FileName = $_.FullName
$Extension = [System.IO.Path]::GetExtension($_.Name)
$FakeName = -Join((New-Guid), $Extension)
$TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName
# We ignore resource DLLs
if ($FileName.EndsWith(".resources.dll")) {
return
}
[System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
$ValidateFile = {
param(
[string] $FullPath, # Full path to the module that has to be checked
[string] $RealPath,
[ref] $FailedFiles
)
# Makes easier to reference `sourcelink cli`
Push-Location $using:SourceLinkToolPath
$SourceLinkInfos = .\sourcelink.exe print-urls $FullPath | Out-String
if ($LASTEXITCODE -eq 0 -and -not ([string]::IsNullOrEmpty($SourceLinkInfos))) {
$NumFailedLinks = 0
# We only care about Http addresses
$Matches = (Select-String '(http[s]?)(:\/\/)([^\s,]+)' -Input $SourceLinkInfos -AllMatches).Matches
if ($Matches.Count -ne 0) {
$Matches.Value |
ForEach-Object {
$Link = $_
$CommitUrl = -Join("https://raw.githubusercontent.com/", $using:GHRepoName, "/", $using:GHCommit, "/")
$FilePath = $Link.Replace($CommitUrl, "")
$Status = 200
$Cache = $using:RepoFiles
if ( !($Cache.ContainsKey($FilePath)) ) {
try {
$Uri = $Link -as [System.URI]
# Only GitHub links are valid
if ($Uri.AbsoluteURI -ne $null -and $Uri.Host -match "github") {
$Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
}
else {
$Status = 0
}
}
catch {
$Status = 0
}
}
if ($Status -ne 200) {
if ($NumFailedLinks -eq 0) {
if ($FailedFiles.Value -eq 0) {
Write-Host
}
Write-Host "`tFile $RealPath has broken links:"
}
Write-Host "`t`tFailed to retrieve $Link"
$NumFailedLinks++
}
}
}
if ($NumFailedLinks -ne 0) {
$FailedFiles.value++
$global:LASTEXITCODE = 1
}
}
Pop-Location
}
&$ValidateFile $TargetFile $FileName ([ref]$FailedFiles)
}
$zip.Dispose()
if ($FailedFiles -eq 0) {
Write-Host "Passed."
}
}
Measure-Command { ValidateSourceLinkLinks }
}
catch {
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'SourceLink' -Message $_
ExitWithExitCode 1
}
Measure-Command { ValidateSourceLinkLinks }
+48 -48
View File
@@ -26,50 +26,50 @@ Param(
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
)
function Print-Usage() {
Write-Host "Common settings:"
Write-Host " -configuration <value> Build configuration: 'Debug' or 'Release' (short: -c)"
Write-Host " -platform <value> Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild"
Write-Host " -verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
Write-Host " -binaryLog Output binary log (short: -bl)"
Write-Host " -help Print help and exit"
Write-Host ""
Write-Host "Actions:"
Write-Host " -restore Restore dependencies (short: -r)"
Write-Host " -build Build solution (short: -b)"
Write-Host " -rebuild Rebuild solution"
Write-Host " -deploy Deploy built VSIXes"
Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)"
Write-Host " -test Run all unit tests in the solution (short: -t)"
Write-Host " -integrationTest Run all integration tests in the solution"
Write-Host " -performanceTest Run all performance tests in the solution"
Write-Host " -pack Package build outputs into NuGet packages and Willow components"
Write-Host " -sign Sign build outputs"
Write-Host " -publish Publish artifacts (e.g. symbols)"
Write-Host " -clean Clean the solution"
Write-Host ""
Write-Host "Advanced settings:"
Write-Host " -projects <value> Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
Write-Host " -ci Set when running on CI server"
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
Write-Host " -warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
Write-Host ""
Write-Host "Command line arguments not listed above are passed thru to msbuild."
Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
}
. $PSScriptRoot\tools.ps1
function Print-Usage() {
Write-Host "Common settings:"
Write-Host " -configuration <value> Build configuration: 'Debug' or 'Release' (short: -c)"
Write-Host " -platform <value> Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild"
Write-Host " -verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
Write-Host " -binaryLog Output binary log (short: -bl)"
Write-Host " -help Print help and exit"
Write-Host ""
Write-Host "Actions:"
Write-Host " -restore Restore dependencies (short: -r)"
Write-Host " -build Build solution (short: -b)"
Write-Host " -rebuild Rebuild solution"
Write-Host " -deploy Deploy built VSIXes"
Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)"
Write-Host " -test Run all unit tests in the solution (short: -t)"
Write-Host " -integrationTest Run all integration tests in the solution"
Write-Host " -performanceTest Run all performance tests in the solution"
Write-Host " -pack Package build outputs into NuGet packages and Willow components"
Write-Host " -sign Sign build outputs"
Write-Host " -publish Publish artifacts (e.g. symbols)"
Write-Host " -clean Clean the solution"
Write-Host ""
Write-Host "Advanced settings:"
Write-Host " -projects <value> Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
Write-Host " -ci Set when running on CI server"
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
Write-Host " -warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
Write-Host ""
Write-Host "Command line arguments not listed above are passed thru to msbuild."
Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
}
function InitializeCustomToolset {
if (-not $restore) {
return
}
$script = Join-Path $EngRoot 'restore-toolset.ps1'
$script = Join-Path $EngRoot "restore-toolset.ps1"
if (Test-Path $script) {
. $script
@@ -80,8 +80,8 @@ function Build {
$toolsetBuildProj = InitializeToolset
InitializeCustomToolset
$bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'Build.binlog') } else { '' }
$platformArg = if ($platform) { "/p:Platform=$platform" } else { '' }
$bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "Build.binlog") } else { "" }
$platformArg = if ($platform) { "/p:Platform=$platform" } else { "" }
if ($projects) {
# Re-assign properties to a new variable because PowerShell doesn't let us append properties directly for unclear reasons.
@@ -114,16 +114,16 @@ function Build {
@properties
}
try {
if ($clean) {
if (Test-Path $ArtifactsDir) {
Remove-Item -Recurse -Force $ArtifactsDir
Write-Host 'Artifacts directory deleted.'
}
exit 0
if ($clean) {
if(Test-Path $ArtifactsDir) {
Remove-Item -Recurse -Force $ArtifactsDir
Write-Host "Artifacts directory deleted."
}
exit 0
}
if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) {
try {
if ($help -or (($null -ne $properties) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
Print-Usage
exit 0
}
@@ -141,7 +141,7 @@ try {
}
catch {
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
Write-PipelineTelemetryError -Category "InitializeToolset" -Message $_
ExitWithExitCode 1
}
+1 -1
View File
@@ -193,7 +193,7 @@ fi
if [[ "$__LinuxCodeName" == "alpine" ]]; then
__ApkToolsVersion=2.9.1
__AlpineVersion=3.9
__AlpineVersion=3.7
__ApkToolsDir=$(mktemp -d)
wget https://github.com/alpinelinux/apk-tools/releases/download/v$__ApkToolsVersion/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -P $__ApkToolsDir
tar -xf $__ApkToolsDir/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -C $__ApkToolsDir
+6 -13
View File
@@ -1,14 +1,14 @@
param (
$darcVersion = $null,
$versionEndpoint = 'https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16',
$verbosity = 'minimal',
$versionEndpoint = "https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16",
$verbosity = "m",
$toolpath = $null
)
. $PSScriptRoot\tools.ps1
function InstallDarcCli ($darcVersion) {
$darcCliPackageName = 'microsoft.dotnet.darc'
$darcCliPackageName = "microsoft.dotnet.darc"
$dotnetRoot = InitializeDotNetCli -install:$true
$dotnet = "$dotnetRoot\dotnet.exe"
@@ -27,19 +27,12 @@ function InstallDarcCli ($darcVersion) {
$arcadeServicesSource = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
Write-Host "Installing Darc CLI version $darcVersion..."
Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.'
Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
if (-not $toolpath) {
& "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g
}else {
& "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath"
& "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath"
}
}
try {
InstallDarcCli $darcVersion
}
catch {
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'Darc' -Message $_
ExitWithExitCode 1
}
InstallDarcCli $darcVersion
+2 -2
View File
@@ -2,8 +2,8 @@
source="${BASH_SOURCE[0]}"
darcVersion=''
versionEndpoint='https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16'
verbosity='minimal'
versionEndpoint="https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16"
verbosity=m
while [[ $# > 0 ]]; do
opt="$(echo "$1" | awk '{print tolower($0)}')"
+13 -12
View File
@@ -1,27 +1,28 @@
[CmdletBinding(PositionalBinding=$false)]
Param(
[string] $verbosity = 'minimal',
[string] $architecture = '',
[string] $version = 'Latest',
[string] $runtime = 'dotnet',
[string] $RuntimeSourceFeed = '',
[string] $RuntimeSourceFeedKey = ''
[string] $verbosity = "minimal",
[string] $architecture = "",
[string] $version = "Latest",
[string] $runtime = "dotnet",
[string] $RuntimeSourceFeed = "",
[string] $RuntimeSourceFeedKey = ""
)
. $PSScriptRoot\tools.ps1
$dotnetRoot = Join-Path $RepoRoot '.dotnet'
$dotnetRoot = Join-Path $RepoRoot ".dotnet"
$installdir = $dotnetRoot
try {
if ($architecture -and $architecture.Trim() -eq 'x86') {
$installdir = Join-Path $installdir 'x86'
if ($architecture -and $architecture.Trim() -eq "x86") {
$installdir = Join-Path $installdir "x86"
}
InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey
}
InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey
}
catch {
Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
ExitWithExitCode 1
}
+3 -4
View File
@@ -11,8 +11,6 @@ while [[ -h "$source" ]]; do
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
. "$scriptroot/tools.sh"
version='Latest'
architecture=''
runtime='dotnet'
@@ -42,7 +40,7 @@ while [[ $# > 0 ]]; do
runtimeSourceFeedKey="$1"
;;
*)
Write-PipelineTelemetryError -Category 'Build' -Message "Invalid argument: $1"
echo "Invalid argument: $1"
exit 1
;;
esac
@@ -75,6 +73,7 @@ case $cpuname in
;;
esac
. "$scriptroot/tools.sh"
dotnetRoot="$repo_root/.dotnet"
if [[ $architecture != "" ]] && [[ $architecture != $buildarch ]]; then
dotnetRoot="$dotnetRoot/$architecture"
@@ -82,7 +81,7 @@ fi
InstallDotNet $dotnetRoot $version "$architecture" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || {
local exit_code=$?
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
echo "dotnet-install.sh failed (exit code '$exit_code')." >&2
ExitWithExitCode $exit_code
}
+2 -4
View File
@@ -2,7 +2,5 @@ param(
[string] $token
)
. $PSScriptRoot\pipeline-logging-functions.ps1
Write-PipelineSetVariable -Name 'VSS_NUGET_ACCESSTOKEN' -Value $token
Write-PipelineSetVariable -Name 'VSS_NUGET_URI_PREFIXES' -Value 'https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/'
Write-Host "##vso[task.setvariable variable=VSS_NUGET_ACCESSTOKEN]$token"
Write-Host "##vso[task.setvariable variable=VSS_NUGET_URI_PREFIXES]https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/"
+25 -24
View File
@@ -9,33 +9,33 @@ Param(
# toolset dependencies see https://github.com/dotnet/arcade/blob/master/Documentation/Darc.md#toolset-vs-product-dependencies
)
$ErrorActionPreference = "Stop"
. $PSScriptRoot\tools.ps1
Import-Module -Name (Join-Path $PSScriptRoot "native\CommonLibrary.psm1")
function CheckExitCode ([string]$stage)
{
$exitCode = $LASTEXITCODE
if ($exitCode -ne 0) {
Write-PipelineTelemetryError -Category 'Arcade' -Message "Something failed in stage: '$stage'. Check for errors above. Exiting now..."
Write-Host "Something failed in stage: '$stage'. Check for errors above. Exiting now..."
ExitWithExitCode $exitCode
}
}
try {
$ErrorActionPreference = 'Stop'
. $PSScriptRoot\tools.ps1
Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1')
Push-Location $PSScriptRoot
Write-Host 'Installing darc...'
Write-Host "Installing darc..."
. .\darc-init.ps1 -darcVersion $darcVersion
CheckExitCode 'Running darc-init'
CheckExitCode "Running darc-init"
$engCommonBaseDir = Join-Path $PSScriptRoot 'native\'
$engCommonBaseDir = Join-Path $PSScriptRoot "native\"
$graphvizInstallDir = CommonLibrary\Get-NativeInstallDirectory
$nativeToolBaseUri = 'https://netcorenativeassets.blob.core.windows.net/resource-packages/external'
$installBin = Join-Path $graphvizInstallDir 'bin'
$nativeToolBaseUri = "https://netcorenativeassets.blob.core.windows.net/resource-packages/external"
$installBin = Join-Path $graphvizInstallDir "bin"
Write-Host 'Installing dot...'
Write-Host "Installing dot..."
.\native\install-tool.ps1 -ToolName graphviz -InstallPath $installBin -BaseUri $nativeToolBaseUri -CommonLibraryDirectory $engCommonBaseDir -Version $graphvizVersion -Verbose
$darcExe = "$env:USERPROFILE\.dotnet\tools"
@@ -51,36 +51,37 @@ try {
$graphVizImageFilePath = "$outputFolder\graph.png"
$normalGraphFilePath = "$outputFolder\graph-full.txt"
$flatGraphFilePath = "$outputFolder\graph-flat.txt"
$baseOptions = @( '--github-pat', "$gitHubPat", '--azdev-pat', "$azdoPat", '--password', "$barToken" )
$baseOptions = @( "--github-pat", "$gitHubPat", "--azdev-pat", "$azdoPat", "--password", "$barToken" )
if ($includeToolset) {
Write-Host 'Toolsets will be included in the graph...'
$baseOptions += @( '--include-toolset' )
Write-Host "Toolsets will be included in the graph..."
$baseOptions += @( "--include-toolset" )
}
Write-Host 'Generating standard dependency graph...'
Write-Host "Generating standard dependency graph..."
& "$darcExe" get-dependency-graph @baseOptions --output-file $normalGraphFilePath
CheckExitCode 'Generating normal dependency graph'
CheckExitCode "Generating normal dependency graph"
Write-Host 'Generating flat dependency graph and graphviz file...'
Write-Host "Generating flat dependency graph and graphviz file..."
& "$darcExe" get-dependency-graph @baseOptions --flat --coherency --graphviz $graphVizFilePath --output-file $flatGraphFilePath
CheckExitCode 'Generating flat and graphviz dependency graph'
CheckExitCode "Generating flat and graphviz dependency graph"
Write-Host "Generating graph image $graphVizFilePath"
$dotFilePath = Join-Path $installBin "graphviz\$graphvizVersion\release\bin\dot.exe"
& "$dotFilePath" -Tpng -o"$graphVizImageFilePath" "$graphVizFilePath"
CheckExitCode 'Generating graphviz image'
CheckExitCode "Generating graphviz image"
Write-Host "'$graphVizFilePath', '$flatGraphFilePath', '$normalGraphFilePath' and '$graphVizImageFilePath' created!"
}
catch {
if (!$includeToolset) {
Write-Host 'This might be a toolset repo which includes only toolset dependencies. ' -NoNewline -ForegroundColor Yellow
Write-Host 'Since -includeToolset is not set there is no graph to create. Include -includeToolset and try again...' -ForegroundColor Yellow
Write-Host "This might be a toolset repo which includes only toolset dependencies. " -NoNewline -ForegroundColor Yellow
Write-Host "Since -includeToolset is not set there is no graph to create. Include -includeToolset and try again..." -ForegroundColor Yellow
}
Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'Arcade' -Message $_
ExitWithExitCode 1
} finally {
Pop-Location
Pop-Location
}
+16 -20
View File
@@ -35,7 +35,7 @@ File path to global.json file
#>
[CmdletBinding(PositionalBinding=$false)]
Param (
[string] $BaseUri = 'https://netcorenativeassets.blob.core.windows.net/resource-packages/external',
[string] $BaseUri = "https://netcorenativeassets.blob.core.windows.net/resource-packages/external",
[string] $InstallDirectory,
[switch] $Clean = $False,
[switch] $Force = $False,
@@ -45,27 +45,26 @@ Param (
)
if (!$GlobalJsonFile) {
$GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName 'global.json'
$GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName "global.json"
}
Set-StrictMode -version 2.0
$ErrorActionPreference='Stop'
$ErrorActionPreference="Stop"
. $PSScriptRoot\pipeline-logging-functions.ps1
Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1')
Import-Module -Name (Join-Path $PSScriptRoot "native\CommonLibrary.psm1")
try {
# Define verbose switch if undefined
$Verbose = $VerbosePreference -Eq 'Continue'
$Verbose = $VerbosePreference -Eq "Continue"
$EngCommonBaseDir = Join-Path $PSScriptRoot 'native\'
$EngCommonBaseDir = Join-Path $PSScriptRoot "native\"
$NativeBaseDir = $InstallDirectory
if (!$NativeBaseDir) {
$NativeBaseDir = CommonLibrary\Get-NativeInstallDirectory
}
$Env:CommonLibrary_NativeInstallDir = $NativeBaseDir
$InstallBin = Join-Path $NativeBaseDir 'bin'
$InstallerPath = Join-Path $EngCommonBaseDir 'install-tool.ps1'
$InstallBin = Join-Path $NativeBaseDir "bin"
$InstallerPath = Join-Path $EngCommonBaseDir "install-tool.ps1"
# Process tools list
Write-Host "Processing $GlobalJsonFile"
@@ -75,7 +74,7 @@ try {
}
$NativeTools = Get-Content($GlobalJsonFile) -Raw |
ConvertFrom-Json |
Select-Object -Expand 'native-tools' -ErrorAction SilentlyContinue
Select-Object -Expand "native-tools" -ErrorAction SilentlyContinue
if ($NativeTools) {
$NativeTools.PSObject.Properties | ForEach-Object {
$ToolName = $_.Name
@@ -113,21 +112,18 @@ try {
}
$toolInstallationFailure = $true
} else {
# We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
Write-Host $errMsg
Write-Error $errMsg
exit 1
}
}
}
if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) {
# We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
Write-Host 'Native tools bootstrap failed'
exit 1
}
}
else {
Write-Host 'No native tools defined in global.json'
Write-Host "No native tools defined in global.json"
exit 0
}
@@ -135,18 +131,18 @@ try {
exit 0
}
if (Test-Path $InstallBin) {
Write-Host 'Native tools are available from ' (Convert-Path -Path $InstallBin)
Write-Host "Native tools are available from" (Convert-Path -Path $InstallBin)
Write-Host "##vso[task.prependpath]$(Convert-Path -Path $InstallBin)"
return $InstallBin
}
else {
Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message 'Native tools install directory does not exist, installation failed'
Write-Error "Native tools install directory does not exist, installation failed"
exit 1
}
exit 0
}
catch {
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message $_
ExitWithExitCode 1
Write-Host $_
Write-Host $_.Exception
exit 1
}
+2 -3
View File
@@ -12,7 +12,6 @@ retry_wait_time_seconds=30
global_json_file="$(dirname "$(dirname "${scriptroot}")")/global.json"
declare -A native_assets
. $scriptroot/pipeline-logging-functions.sh
. $scriptroot/native/common-library.sh
while (($# > 0)); do
@@ -121,7 +120,7 @@ else
$installer_command
if [[ $? != 0 ]]; then
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Execution Failed"
echo "Execution Failed" >&2
exit 1
fi
done
@@ -135,7 +134,7 @@ if [[ -d $install_bin ]]; then
echo "Native tools are available from $install_bin"
echo "##vso[task.prependpath]$install_bin"
else
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Native tools install directory does not exist, installation failed"
echo "Native tools install directory does not exist, installation failed" >&2
exit 1
fi
+15 -13
View File
@@ -6,8 +6,9 @@ param(
[switch] $IsFeedPrivate
)
$ErrorActionPreference = 'Stop'
$ErrorActionPreference = "Stop"
Set-StrictMode -Version 2.0
. $PSScriptRoot\tools.ps1
# Sets VSS_NUGET_EXTERNAL_FEED_ENDPOINTS based on the "darc-int-*" feeds defined in NuGet.config. This is needed
@@ -20,7 +21,7 @@ function SetupCredProvider {
)
# Install the Cred Provider NuGet plugin
Write-Host 'Setting up Cred Provider NuGet plugin in the agent...'
Write-Host "Setting up Cred Provider NuGet plugin in the agent..."
Write-Host "Getting 'installcredprovider.ps1' from 'https://github.com/microsoft/artifacts-credprovider'..."
$url = 'https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.ps1'
@@ -28,18 +29,18 @@ function SetupCredProvider {
Write-Host "Writing the contents of 'installcredprovider.ps1' locally..."
Invoke-WebRequest $url -OutFile installcredprovider.ps1
Write-Host 'Installing plugin...'
Write-Host "Installing plugin..."
.\installcredprovider.ps1 -Force
Write-Host "Deleting local copy of 'installcredprovider.ps1'..."
Remove-Item .\installcredprovider.ps1
if (-Not("$env:USERPROFILE\.nuget\plugins\netcore")) {
Write-PipelineTelemetryError -Category 'Arcade' -Message 'CredProvider plugin was not installed correctly!'
Write-Host "CredProvider plugin was not installed correctly!"
ExitWithExitCode 1
}
else {
Write-Host 'CredProvider plugin was installed correctly!'
Write-Host "CredProvider plugin was installed correctly!"
}
# Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable
@@ -48,7 +49,7 @@ function SetupCredProvider {
$nugetConfigPath = "$RepoRoot\NuGet.config"
if (-Not (Test-Path -Path $nugetConfigPath)) {
Write-PipelineTelemetryError -Category 'Build' -Message 'NuGet.config file not found in repo root!'
Write-Host "NuGet.config file not found in repo's root!"
ExitWithExitCode 1
}
@@ -80,7 +81,7 @@ function SetupCredProvider {
}
else
{
Write-Host 'No internal endpoints found in NuGet.config'
Write-Host "No internal endpoints found in NuGet.config"
}
}
@@ -98,7 +99,7 @@ function InstallDotNetSdkAndRestoreArcade {
& $dotnet restore $restoreProjPath
Write-Host 'Arcade SDK restored!'
Write-Host "Arcade SDK restored!"
if (Test-Path -Path $restoreProjPath) {
Remove-Item $restoreProjPath
@@ -112,22 +113,23 @@ function InstallDotNetSdkAndRestoreArcade {
try {
Push-Location $PSScriptRoot
if ($Operation -like 'setup') {
if ($Operation -like "setup") {
SetupCredProvider $AuthToken
}
elseif ($Operation -like 'install-restore') {
elseif ($Operation -like "install-restore") {
InstallDotNetSdkAndRestoreArcade
}
else {
Write-PipelineTelemetryError -Category 'Arcade' -Message "Unknown operation '$Operation'!"
Write-Host "Unknown operation '$Operation'!"
ExitWithExitCode 1
}
}
catch {
Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'Arcade' -Message $_
ExitWithExitCode 1
}
finally {
Pop-Location
Pop-Location
}
+2 -2
View File
@@ -30,7 +30,7 @@ function SetupCredProvider {
rm installcredprovider.sh
if [ ! -d "$HOME/.nuget/plugins" ]; then
Write-PipelineTelemetryError -category 'Build' 'CredProvider plugin was not installed correctly!'
echo "CredProvider plugin was not installed correctly!"
ExitWithExitCode 1
else
echo "CredProvider plugin was installed correctly!"
@@ -42,7 +42,7 @@ function SetupCredProvider {
local nugetConfigPath="$repo_root/NuGet.config"
if [ ! "$nugetConfigPath" ]; then
Write-PipelineTelemetryError -category 'Build' "NuGet.config file not found in repo's root!"
echo "NuGet.config file not found in repo's root!"
ExitWithExitCode 1
fi
+3 -2
View File
@@ -1,6 +1,6 @@
[CmdletBinding(PositionalBinding=$false)]
Param(
[string] $verbosity = 'minimal',
[string] $verbosity = "minimal",
[bool] $warnAsError = $true,
[bool] $nodeReuse = $true,
[switch] $ci,
@@ -18,8 +18,9 @@ try {
MSBuild @extraArgs
}
catch {
Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'Build' -Message $_
ExitWithExitCode 1
}
+5 -5
View File
@@ -34,7 +34,7 @@ function ExpandZip {
echo "'Force flag enabled, but '$output_directory' exists. Removing directory"
rm -rf $output_directory
if [[ $? != 0 ]]; then
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Unable to remove '$output_directory'"
echo Unable to remove '$output_directory'>&2
return 1
fi
fi
@@ -45,7 +45,7 @@ function ExpandZip {
echo "Extracting archive"
tar -xf $zip_path -C $output_directory
if [[ $? != 0 ]]; then
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Unable to extract '$zip_path'"
echo "Unable to extract '$zip_path'" >&2
return 1
fi
@@ -117,7 +117,7 @@ function DownloadAndExtract {
# Download file
GetFile "$uri" "$temp_tool_path" $force $download_retries $retry_wait_time_seconds
if [[ $? != 0 ]]; then
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Failed to download '$uri' to '$temp_tool_path'."
echo "Failed to download '$uri' to '$temp_tool_path'." >&2
return 1
fi
@@ -125,7 +125,7 @@ function DownloadAndExtract {
echo "extracting from $temp_tool_path to $installDir"
ExpandZip "$temp_tool_path" "$installDir" $force $download_retries $retry_wait_time_seconds
if [[ $? != 0 ]]; then
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Failed to extract '$temp_tool_path' to '$installDir'."
echo "Failed to extract '$temp_tool_path' to '$installDir'." >&2
return 1
fi
@@ -148,7 +148,7 @@ function NewScriptShim {
fi
if [[ ! -f $tool_file_path ]]; then
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Specified tool file path:'$tool_file_path' does not exist"
echo "Specified tool file path:'$tool_file_path' does not exist" >&2
return 1
fi
+2 -2
View File
@@ -101,7 +101,7 @@ fi
DownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds
if [[ $? != 0 ]]; then
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Installation failed'
echo "Installation failed" >&2
exit 1
fi
@@ -110,7 +110,7 @@ fi
NewScriptShim $shim_path $tool_file_path true
if [[ $? != 0 ]]; then
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Shim generation failed'
echo "Shim generation failed" >&2
exit 1
fi
+2 -2
View File
@@ -101,7 +101,7 @@ fi
DownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds
if [[ $? != 0 ]]; then
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Installation failed'
echo "Installation failed" >&2
exit 1
fi
@@ -110,7 +110,7 @@ fi
NewScriptShim $shim_path $tool_file_path true
if [[ $? != 0 ]]; then
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Shim generation failed'
echo "Shim generation failed" >&2
exit 1
fi
+5 -7
View File
@@ -46,8 +46,6 @@ Param (
[int] $RetryWaitTimeInSeconds = 30
)
. $PSScriptRoot\..\pipeline-logging-functions.ps1
# Import common library modules
Import-Module -Name (Join-Path $CommonLibraryDirectory "CommonLibrary.psm1")
@@ -95,7 +93,7 @@ try {
-Verbose:$Verbose
if ($InstallStatus -Eq $False) {
Write-PipelineTelemetryError "Installation failed" -Category "NativeToolsetBootstrapping"
Write-Error "Installation failed"
exit 1
}
}
@@ -105,7 +103,7 @@ try {
Write-Error "There are multiple copies of $ToolName in $($ToolInstallDirectory): `n$(@($ToolFilePath | out-string))"
exit 1
} elseif (@($ToolFilePath).Length -Lt 1) {
Write-Host "$ToolName was not found in $ToolFilePath."
Write-Error "$ToolName was not found in $ToolFilePath."
exit 1
}
@@ -119,14 +117,14 @@ try {
-Verbose:$Verbose
if ($GenerateShimStatus -Eq $False) {
Write-PipelineTelemetryError "Generate shim failed" -Category "NativeToolsetBootstrapping"
Write-Error "Generate shim failed"
return 1
}
exit 0
}
catch {
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category "NativeToolsetBootstrapping" -Message $_
Write-Host $_
Write-Host $_.Exception
exit 1
}
+33 -39
View File
@@ -12,7 +12,6 @@ $script:loggingCommandEscapeMappings = @( # TODO: WHAT ABOUT "="? WHAT ABOUT "%"
# TODO: BUG: Escape % ???
# TODO: Add test to verify don't need to escape "=".
# Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set
function Write-PipelineTelemetryError {
[CmdletBinding()]
param(
@@ -26,53 +25,49 @@ function Write-PipelineTelemetryError {
[string]$SourcePath,
[string]$LineNumber,
[string]$ColumnNumber,
[switch]$AsOutput,
[switch]$Force)
[switch]$AsOutput)
$PSBoundParameters.Remove('Category') | Out-Null
$PSBoundParameters.Remove("Category") | Out-Null
$Message = "(NETCORE_ENGINEERING_TELEMETRY=$Category) $Message"
$PSBoundParameters.Remove('Message') | Out-Null
$PSBoundParameters.Add('Message', $Message)
$PSBoundParameters.Remove("Message") | Out-Null
$PSBoundParameters.Add("Message", $Message)
Write-PipelineTaskError @PSBoundParameters
}
# Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set
function Write-PipelineTaskError {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[string]$Message,
[Parameter(Mandatory = $false)]
[string]$Type = 'error',
[string]$ErrCode,
[string]$SourcePath,
[string]$LineNumber,
[string]$ColumnNumber,
[switch]$AsOutput,
[switch]$Force
)
if(!$Force -And (-Not (Test-Path variable:ci) -Or !$ci)) {
[Parameter(Mandatory = $true)]
[string]$Message,
[Parameter(Mandatory = $false)]
[string]$Type = 'error',
[string]$ErrCode,
[string]$SourcePath,
[string]$LineNumber,
[string]$ColumnNumber,
[switch]$AsOutput)
if(!$ci) {
if($Type -eq 'error') {
Write-Host $Message -ForegroundColor Red
return
Write-Host $Message -ForegroundColor Red
return
}
elseif ($Type -eq 'warning') {
Write-Host $Message -ForegroundColor Yellow
return
Write-Host $Message -ForegroundColor Yellow
return
}
}
if(($Type -ne 'error') -and ($Type -ne 'warning')) {
Write-Host $Message
return
}
$PSBoundParameters.Remove('Force') | Out-Null
if(-not $PSBoundParameters.ContainsKey('Type')) {
$PSBoundParameters.Add('Type', 'error')
}
Write-LogIssue @PSBoundParameters
}
if(($Type -ne 'error') -and ($Type -ne 'warning')) {
Write-Host $Message
return
}
if(-not $PSBoundParameters.ContainsKey('Type')) {
$PSBoundParameters.Add('Type', 'error')
}
Write-LogIssue @PSBoundParameters
}
function Write-PipelineSetVariable {
@@ -85,7 +80,7 @@ function Write-PipelineTaskError {
[switch]$AsOutput,
[bool]$IsMultiJobVariable=$true)
if((Test-Path variable:ci) -And $ci) {
if($ci) {
Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{
'variable' = $Name
'isSecret' = $Secret
@@ -100,8 +95,7 @@ function Write-PipelineTaskError {
[Parameter(Mandatory=$true)]
[string]$Path,
[switch]$AsOutput)
if((Test-Path variable:ci) -And $ci) {
if($ci) {
Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput
}
}
@@ -237,4 +231,4 @@ function Write-LogIssue {
}
Write-Host $command -ForegroundColor $foregroundColor -BackgroundColor $backgroundColor
}
}
+2 -9
View File
@@ -2,7 +2,6 @@
function Write-PipelineTelemetryError {
local telemetry_category=''
local force=false
local function_args=()
local message=''
while [[ $# -gt 0 ]]; do
@@ -12,9 +11,6 @@ function Write-PipelineTelemetryError {
telemetry_category=$2
shift
;;
-force|-f)
force=true
;;
-*)
function_args+=("$1 $2")
shift
@@ -26,22 +22,19 @@ function Write-PipelineTelemetryError {
shift
done
if [[ $force != true ]] && [[ "$ci" != true ]]; then
if [[ "$ci" != true ]]; then
echo "$message" >&2
return
fi
message="(NETCORE_ENGINEERING_TELEMETRY=$telemetry_category) $message"
function_args+=("$message")
if [[ $force == true ]]; then
function_args+=("-force")
fi
Write-PipelineTaskError $function_args
}
function Write-PipelineTaskError {
if [[ $force != true ]] && [[ "$ci" != true ]]; then
if [[ "$ci" != true ]]; then
echo "$@" >&2
return
fi
+8 -7
View File
@@ -2,20 +2,20 @@ param(
[Parameter(Mandatory=$true)][int] $BarBuildId, # ID of the build which assets should be downloaded
[Parameter(Mandatory=$true)][string] $DropLocation, # Where the assets should be downloaded to
[Parameter(Mandatory=$true)][string] $MaestroApiAccessToken, # Token used to access Maestro API
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro-prod.westus2.cloudapp.azure.com', # Maestro API URL
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16' # Version of Maestro API to use
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = "https://maestro-prod.westus2.cloudapp.azure.com", # Maestro API URL
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = "2019-01-16" # Version of Maestro API to use
)
try {
. $PSScriptRoot\post-build-utils.ps1
. $PSScriptRoot\post-build-utils.ps1
Write-Host 'Installing DARC ...'
try {
Write-Host "Installing DARC ..."
. $PSScriptRoot\..\darc-init.ps1
$exitCode = $LASTEXITCODE
if ($exitCode -ne 0) {
Write-PipelineTelemetryError -Category "Darc" -Message "Something failed while running 'darc-init.ps1'. Check for errors above. Exiting now..."
Write-PipelineTaskError "Something failed while running 'darc-init.ps1'. Check for errors above. Exiting now..."
ExitWithExitCode $exitCode
}
@@ -38,7 +38,8 @@ try {
--latest-location
}
catch {
Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category "Darc" -Message $_
ExitWithExitCode 1
}
+6 -5
View File
@@ -6,19 +6,20 @@ param(
[Parameter(Mandatory=$true)][string] $ToolDestinationPath # Where the validation tool should be downloaded to
)
. $PSScriptRoot\post-build-utils.ps1
try {
. $PSScriptRoot\post-build-utils.ps1
$url = "https://raw.githubusercontent.com/NuGet/NuGetGallery/jver-verify/src/VerifyMicrosoftPackage/verify.ps1"
$url = 'https://raw.githubusercontent.com/NuGet/NuGetGallery/jver-verify/src/VerifyMicrosoftPackage/verify.ps1'
New-Item -ItemType 'directory' -Path ${ToolDestinationPath} -Force
New-Item -ItemType "directory" -Path ${ToolDestinationPath} -Force
Invoke-WebRequest $url -OutFile ${ToolDestinationPath}\verify.ps1
& ${ToolDestinationPath}\verify.ps1 ${PackagesPath}\*.nupkg
}
catch {
Write-PipelineTaskError "NuGet package validation failed. Please check error logs."
Write-Host $_
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'NuGetValidation' -Message $_
ExitWithExitCode 1
}
+16 -16
View File
@@ -1,17 +1,17 @@
# Most of the functions in this file require the variables `MaestroApiEndPoint`,
# `MaestroApiVersion` and `MaestroApiAccessToken` to be globally available.
$ErrorActionPreference = 'Stop'
$ErrorActionPreference = "Stop"
Set-StrictMode -Version 2.0
# `tools.ps1` checks $ci to perform some actions. Since the post-build
# scripts don't necessarily execute in the same agent that run the
# build.ps1/sh script this variable isn't automatically set.
$ci = $true
$disableConfigureToolsetImport = $true
$disableConfigureToolsetImport = "true"
. $PSScriptRoot\..\tools.ps1
function Create-MaestroApiRequestHeaders([string]$ContentType = 'application/json') {
function Create-MaestroApiRequestHeaders([string]$ContentType = "application/json") {
Validate-MaestroVars
$headers = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]'
@@ -51,14 +51,6 @@ function Get-MaestroSubscriptions([string]$SourceRepository, [int]$ChannelId) {
return $result
}
function Assign-BuildToChannel([int]$BuildId, [int]$ChannelId) {
Validate-MaestroVars
$apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken
$apiEndpoint = "$MaestroApiEndPoint/api/channels/${ChannelId}/builds/${BuildId}?api-version=$MaestroApiVersion"
Invoke-WebRequest -Method Post -Uri $apiEndpoint -Headers $apiHeaders | Out-Null
}
function Trigger-Subscription([string]$SubscriptionId) {
Validate-MaestroVars
@@ -67,24 +59,32 @@ function Trigger-Subscription([string]$SubscriptionId) {
Invoke-WebRequest -Uri $apiEndpoint -Headers $apiHeaders -Method Post | Out-Null
}
function Assign-BuildToChannel([int]$BuildId, [int]$ChannelId) {
Validate-MaestroVars
$apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken
$apiEndpoint = "$MaestroApiEndPoint/api/channels/${ChannelId}/builds/${BuildId}?api-version=$MaestroApiVersion"
Invoke-WebRequest -Method Post -Uri $apiEndpoint -Headers $apiHeaders | Out-Null
}
function Validate-MaestroVars {
try {
Get-Variable MaestroApiEndPoint -Scope Global | Out-Null
Get-Variable MaestroApiVersion -Scope Global | Out-Null
Get-Variable MaestroApiAccessToken -Scope Global | Out-Null
if (!($MaestroApiEndPoint -Match '^http[s]?://maestro-(int|prod).westus2.cloudapp.azure.com$')) {
Write-PipelineTelemetryError -Category 'MaestroVars' -Message "MaestroApiEndPoint is not a valid Maestro URL. '$MaestroApiEndPoint'"
if (!($MaestroApiEndPoint -Match "^http[s]?://maestro-(int|prod).westus2.cloudapp.azure.com$")) {
Write-PipelineTaskError "MaestroApiEndPoint is not a valid Maestro URL. '$MaestroApiEndPoint'"
ExitWithExitCode 1
}
if (!($MaestroApiVersion -Match '^[0-9]{4}-[0-9]{2}-[0-9]{2}$')) {
Write-PipelineTelemetryError -Category 'MaestroVars' -Message "MaestroApiVersion does not match a version string in the format yyyy-MM-DD. '$MaestroApiVersion'"
if (!($MaestroApiVersion -Match "^[0-9]{4}-[0-9]{2}-[0-9]{2}$")) {
Write-PipelineTaskError "MaestroApiVersion does not match a version string in the format yyyy-MM-DD. '$MaestroApiVersion'"
ExitWithExitCode 1
}
}
catch {
Write-PipelineTelemetryError -Category 'MaestroVars' -Message 'Error: Variables `MaestroApiEndPoint`, `MaestroApiVersion` and `MaestroApiAccessToken` are required while using this script.'
Write-PipelineTaskError "Error: Variables `MaestroApiEndPoint`, `MaestroApiVersion` and `MaestroApiAccessToken` are required while using this script."
Write-Host $_
ExitWithExitCode 1
}
+9 -9
View File
@@ -2,18 +2,18 @@ param(
[Parameter(Mandatory=$true)][int] $BuildId,
[Parameter(Mandatory=$true)][int] $ChannelId,
[Parameter(Mandatory=$true)][string] $MaestroApiAccessToken,
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro-prod.westus2.cloudapp.azure.com',
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16'
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = "https://maestro-prod.westus2.cloudapp.azure.com",
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = "2019-01-16"
)
try {
. $PSScriptRoot\post-build-utils.ps1
. $PSScriptRoot\post-build-utils.ps1
try {
# Check that the channel we are going to promote the build to exist
$channelInfo = Get-MaestroChannel -ChannelId $ChannelId
if (!$channelInfo) {
Write-PipelineTelemetryCategory -Category 'PromoteBuild' -Message "Channel with BAR ID $ChannelId was not found in BAR!"
Write-Host "Channel with BAR ID $ChannelId was not found in BAR!"
ExitWithExitCode 1
}
@@ -21,7 +21,7 @@ try {
$buildInfo = Get-MaestroBuild -BuildId $BuildId
if (!$buildInfo) {
Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "Build with BAR ID $BuildId was not found in BAR!"
Write-Host "Build with BAR ID $BuildId was not found in BAR!"
ExitWithExitCode 1
}
@@ -39,10 +39,10 @@ try {
Assign-BuildToChannel -BuildId $BuildId -ChannelId $ChannelId
Write-Host 'done.'
Write-Host "done."
}
catch {
Write-Host "There was an error while trying to promote build '$BuildId' to channel '$ChannelId'"
Write-Host $_
Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "There was an error while trying to promote build '$BuildId' to channel '$ChannelId'"
ExitWithExitCode 1
Write-Host $_.ScriptStackTrace
}
+21 -21
View File
@@ -34,9 +34,9 @@ $ValidatePackage = {
# Extensions for which we'll look for SourceLink information
# For now we'll only care about Portable & Embedded PDBs
$RelevantExtensions = @('.dll', '.exe', '.pdb')
$RelevantExtensions = @(".dll", ".exe", ".pdb")
Write-Host -NoNewLine 'Validating ' ([System.IO.Path]::GetFileName($PackagePath)) '...'
Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... "
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
$ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
@@ -58,7 +58,7 @@ $ValidatePackage = {
$TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName
# We ignore resource DLLs
if ($FileName.EndsWith('.resources.dll')) {
if ($FileName.EndsWith(".resources.dll")) {
return
}
@@ -96,7 +96,7 @@ $ValidatePackage = {
$Uri = $Link -as [System.URI]
# Only GitHub links are valid
if ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match 'github' -or $Uri.Host -match 'githubusercontent')) {
if ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match "github" -or $Uri.Host -match "githubusercontent")) {
$Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
}
else {
@@ -143,19 +143,19 @@ $ValidatePackage = {
}
if ($FailedFiles -eq 0) {
Write-Host 'Passed.'
Write-Host "Passed."
return 0
}
else {
Write-PipelineTelemetryError -Category 'SourceLink' -Message "$PackagePath has broken SourceLink links."
Write-Host "$PackagePath has broken SourceLink links."
return 1
}
}
function ValidateSourceLinkLinks {
if ($GHRepoName -ne '' -and !($GHRepoName -Match '^[^\s\/]+/[^\s\/]+$')) {
if (!($GHRepoName -Match '^[^\s-]+-[^\s]+$')) {
Write-PipelineTelemetryError -Category 'SourceLink' -Message "GHRepoName should be in the format <org>/<repo> or <org>-<repo>. '$GHRepoName'"
if ($GHRepoName -ne "" -and !($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) {
if (!($GHRepoName -Match "^[^\s-]+-[^\s]+$")) {
Write-PipelineTaskError "GHRepoName should be in the format <org>/<repo> or <org>-<repo>. '$GHRepoName'"
ExitWithExitCode 1
}
else {
@@ -163,14 +163,14 @@ function ValidateSourceLinkLinks {
}
}
if ($GHCommit -ne '' -and !($GHCommit -Match '^[0-9a-fA-F]{40}$')) {
Write-PipelineTelemetryError -Category 'SourceLink' -Message "GHCommit should be a 40 chars hexadecimal string. '$GHCommit'"
if ($GHCommit -ne "" -and !($GHCommit -Match "^[0-9a-fA-F]{40}$")) {
Write-PipelineTaskError "GHCommit should be a 40 chars hexadecimal string. '$GHCommit'"
ExitWithExitCode 1
}
if ($GHRepoName -ne '' -and $GHCommit -ne '') {
$RepoTreeURL = -Join('http://api.github.com/repos/', $GHRepoName, '/git/trees/', $GHCommit, '?recursive=1')
$CodeExtensions = @('.cs', '.vb', '.fs', '.fsi', '.fsx', '.fsscript')
if ($GHRepoName -ne "" -and $GHCommit -ne "") {
$RepoTreeURL = -Join("http://api.github.com/repos/", $GHRepoName, "/git/trees/", $GHCommit, "?recursive=1")
$CodeExtensions = @(".cs", ".vb", ".fs", ".fsi", ".fsx", ".fsscript")
try {
# Retrieve the list of files in the repo at that particular commit point and store them in the RepoFiles hash
@@ -188,8 +188,8 @@ function ValidateSourceLinkLinks {
Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL . Execution will proceed without caching."
}
}
elseif ($GHRepoName -ne '' -or $GHCommit -ne '') {
Write-Host 'For using the http caching mechanism both GHRepoName and GHCommit should be informed.'
elseif ($GHRepoName -ne "" -or $GHCommit -ne "") {
Write-Host "For using the http caching mechanism both GHRepoName and GHCommit should be informed."
}
if (Test-Path $ExtractPath) {
@@ -217,18 +217,18 @@ function ValidateSourceLinkLinks {
$ValidationFailures = 0
foreach ($Job in @(Get-Job)) {
$jobResult = Wait-Job -Id $Job.Id | Receive-Job
if ($jobResult -ne '0') {
if ($jobResult -ne "0") {
$ValidationFailures++
}
}
if ($ValidationFailures -gt 0) {
Write-PipelineTelemetryError -Category 'SourceLink' -Message "$ValidationFailures package(s) failed validation."
Write-PipelineTaskError " $ValidationFailures package(s) failed validation."
ExitWithExitCode 1
}
}
function InstallSourcelinkCli {
$sourcelinkCliPackageName = 'sourcelink'
$sourcelinkCliPackageName = "sourcelink"
$dotnetRoot = InitializeDotNetCli -install:$true
$dotnet = "$dotnetRoot\dotnet.exe"
@@ -239,7 +239,7 @@ function InstallSourcelinkCli {
}
else {
Write-Host "Installing SourceLink CLI version $sourcelinkCliVersion..."
Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.'
Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
& "$dotnet" tool install $sourcelinkCliPackageName --version $sourcelinkCliVersion --verbosity "minimal" --global
}
}
@@ -250,8 +250,8 @@ try {
ValidateSourceLinkLinks
}
catch {
Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'SourceLink' -Message $_
ExitWithExitCode 1
}
+36 -35
View File
@@ -4,6 +4,10 @@ param(
[Parameter(Mandatory=$true)][string] $DotnetSymbolVersion # Version of dotnet symbol to use
)
. $PSScriptRoot\post-build-utils.ps1
Add-Type -AssemblyName System.IO.Compression.FileSystem
function FirstMatchingSymbolDescriptionOrDefault {
param(
[string] $FullPath, # Full path to the module that has to be checked
@@ -19,19 +23,19 @@ function FirstMatchingSymbolDescriptionOrDefault {
# checking and which type of file was uploaded.
# The file itself is returned
$SymbolPath = $SymbolsPath + '\' + $FileName
$SymbolPath = $SymbolsPath + "\" + $FileName
# PDB file for the module
$PdbPath = $SymbolPath.Replace($Extension, '.pdb')
$PdbPath = $SymbolPath.Replace($Extension, ".pdb")
# PDB file for R2R module (created by crossgen)
$NGenPdb = $SymbolPath.Replace($Extension, '.ni.pdb')
$NGenPdb = $SymbolPath.Replace($Extension, ".ni.pdb")
# DBG file for a .so library
$SODbg = $SymbolPath.Replace($Extension, '.so.dbg')
$SODbg = $SymbolPath.Replace($Extension, ".so.dbg")
# DWARF file for a .dylib
$DylibDwarf = $SymbolPath.Replace($Extension, '.dylib.dwarf')
$DylibDwarf = $SymbolPath.Replace($Extension, ".dylib.dwarf")
$dotnetSymbolExe = "$env:USERPROFILE\.dotnet\tools"
$dotnetSymbolExe = Resolve-Path "$dotnetSymbolExe\dotnet-symbol.exe"
@@ -39,19 +43,19 @@ function FirstMatchingSymbolDescriptionOrDefault {
& $dotnetSymbolExe --symbols --modules --windows-pdbs $TargetServerParam $FullPath -o $SymbolsPath | Out-Null
if (Test-Path $PdbPath) {
return 'PDB'
return "PDB"
}
elseif (Test-Path $NGenPdb) {
return 'NGen PDB'
return "NGen PDB"
}
elseif (Test-Path $SODbg) {
return 'DBG for SO'
return "DBG for SO"
}
elseif (Test-Path $DylibDwarf) {
return 'Dwarf for Dylib'
return "Dwarf for Dylib"
}
elseif (Test-Path $SymbolPath) {
return 'Module'
return "Module"
}
else {
return $null
@@ -70,7 +74,7 @@ function CountMissingSymbols {
}
# Extensions for which we'll look for symbols
$RelevantExtensions = @('.dll', '.exe', '.so', '.dylib')
$RelevantExtensions = @(".dll", ".exe", ".so", ".dylib")
# How many files are missing symbol information
$MissingSymbols = 0
@@ -78,38 +82,38 @@ function CountMissingSymbols {
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
$PackageGuid = New-Guid
$ExtractPath = Join-Path -Path $ExtractPath -ChildPath $PackageGuid
$SymbolsPath = Join-Path -Path $ExtractPath -ChildPath 'Symbols'
$SymbolsPath = Join-Path -Path $ExtractPath -ChildPath "Symbols"
[System.IO.Compression.ZipFile]::ExtractToDirectory($PackagePath, $ExtractPath)
Get-ChildItem -Recurse $ExtractPath |
Where-Object {$RelevantExtensions -contains $_.Extension} |
ForEach-Object {
if ($_.FullName -Match '\\ref\\') {
Write-Host "`t Ignoring reference assembly file " $_.FullName
if ($_.FullName -Match "\\ref\\") {
Write-Host "`t Ignoring reference assembly file" $_.FullName
return
}
$SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName '--microsoft-symbol-server' $SymbolsPath
$SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName '--internal-server' $SymbolsPath
$SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--microsoft-symbol-server" $SymbolsPath
$SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--internal-server" $SymbolsPath
Write-Host -NoNewLine "`t Checking file " $_.FullName "... "
Write-Host -NoNewLine "`t Checking file" $_.FullName "... "
if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) {
Write-Host "Symbols found on MSDL ($SymbolsOnMSDL) and SymWeb ($SymbolsOnSymWeb)"
Write-Host "Symbols found on MSDL (" $SymbolsOnMSDL ") and SymWeb (" $SymbolsOnSymWeb ")"
}
else {
$MissingSymbols++
if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) {
Write-Host 'No symbols found on MSDL or SymWeb!'
Write-Host "No symbols found on MSDL or SymWeb!"
}
else {
if ($SymbolsOnMSDL -eq $null) {
Write-Host 'No symbols found on MSDL!'
Write-Host "No symbols found on MSDL!"
}
else {
Write-Host 'No symbols found on SymWeb!'
Write-Host "No symbols found on SymWeb!"
}
}
}
@@ -128,27 +132,27 @@ function CheckSymbolsAvailable {
Get-ChildItem "$InputPath\*.nupkg" |
ForEach-Object {
$FileName = $_.Name
# These packages from Arcade-Services include some native libraries that
# our current symbol uploader can't handle. Below is a workaround until
# we get issue: https://github.com/dotnet/arcade/issues/2457 sorted.
if ($FileName -Match 'Microsoft\.DotNet\.Darc\.') {
if ($FileName -Match "Microsoft\.DotNet\.Darc\.") {
Write-Host "Ignoring Arcade-services file: $FileName"
Write-Host
return
}
elseif ($FileName -Match 'Microsoft\.DotNet\.Maestro\.Tasks\.') {
elseif ($FileName -Match "Microsoft\.DotNet\.Maestro\.Tasks\.") {
Write-Host "Ignoring Arcade-services file: $FileName"
Write-Host
return
}
Write-Host "Validating $FileName "
$Status = CountMissingSymbols "$InputPath\$FileName"
if ($Status -ne 0) {
Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Missing symbols for $Status modules in the package $FileName"
ExitWithExitCode $exitCode
Write-PipelineTaskError "Missing symbols for $Status modules in the package $FileName"
ExitWithExitCode $exitCode
}
Write-Host
@@ -156,7 +160,7 @@ function CheckSymbolsAvailable {
}
function InstallDotnetSymbol {
$dotnetSymbolPackageName = 'dotnet-symbol'
$dotnetSymbolPackageName = "dotnet-symbol"
$dotnetRoot = InitializeDotNetCli -install:$true
$dotnet = "$dotnetRoot\dotnet.exe"
@@ -167,22 +171,19 @@ function InstallDotnetSymbol {
}
else {
Write-Host "Installing dotnet-symbol version $dotnetSymbolVersion..."
Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.'
Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
& "$dotnet" tool install $dotnetSymbolPackageName --version $dotnetSymbolVersion --verbosity "minimal" --global
}
}
try {
. $PSScriptRoot\post-build-utils.ps1
Add-Type -AssemblyName System.IO.Compression.FileSystem
InstallDotnetSymbol
CheckSymbolsAvailable
}
catch {
Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'CheckSymbols' -Message $_
ExitWithExitCode 1
}
+43 -50
View File
@@ -2,63 +2,56 @@ param(
[Parameter(Mandatory=$true)][string] $SourceRepo,
[Parameter(Mandatory=$true)][int] $ChannelId,
[Parameter(Mandatory=$true)][string] $MaestroApiAccessToken,
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro-prod.westus2.cloudapp.azure.com',
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16'
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = "https://maestro-prod.westus2.cloudapp.azure.com",
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = "2019-01-16"
)
try {
. $PSScriptRoot\post-build-utils.ps1
. $PSScriptRoot\post-build-utils.ps1
# Get all the $SourceRepo subscriptions
$normalizedSourceRepo = $SourceRepo.Replace('dnceng@', '')
$subscriptions = Get-MaestroSubscriptions -SourceRepository $normalizedSourceRepo -ChannelId $ChannelId
# Get all the $SourceRepo subscriptions
$normalizedSourceRepo = $SourceRepo.Replace('dnceng@', '')
$subscriptions = Get-MaestroSubscriptions -SourceRepository $normalizedSourceRepo -ChannelId $ChannelId
if (!$subscriptions) {
Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message "No subscriptions found for source repo '$normalizedSourceRepo' in channel '$ChannelId'"
ExitWithExitCode 0
}
if (!$subscriptions) {
Write-Host "No subscriptions found for source repo '$normalizedSourceRepo' in channel '$ChannelId'"
ExitWithExitCode 0
}
$subscriptionsToTrigger = New-Object System.Collections.Generic.List[string]
$failedTriggeredSubscription = $false
$subscriptionsToTrigger = New-Object System.Collections.Generic.List[string]
$failedTriggeredSubscription = $false
# Get all enabled subscriptions that need dependency flow on 'everyBuild'
foreach ($subscription in $subscriptions) {
if ($subscription.enabled -and $subscription.policy.updateFrequency -like 'everyBuild' -and $subscription.channel.id -eq $ChannelId) {
Write-Host "Should trigger this subscription: ${$subscription.id}"
[void]$subscriptionsToTrigger.Add($subscription.id)
}
}
foreach ($subscriptionToTrigger in $subscriptionsToTrigger) {
try {
Write-Host "Triggering subscription '$subscriptionToTrigger'."
Trigger-Subscription -SubscriptionId $subscriptionToTrigger
Write-Host 'done.'
}
catch
{
Write-Host "There was an error while triggering subscription '$subscriptionToTrigger'"
Write-Host $_
Write-Host $_.ScriptStackTrace
$failedTriggeredSubscription = $true
}
}
if ($subscriptionsToTrigger.Count -eq 0) {
Write-Host "No subscription matched source repo '$normalizedSourceRepo' and channel ID '$ChannelId'."
}
elseif ($failedTriggeredSubscription) {
Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message 'At least one subscription failed to be triggered...'
ExitWithExitCode 1
}
else {
Write-Host 'All subscriptions were triggered successfully!'
# Get all enabled subscriptions that need dependency flow on 'everyBuild'
foreach ($subscription in $subscriptions) {
if ($subscription.enabled -and $subscription.policy.updateFrequency -like 'everyBuild' -and $subscription.channel.id -eq $ChannelId) {
Write-Host "Should trigger this subscription: $subscription.id"
[void]$subscriptionsToTrigger.Add($subscription.id)
}
}
catch {
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message $_
foreach ($subscriptionToTrigger in $subscriptionsToTrigger) {
try {
Write-Host "Triggering subscription '$subscriptionToTrigger'."
Trigger-Subscription -SubscriptionId $subscriptionToTrigger
Write-Host "done."
}
catch
{
Write-Host "There was an error while triggering subscription '$subscriptionToTrigger'"
Write-Host $_
Write-Host $_.ScriptStackTrace
$failedTriggeredSubscription = $true
}
}
if ($subscriptionsToTrigger.Count -eq 0) {
Write-Host "No subscription matched source repo '$normalizedSourceRepo' and channel ID '$ChannelId'."
}
elseif ($failedTriggeredSubscription) {
Write-Host "At least one subscription failed to be triggered..."
ExitWithExitCode 1
}
else {
Write-Host "All subscriptions were triggered successfully!"
}
+10 -9
View File
@@ -1,8 +1,8 @@
[CmdletBinding(PositionalBinding=$false)]
Param(
[string] $configuration = 'Debug',
[string] $configuration = "Debug",
[string] $task,
[string] $verbosity = 'minimal',
[string] $verbosity = "minimal",
[string] $msbuildEngine = $null,
[switch] $restore,
[switch] $prepareMachine,
@@ -32,7 +32,7 @@ function Print-Usage() {
}
function Build([string]$target) {
$logSuffix = if ($target -eq 'Execute') { '' } else { ".$target" }
$logSuffix = if ($target -eq "Execute") { "" } else { ".$target" }
$log = Join-Path $LogDir "$task$logSuffix.binlog"
$outputPath = Join-Path $ToolsetDir "$task\\"
@@ -46,32 +46,33 @@ function Build([string]$target) {
}
try {
if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) {
if ($help -or (($null -ne $properties) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
Print-Usage
exit 0
}
if ($task -eq "") {
Write-PipelineTelemetryError -Category 'Build' -Message "Missing required parameter '-task <value>'" -ForegroundColor Red
Write-Host "Missing required parameter '-task <value>'" -ForegroundColor Red
Print-Usage
ExitWithExitCode 1
}
$taskProject = GetSdkTaskProject $task
if (!(Test-Path $taskProject)) {
Write-PipelineTelemetryError -Category 'Build' -Message "Unknown task: $task" -ForegroundColor Red
Write-Host "Unknown task: $task" -ForegroundColor Red
ExitWithExitCode 1
}
if ($restore) {
Build 'Restore'
Build "Restore"
}
Build 'Execute'
Build "Execute"
}
catch {
Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'Build' -Message $_
ExitWithExitCode 1
}
+69 -79
View File
@@ -5,7 +5,7 @@ Param(
[string] $Repository=$env:BUILD_REPOSITORY_NAME, # Required: the name of the repository (e.g. dotnet/arcade)
[string] $BranchName=$env:BUILD_SOURCEBRANCH, # Optional: name of branch or version of gdn settings; defaults to master
[string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located
[string] $ArtifactsDirectory = (Join-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY ('artifacts')), # Required: the directory where build artifacts are located
[string] $ArtifactsDirectory = (Join-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY ("artifacts")), # Required: the directory where build artifacts are located
[string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault
[string[]] $SourceToolsList, # Optional: list of SDL tools to run on source code
[string[]] $ArtifactToolsList, # Optional: list of SDL tools to run on built artifacts
@@ -22,89 +22,79 @@ Param(
[string] $TsaCodebaseAdmin, # Optional: only needed if TsaOnboard is true; the aliases which are admins of the TSA codebase (e.g. DOMAIN\alias); TSA is the automated framework used to upload test results as bugs.
[string] $TsaBugAreaPath, # Optional: only needed if TsaOnboard is true; the area path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs.
[string] $TsaIterationPath, # Optional: only needed if TsaOnboard is true; the iteration path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs.
[string] $GuardianLoggerLevel='Standard', # Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error
[string] $GuardianLoggerLevel="Standard", # Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error
[string[]] $CrScanAdditionalRunConfigParams, # Optional: Additional Params to custom build a CredScan run config in the format @("xyz:abc","sdf:1")
[string[]] $PoliCheckAdditionalRunConfigParams # Optional: Additional Params to custom build a Policheck run config in the format @("xyz:abc","sdf:1")
)
try {
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 2.0
$disableConfigureToolsetImport = $true
$LASTEXITCODE = 0
$ErrorActionPreference = "Stop"
Set-StrictMode -Version 2.0
$LASTEXITCODE = 0
. $PSScriptRoot\..\tools.ps1
#Replace repo names to the format of org/repo
if (!($Repository.contains('/'))) {
$RepoName = $Repository -replace '(.*?)-(.*)', '$1/$2';
}
else{
$RepoName = $Repository;
}
if ($GuardianPackageName) {
$guardianCliLocation = Join-Path $NugetPackageDirectory (Join-Path $GuardianPackageName (Join-Path 'tools' 'guardian.cmd'))
} else {
$guardianCliLocation = $GuardianCliLocation
}
$workingDirectory = (Split-Path $SourceDirectory -Parent)
$ValidPath = Test-Path $guardianCliLocation
if ($ValidPath -eq $False)
{
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Invalid Guardian CLI Location.'
ExitWithExitCode 1
}
& $(Join-Path $PSScriptRoot 'init-sdl.ps1') -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel
$gdnFolder = Join-Path $workingDirectory '.gdn'
if ($TsaOnboard) {
if ($TsaCodebaseName -and $TsaNotificationEmail -and $TsaCodebaseAdmin -and $TsaBugAreaPath) {
Write-Host "$guardianCliLocation tsa-onboard --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
& $guardianCliLocation tsa-onboard --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
if ($LASTEXITCODE -ne 0) {
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-onboard failed with exit code $LASTEXITCODE."
ExitWithExitCode $LASTEXITCODE
}
} else {
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not onboard to TSA -- not all required values ($TsaCodebaseName, $TsaNotificationEmail, $TsaCodebaseAdmin, $TsaBugAreaPath) were specified.'
ExitWithExitCode 1
}
}
if ($ArtifactToolsList -and $ArtifactToolsList.Count -gt 0) {
& $(Join-Path $PSScriptRoot 'run-sdl.ps1') -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $ArtifactsDirectory -GdnFolder $gdnFolder -ToolsList $ArtifactToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
}
if ($SourceToolsList -and $SourceToolsList.Count -gt 0) {
& $(Join-Path $PSScriptRoot 'run-sdl.ps1') -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $SourceDirectory -GdnFolder $gdnFolder -ToolsList $SourceToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
}
if ($UpdateBaseline) {
& (Join-Path $PSScriptRoot 'push-gdn.ps1') -Repository $RepoName -BranchName $BranchName -GdnFolder $GdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason 'Update baseline'
}
if ($TsaPublish) {
if ($TsaBranchName -and $BuildNumber) {
if (-not $TsaRepositoryName) {
$TsaRepositoryName = "$($Repository)-$($BranchName)"
}
Write-Host "$guardianCliLocation tsa-publish --all-tools --repository-name `"$TsaRepositoryName`" --branch-name `"$TsaBranchName`" --build-number `"$BuildNumber`" --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
& $guardianCliLocation tsa-publish --all-tools --repository-name "$TsaRepositoryName" --branch-name "$TsaBranchName" --build-number "$BuildNumber" --onboard $True --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
if ($LASTEXITCODE -ne 0) {
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-publish failed with exit code $LASTEXITCODE."
ExitWithExitCode $LASTEXITCODE
}
} else {
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not publish to TSA -- not all required values ($TsaBranchName, $BuildNumber) were specified.'
ExitWithExitCode 1
}
}
#Replace repo names to the format of org/repo
if (!($Repository.contains('/'))) {
$RepoName = $Repository -replace '(.*?)-(.*)', '$1/$2';
}
catch {
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
else{
$RepoName = $Repository;
}
if ($GuardianPackageName) {
$guardianCliLocation = Join-Path $NugetPackageDirectory (Join-Path $GuardianPackageName (Join-Path "tools" "guardian.cmd"))
} else {
$guardianCliLocation = $GuardianCliLocation
}
$workingDirectory = (Split-Path $SourceDirectory -Parent)
$ValidPath = Test-Path $guardianCliLocation
if ($ValidPath -eq $False)
{
Write-Host "Invalid Guardian CLI Location."
exit 1
}
& $(Join-Path $PSScriptRoot "init-sdl.ps1") -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel
$gdnFolder = Join-Path $workingDirectory ".gdn"
if ($TsaOnboard) {
if ($TsaCodebaseName -and $TsaNotificationEmail -and $TsaCodebaseAdmin -and $TsaBugAreaPath) {
Write-Host "$guardianCliLocation tsa-onboard --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
& $guardianCliLocation tsa-onboard --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
if ($LASTEXITCODE -ne 0) {
Write-Host "Guardian tsa-onboard failed with exit code $LASTEXITCODE."
exit $LASTEXITCODE
}
} else {
Write-Host "Could not onboard to TSA -- not all required values ($$TsaCodebaseName, $$TsaNotificationEmail, $$TsaCodebaseAdmin, $$TsaBugAreaPath) were specified."
exit 1
}
}
if ($ArtifactToolsList -and $ArtifactToolsList.Count -gt 0) {
& $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $ArtifactsDirectory -GdnFolder $gdnFolder -ToolsList $ArtifactToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
}
if ($SourceToolsList -and $SourceToolsList.Count -gt 0) {
& $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $SourceDirectory -GdnFolder $gdnFolder -ToolsList $SourceToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
}
if ($UpdateBaseline) {
& (Join-Path $PSScriptRoot "push-gdn.ps1") -Repository $RepoName -BranchName $BranchName -GdnFolder $GdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason "Update baseline"
}
if ($TsaPublish) {
if ($TsaBranchName -and $BuildNumber) {
if (-not $TsaRepositoryName) {
$TsaRepositoryName = "$($Repository)-$($BranchName)"
}
Write-Host "$guardianCliLocation tsa-publish --all-tools --repository-name `"$TsaRepositoryName`" --branch-name `"$TsaBranchName`" --build-number `"$BuildNumber`" --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
& $guardianCliLocation tsa-publish --all-tools --repository-name "$TsaRepositoryName" --branch-name "$TsaBranchName" --build-number "$BuildNumber" --onboard $True --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
if ($LASTEXITCODE -ne 0) {
Write-Host "Guardian tsa-publish failed with exit code $LASTEXITCODE."
exit $LASTEXITCODE
}
} else {
Write-Host "Could not publish to TSA -- not all required values ($$TsaBranchName, $$BuildNumber) were specified."
exit 1
}
}
+44 -46
View File
@@ -3,16 +3,55 @@ param(
[Parameter(Mandatory=$true)][string] $ExtractPath # Full path to directory where the packages will be extracted
)
$ErrorActionPreference = 'Stop'
$ErrorActionPreference = "Stop"
Set-StrictMode -Version 2.0
# `tools.ps1` checks $ci to perform some actions. Since the post-build
# scripts don't necessarily execute in the same agent that run the
# build.ps1/sh script this variable isn't automatically set.
$ci = $true
$disableConfigureToolsetImport = $true
$disableConfigureToolsetImport = "true"
. $PSScriptRoot\..\tools.ps1
function ExtractArtifacts {
$ExtractPackage = {
param(
[string] $PackagePath # Full path to a NuGet package
)
if (!(Test-Path $PackagePath)) {
Write-PipelineTaskError "Input file does not exist: $PackagePath"
ExitWithExitCode 1
}
$RelevantExtensions = @(".dll", ".exe", ".pdb")
Write-Host -NoNewLine "Extracting" ([System.IO.Path]::GetFileName($PackagePath)) "... "
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
$ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Directory]::CreateDirectory($ExtractPath);
try {
$zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
$zip.Entries |
Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
ForEach-Object {
$TargetFile = Join-Path -Path $ExtractPath -ChildPath $_.Name
[System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
}
}
catch {
}
finally {
$zip.Dispose()
}
}
function ExtractArtifacts {
if (!(Test-Path $InputPath)) {
Write-Host "Input Path does not exist: $InputPath"
ExitWithExitCode 0
@@ -29,52 +68,11 @@ function ExtractArtifacts {
}
try {
. $PSScriptRoot\..\tools.ps1
$ExtractPackage = {
param(
[string] $PackagePath # Full path to a NuGet package
)
if (!(Test-Path $PackagePath)) {
Write-PipelineTelemetryError -Category 'Build' -Message "Input file does not exist: $PackagePath"
ExitWithExitCode 1
}
$RelevantExtensions = @('.dll', '.exe', '.pdb')
Write-Host -NoNewLine 'Extracting ' ([System.IO.Path]::GetFileName($PackagePath)) '...'
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
$ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Directory]::CreateDirectory($ExtractPath);
try {
$zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
$zip.Entries |
Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
ForEach-Object {
$TargetFile = Join-Path -Path $ExtractPath -ChildPath $_.Name
[System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
}
}
catch {
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
ExitWithExitCode 1
}
finally {
$zip.Dispose()
}
}
Measure-Command { ExtractArtifacts }
}
catch {
Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
ExitWithExitCode 1
}
+13 -25
View File
@@ -1,19 +1,16 @@
Param(
[string] $GuardianCliLocation,
[string] $Repository,
[string] $BranchName='master',
[string] $BranchName="master",
[string] $WorkingDirectory,
[string] $AzureDevOpsAccessToken,
[string] $GuardianLoggerLevel='Standard'
[string] $GuardianLoggerLevel="Standard"
)
$ErrorActionPreference = 'Stop'
$ErrorActionPreference = "Stop"
Set-StrictMode -Version 2.0
$disableConfigureToolsetImport = $true
$LASTEXITCODE = 0
. $PSScriptRoot\..\tools.ps1
# Don't display the console progress UI - it's a huge perf hit
$ProgressPreference = 'SilentlyContinue'
@@ -24,10 +21,11 @@ $uri = "https://dev.azure.com/dnceng/internal/_apis/git/repositories/sdl-tool-cf
$zipFile = "$WorkingDirectory/gdn.zip"
Add-Type -AssemblyName System.IO.Compression.FileSystem
$gdnFolder = (Join-Path $WorkingDirectory '.gdn')
try {
$gdnFolder = (Join-Path $WorkingDirectory ".gdn")
Try
{
# We try to download the zip; if the request fails (e.g. the file doesn't exist), we catch it and init guardian instead
Write-Host 'Downloading gdn folder from internal config repostiory...'
Write-Host "Downloading gdn folder from internal config repostiory..."
Invoke-WebRequest -Headers @{ "Accept"="application/zip"; "Authorization"="Basic $encodedPat" } -Uri $uri -OutFile $zipFile
if (Test-Path $gdnFolder) {
# Remove the gdn folder if it exists (it shouldn't unless there's too much caching; this is just in case)
@@ -35,29 +33,19 @@ try {
}
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipFile, $WorkingDirectory)
Write-Host $gdnFolder
ExitWithExitCode 0
} catch [System.Net.WebException] { } # Catch and ignore webexception
try {
} Catch [System.Net.WebException] {
# if the folder does not exist, we'll do a guardian init and push it to the remote repository
Write-Host 'Initializing Guardian...'
Write-Host "Initializing Guardian..."
Write-Host "$GuardianCliLocation init --working-directory $WorkingDirectory --logger-level $GuardianLoggerLevel"
& $GuardianCliLocation init --working-directory $WorkingDirectory --logger-level $GuardianLoggerLevel
if ($LASTEXITCODE -ne 0) {
Write-PipelineTelemetryError -Force -Category 'Build' -Message "Guardian init failed with exit code $LASTEXITCODE."
ExitWithExitCode $LASTEXITCODE
Write-Error "Guardian init failed with exit code $LASTEXITCODE."
}
# We create the mainbaseline so it can be edited later
Write-Host "$GuardianCliLocation baseline --working-directory $WorkingDirectory --name mainbaseline"
& $GuardianCliLocation baseline --working-directory $WorkingDirectory --name mainbaseline
if ($LASTEXITCODE -ne 0) {
Write-PipelineTelemetryError -Force -Category 'Build' -Message "Guardian baseline failed with exit code $LASTEXITCODE."
ExitWithExitCode $LASTEXITCODE
Write-Error "Guardian baseline failed with exit code $LASTEXITCODE."
}
& $(Join-Path $PSScriptRoot 'push-gdn.ps1') -Repository $Repository -BranchName $BranchName -GdnFolder $gdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason 'Initialize gdn folder'
ExitWithExitCode 0
}
catch {
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'Sdl' -Message $_
ExitWithExitCode 1
}
& $(Join-Path $PSScriptRoot "push-gdn.ps1") -Repository $Repository -BranchName $BranchName -GdnFolder $gdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason "Initialize gdn folder"
}
+40 -54
View File
@@ -1,65 +1,51 @@
Param(
[string] $Repository,
[string] $BranchName='master',
[string] $BranchName="master",
[string] $GdnFolder,
[string] $AzureDevOpsAccessToken,
[string] $PushReason
)
$ErrorActionPreference = 'Stop'
$ErrorActionPreference = "Stop"
Set-StrictMode -Version 2.0
$disableConfigureToolsetImport = $true
$LASTEXITCODE = 0
try {
. $PSScriptRoot\..\tools.ps1
# We create the temp directory where we'll store the sdl-config repository
$sdlDir = Join-Path $env:TEMP 'sdl'
if (Test-Path $sdlDir) {
Remove-Item -Force -Recurse $sdlDir
}
Write-Host "git clone https://dnceng:`$[email protected]/dnceng/internal/_git/sdl-tool-cfg $sdlDir"
git clone https://dnceng:$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir
if ($LASTEXITCODE -ne 0) {
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git clone failed with exit code $LASTEXITCODE."
ExitWithExitCode $LASTEXITCODE
}
# We copy the .gdn folder from our local run into the git repository so it can be committed
$sdlRepositoryFolder = Join-Path (Join-Path (Join-Path $sdlDir $Repository) $BranchName) '.gdn'
if (Get-Command Robocopy) {
Robocopy /S $GdnFolder $sdlRepositoryFolder
} else {
rsync -r $GdnFolder $sdlRepositoryFolder
}
# cd to the sdl-config directory so we can run git there
Push-Location $sdlDir
# git add . --> git commit --> git push
Write-Host 'git add .'
git add .
if ($LASTEXITCODE -ne 0) {
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git add failed with exit code $LASTEXITCODE."
ExitWithExitCode $LASTEXITCODE
}
Write-Host "git -c user.email=`"[email protected]`" -c user.name=`"Dotnet Bot`" commit -m `"$PushReason for $Repository/$BranchName`""
git -c user.email="[email protected]" -c user.name="Dotnet Bot" commit -m "$PushReason for $Repository/$BranchName"
if ($LASTEXITCODE -ne 0) {
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git commit failed with exit code $LASTEXITCODE."
ExitWithExitCode $LASTEXITCODE
}
Write-Host 'git push'
git push
if ($LASTEXITCODE -ne 0) {
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git push failed with exit code $LASTEXITCODE."
ExitWithExitCode $LASTEXITCODE
}
# Return to the original directory
Pop-Location
# We create the temp directory where we'll store the sdl-config repository
$sdlDir = Join-Path $env:TEMP "sdl"
if (Test-Path $sdlDir) {
Remove-Item -Force -Recurse $sdlDir
}
catch {
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'Sdl' -Message $_
ExitWithExitCode 1
}
Write-Host "git clone https://dnceng:`$[email protected]/dnceng/internal/_git/sdl-tool-cfg $sdlDir"
git clone https://dnceng:$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir
if ($LASTEXITCODE -ne 0) {
Write-Error "Git clone failed with exit code $LASTEXITCODE."
}
# We copy the .gdn folder from our local run into the git repository so it can be committed
$sdlRepositoryFolder = Join-Path (Join-Path (Join-Path $sdlDir $Repository) $BranchName) ".gdn"
if (Get-Command Robocopy) {
Robocopy /S $GdnFolder $sdlRepositoryFolder
} else {
rsync -r $GdnFolder $sdlRepositoryFolder
}
# cd to the sdl-config directory so we can run git there
Push-Location $sdlDir
# git add . --> git commit --> git push
Write-Host "git add ."
git add .
if ($LASTEXITCODE -ne 0) {
Write-Error "Git add failed with exit code $LASTEXITCODE."
}
Write-Host "git -c user.email=`"[email protected]`" -c user.name=`"Dotnet Bot`" commit -m `"$PushReason for $Repository/$BranchName`""
git -c user.email="[email protected]" -c user.name="Dotnet Bot" commit -m "$PushReason for $Repository/$BranchName"
if ($LASTEXITCODE -ne 0) {
Write-Error "Git commit failed with exit code $LASTEXITCODE."
}
Write-Host "git push"
git push
if ($LASTEXITCODE -ne 0) {
Write-Error "Git push failed with exit code $LASTEXITCODE."
}
# Return to the original directory
Pop-Location
+37 -47
View File
@@ -5,65 +5,55 @@ Param(
[string] $GdnFolder,
[string[]] $ToolsList,
[string] $UpdateBaseline,
[string] $GuardianLoggerLevel='Standard',
[string] $GuardianLoggerLevel="Standard",
[string[]] $CrScanAdditionalRunConfigParams,
[string[]] $PoliCheckAdditionalRunConfigParams
)
$ErrorActionPreference = 'Stop'
$ErrorActionPreference = "Stop"
Set-StrictMode -Version 2.0
$disableConfigureToolsetImport = $true
$LASTEXITCODE = 0
try {
. $PSScriptRoot\..\tools.ps1
# We store config files in the r directory of .gdn
Write-Host $ToolsList
$gdnConfigPath = Join-Path $GdnFolder "r"
$ValidPath = Test-Path $GuardianCliLocation
# We store config files in the r directory of .gdn
Write-Host $ToolsList
$gdnConfigPath = Join-Path $GdnFolder 'r'
$ValidPath = Test-Path $GuardianCliLocation
if ($ValidPath -eq $False)
{
Write-Host "Invalid Guardian CLI Location."
exit 1
}
if ($ValidPath -eq $False)
{
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Invalid Guardian CLI Location."
ExitWithExitCode 1
}
$configParam = @('--config')
$configParam = @("--config")
foreach ($tool in $ToolsList) {
$gdnConfigFile = Join-Path $gdnConfigPath "$tool-configure.gdnconfig"
Write-Host $tool
# We have to manually configure tools that run on source to look at the source directory only
if ($tool -eq 'credscan') {
Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" TargetDirectory < $TargetDirectory `" `" OutputType < pre `" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})"
& $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " TargetDirectory < $TargetDirectory " "OutputType < pre" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})
if ($LASTEXITCODE -ne 0) {
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian configure for $tool failed with exit code $LASTEXITCODE."
ExitWithExitCode $LASTEXITCODE
}
foreach ($tool in $ToolsList) {
$gdnConfigFile = Join-Path $gdnConfigPath "$tool-configure.gdnconfig"
Write-Host $tool
# We have to manually configure tools that run on source to look at the source directory only
if ($tool -eq "credscan") {
Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" TargetDirectory < $TargetDirectory `" `" OutputType < pre `" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})"
& $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " TargetDirectory < $TargetDirectory " "OutputType < pre" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})
if ($LASTEXITCODE -ne 0) {
Write-Host "Guardian configure for $tool failed with exit code $LASTEXITCODE."
exit $LASTEXITCODE
}
if ($tool -eq 'policheck') {
Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" Target < $TargetDirectory `" $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})"
& $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " Target < $TargetDirectory " $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})
if ($LASTEXITCODE -ne 0) {
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian configure for $tool failed with exit code $LASTEXITCODE."
ExitWithExitCode $LASTEXITCODE
}
}
if ($tool -eq "policheck") {
Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" Target < $TargetDirectory `" $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})"
& $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " Target < $TargetDirectory " $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})
if ($LASTEXITCODE -ne 0) {
Write-Host "Guardian configure for $tool failed with exit code $LASTEXITCODE."
exit $LASTEXITCODE
}
}
$configParam+=$gdnConfigFile
}
$configParam+=$gdnConfigFile
}
Write-Host "$GuardianCliLocation run --working-directory $WorkingDirectory --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam"
& $GuardianCliLocation run --working-directory $WorkingDirectory --tool $tool --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam
if ($LASTEXITCODE -ne 0) {
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian run for $ToolsList using $configParam failed with exit code $LASTEXITCODE."
ExitWithExitCode $LASTEXITCODE
}
Write-Host "$GuardianCliLocation run --working-directory $WorkingDirectory --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam"
& $GuardianCliLocation run --working-directory $WorkingDirectory --tool $tool --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam
if ($LASTEXITCODE -ne 0) {
Write-Host "Guardian run for $ToolsList using $configParam failed with exit code $LASTEXITCODE."
exit $LASTEXITCODE
}
catch {
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'Sdl' -Message $_
ExitWithExitCode 1
}
@@ -97,6 +97,7 @@ stages:
buildType: current
artifactName: BlobArtifacts
continueOnError: true
- task: DownloadBuildArtifacts@0
displayName: Download Asset Manifests
inputs:
@@ -71,6 +71,7 @@ stages:
StageLabel: '${{ parameters.stageName }}'
JobLabel: 'SymbolPublishing'
- job: publish_assets
displayName: Publish Assets
dependsOn: setupMaestroVars
@@ -4,7 +4,7 @@ variables:
- group: DotNet-DotNetCli-Storage
- group: DotNet-MSRC-Storage
- group: Publish-Build-Assets
# .NET Core 3.1 Dev
- name: PublicDevRelease_31_Channel_Id
value: 128
@@ -13,19 +13,19 @@ variables:
- name: NetCore_5_Dev_Channel_Id
value: 131
# .NET Eng - Validation
- name: Net_Eng_Validation_Channel_Id
# .NET Tools - Validation
- name: NetCore_Tools_Validation_Channel_Id
value: 9
# .NET Eng - Latest
- name: Net_Eng_Latest_Channel_Id
# .NET Tools - Latest
- name: NetCore_Tools_Latest_Channel_Id
value: 2
# .NET 3 Eng - Validation
- name: NET_3_Eng_Validation_Channel_Id
# .NET 3 Tools - Validation
- name: NETCore_3_Tools_Validation_Channel_Id
value: 390
# .NET 3 Eng
# .NET 3 Tools - Latest
- name: NetCore_3_Tools_Channel_Id
value: 344
@@ -49,10 +49,6 @@ variables:
- name: NetCore_31_Blazor_Features_Channel_Id
value: 531
# .NET Core Experimental
- name: NetCore_Experimental_Channel_Id
value: 562
# Whether the build is internal or not
- name: IsInternalBuild
value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }}
+95 -30
View File
@@ -137,8 +137,21 @@ stages:
dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'Net_Eng_Latest_Publish'
channelName: '.NET Eng - Latest'
stageName: 'NetCore_Dev31_Publish'
channelName: '.NET Core 3.1 Dev'
channelId: 128
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'NetCore_Tools_Latest_Publish'
channelName: '.NET Tools - Latest'
channelId: 2
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
@@ -150,13 +163,91 @@ stages:
dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'Net_Eng_Validation_Publish'
channelName: '.NET Eng - Validation'
stageName: 'PVR_Publish'
channelName: '.NET Tools - Validation'
channelId: 9
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'NetCore_3_Tools_Validation_Publish'
channelName: '.NET 3 Tools - Validation'
channelId: 390
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'NetCore_3_Tools_Publish'
channelName: '.NET 3 Tools'
channelId: 344
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'NetCore_Release30_Publish'
channelName: '.NET Core 3.0 Release'
channelId: 19
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-transport/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'NetCore_Release31_Publish'
channelName: '.NET Core 3.1 Release'
channelId: 129
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'NetCore_Blazor31_Features_Publish'
channelName: '.NET Core 3.1 Blazor Features'
channelId: 531
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'NetCore_30_Internal_Servicing_Publishing'
channelName: '.NET Core 3.0 Internal Servicing'
channelId: 184
transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
@@ -195,29 +286,3 @@ stages:
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'NET_Internal_Tooling_Publishing'
channelName: '.NET Internal Tooling'
channelId: 551
transportFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'NETCore_Experimental_Publishing'
channelName: '.NET Core Experimental'
channelId: 562
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental-symbols/nuget/v3/index.json'
+71 -77
View File
@@ -5,7 +5,7 @@
[bool]$ci = if (Test-Path variable:ci) { $ci } else { $false }
# Build configuration. Common values include 'Debug' and 'Release', but the repository may use other names.
[string]$configuration = if (Test-Path variable:configuration) { $configuration } else { 'Debug' }
[string]$configuration = if (Test-Path variable:configuration) { $configuration } else { "Debug" }
# Set to true to output binary log from msbuild. Note that emitting binary log slows down the build.
# Binary log must be enabled on CI.
@@ -24,7 +24,7 @@
[bool]$restore = if (Test-Path variable:restore) { $restore } else { $true }
# Adjusts msbuild verbosity level.
[string]$verbosity = if (Test-Path variable:verbosity) { $verbosity } else { 'minimal' }
[string]$verbosity = if (Test-Path variable:verbosity) { $verbosity } else { "minimal" }
# Set to true to reuse msbuild nodes. Recommended to not reuse on CI.
[bool]$nodeReuse = if (Test-Path variable:nodeReuse) { $nodeReuse } else { !$ci }
@@ -41,23 +41,23 @@
# Enable repos to use a particular version of the on-line dotnet-install scripts.
# default URL: https://dot.net/v1/dotnet-install.ps1
[string]$dotnetInstallScriptVersion = if (Test-Path variable:dotnetInstallScriptVersion) { $dotnetInstallScriptVersion } else { 'v1' }
[string]$dotnetInstallScriptVersion = if (Test-Path variable:dotnetInstallScriptVersion) { $dotnetInstallScriptVersion } else { "v1" }
# True to use global NuGet cache instead of restoring packages to repository-local directory.
[bool]$useGlobalNuGetCache = if (Test-Path variable:useGlobalNuGetCache) { $useGlobalNuGetCache } else { !$ci }
# An array of names of processes to stop on script exit if prepareMachine is true.
$processesToStopOnExit = if (Test-Path variable:processesToStopOnExit) { $processesToStopOnExit } else { @('msbuild', 'dotnet', 'vbcscompiler') }
$processesToStopOnExit = if (Test-Path variable:processesToStopOnExit) { $processesToStopOnExit } else { @("msbuild", "dotnet", "vbcscompiler") }
$disableConfigureToolsetImport = if (Test-Path variable:disableConfigureToolsetImport) { $disableConfigureToolsetImport } else { $null }
set-strictmode -version 2.0
$ErrorActionPreference = 'Stop'
$ErrorActionPreference = "Stop"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
function Create-Directory([string[]] $path) {
if (!(Test-Path $path)) {
New-Item -path $path -force -itemType 'Directory' | Out-Null
New-Item -path $path -force -itemType "Directory" | Out-Null
}
}
@@ -121,7 +121,7 @@ function InitializeDotNetCli([bool]$install) {
# Find the first path on %PATH% that contains the dotnet.exe
if ($useInstalledDotNetCli -and (-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -eq $null)) {
$dotnetCmd = Get-Command 'dotnet.exe' -ErrorAction SilentlyContinue
$dotnetCmd = Get-Command "dotnet.exe" -ErrorAction SilentlyContinue
if ($dotnetCmd -ne $null) {
$env:DOTNET_INSTALL_DIR = Split-Path $dotnetCmd.Path -Parent
}
@@ -134,13 +134,13 @@ function InitializeDotNetCli([bool]$install) {
if ((-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -ne $null) -and (Test-Path(Join-Path $env:DOTNET_INSTALL_DIR "sdk\$dotnetSdkVersion"))) {
$dotnetRoot = $env:DOTNET_INSTALL_DIR
} else {
$dotnetRoot = Join-Path $RepoRoot '.dotnet'
$dotnetRoot = Join-Path $RepoRoot ".dotnet"
if (-not (Test-Path(Join-Path $dotnetRoot "sdk\$dotnetSdkVersion"))) {
if ($install) {
InstallDotNetSdk $dotnetRoot $dotnetSdkVersion
} else {
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Unable to find dotnet with SDK version '$dotnetSdkVersion'"
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Unable to find dotnet with SDK version '$dotnetSdkVersion'"
ExitWithExitCode 1
}
}
@@ -163,7 +163,7 @@ function InitializeDotNetCli([bool]$install) {
}
function GetDotNetInstallScript([string] $dotnetRoot) {
$installScript = Join-Path $dotnetRoot 'dotnet-install.ps1'
$installScript = Join-Path $dotnetRoot "dotnet-install.ps1"
if (!(Test-Path $installScript)) {
Create-Directory $dotnetRoot
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
@@ -173,17 +173,17 @@ function GetDotNetInstallScript([string] $dotnetRoot) {
return $installScript
}
function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = '') {
function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = "") {
InstallDotNet $dotnetRoot $version $architecture
}
function InstallDotNet([string] $dotnetRoot,
[string] $version,
[string] $architecture = '',
[string] $runtime = '',
[string] $architecture = "",
[string] $runtime = "",
[bool] $skipNonVersionedFiles = $false,
[string] $runtimeSourceFeed = '',
[string] $runtimeSourceFeedKey = '') {
[string] $runtimeSourceFeed = "",
[string] $runtimeSourceFeedKey = "") {
$installScript = GetDotNetInstallScript $dotnetRoot
$installParameters = @{
@@ -199,7 +199,7 @@ function InstallDotNet([string] $dotnetRoot,
& $installScript @installParameters
}
catch {
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet runtime '$runtime' from public location."
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from public location."
# Only the runtime can be installed from a custom [private] location.
if ($runtime -and ($runtimeSourceFeed -or $runtimeSourceFeedKey)) {
@@ -215,7 +215,7 @@ function InstallDotNet([string] $dotnetRoot,
& $installScript @installParameters
}
catch {
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet runtime '$runtime' from custom location '$runtimeSourceFeed'."
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from custom location '$runtimeSourceFeed'."
}
}
}
@@ -238,16 +238,16 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
}
if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs }
$vsMinVersionStr = if ($vsRequirements.version) { $vsRequirements.version } else { '15.9' }
$vsMinVersionStr = if ($vsRequirements.version) { $vsRequirements.version } else { "15.9" }
$vsMinVersion = [Version]::new($vsMinVersionStr)
# Try msbuild command available in the environment.
if ($env:VSINSTALLDIR -ne $null) {
$msbuildCmd = Get-Command 'msbuild.exe' -ErrorAction SilentlyContinue
$msbuildCmd = Get-Command "msbuild.exe" -ErrorAction SilentlyContinue
if ($msbuildCmd -ne $null) {
# Workaround for https://github.com/dotnet/roslyn/issues/35793
# Due to this issue $msbuildCmd.Version returns 0.0.0.0 for msbuild.exe 16.2+
$msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split([char[]]@('-', '+'))[0])
$msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split(@('-', '+'))[0])
if ($msbuildVersion -ge $vsMinVersion) {
return $global:_MSBuildExe = $msbuildCmd.Path
@@ -267,7 +267,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
InitializeVisualStudioEnvironmentVariables $vsInstallDir $vsMajorVersion
} else {
if (Get-Member -InputObject $GlobalJson.tools -Name 'xcopy-msbuild') {
if (Get-Member -InputObject $GlobalJson.tools -Name "xcopy-msbuild") {
$xcopyMSBuildVersion = $GlobalJson.tools.'xcopy-msbuild'
$vsMajorVersion = $xcopyMSBuildVersion.Split('.')[0]
} else {
@@ -277,7 +277,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
$vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install
if ($vsInstallDir -eq $null) {
throw 'Unable to find Visual Studio that has required version and components installed'
throw "Unable to find Visual Studio that has required version and components installed"
}
}
@@ -301,7 +301,7 @@ function InstallXCopyMSBuild([string]$packageVersion) {
}
function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
$packageName = 'RoslynTools.MSBuild'
$packageName = "RoslynTools.MSBuild"
$packageDir = Join-Path $ToolsDir "msbuild\$packageVersion"
$packagePath = Join-Path $packageDir "$packageName.$packageVersion.nupkg"
@@ -317,7 +317,7 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
Unzip $packagePath $packageDir
}
return Join-Path $packageDir 'tools'
return Join-Path $packageDir "tools"
}
#
@@ -334,32 +334,32 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
# or $null if no instance meeting the requirements is found on the machine.
#
function LocateVisualStudio([object]$vsRequirements = $null){
if (Get-Member -InputObject $GlobalJson.tools -Name 'vswhere') {
if (Get-Member -InputObject $GlobalJson.tools -Name "vswhere") {
$vswhereVersion = $GlobalJson.tools.vswhere
} else {
$vswhereVersion = '2.5.2'
$vswhereVersion = "2.5.2"
}
$vsWhereDir = Join-Path $ToolsDir "vswhere\$vswhereVersion"
$vsWhereExe = Join-Path $vsWhereDir 'vswhere.exe'
$vsWhereExe = Join-Path $vsWhereDir "vswhere.exe"
if (!(Test-Path $vsWhereExe)) {
Create-Directory $vsWhereDir
Write-Host 'Downloading vswhere'
Write-Host "Downloading vswhere"
Invoke-WebRequest "https://github.com/Microsoft/vswhere/releases/download/$vswhereVersion/vswhere.exe" -OutFile $vswhereExe
}
if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs }
$args = @('-latest', '-prerelease', '-format', 'json', '-requires', 'Microsoft.Component.MSBuild', '-products', '*')
$args = @("-latest", "-prerelease", "-format", "json", "-requires", "Microsoft.Component.MSBuild", "-products", "*")
if (Get-Member -InputObject $vsRequirements -Name 'version') {
$args += '-version'
if (Get-Member -InputObject $vsRequirements -Name "version") {
$args += "-version"
$args += $vsRequirements.version
}
if (Get-Member -InputObject $vsRequirements -Name 'components') {
if (Get-Member -InputObject $vsRequirements -Name "components") {
foreach ($component in $vsRequirements.components) {
$args += '-requires'
$args += "-requires"
$args += $component
}
}
@@ -385,27 +385,27 @@ function InitializeBuildTool() {
# Initialize dotnet cli if listed in 'tools'
$dotnetRoot = $null
if (Get-Member -InputObject $GlobalJson.tools -Name 'dotnet') {
if (Get-Member -InputObject $GlobalJson.tools -Name "dotnet") {
$dotnetRoot = InitializeDotNetCli -install:$restore
}
if ($msbuildEngine -eq 'dotnet') {
if ($msbuildEngine -eq "dotnet") {
if (!$dotnetRoot) {
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "/global.json must specify 'tools.dotnet'."
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "/global.json must specify 'tools.dotnet'."
ExitWithExitCode 1
}
$buildTool = @{ Path = Join-Path $dotnetRoot 'dotnet.exe'; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'netcoreapp2.1' }
$buildTool = @{ Path = Join-Path $dotnetRoot "dotnet.exe"; Command = "msbuild"; Tool = "dotnet"; Framework = "netcoreapp2.1" }
} elseif ($msbuildEngine -eq "vs") {
try {
$msbuildPath = InitializeVisualStudioMSBuild -install:$restore
} catch {
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
Write-PipelineTelemetryError -Category "InitializeToolset" -Message $_
ExitWithExitCode 1
}
$buildTool = @{ Path = $msbuildPath; Command = ""; Tool = "vs"; Framework = "net472" }
} else {
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Unexpected value of -msbuildEngine: '$msbuildEngine'."
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Unexpected value of -msbuildEngine: '$msbuildEngine'."
ExitWithExitCode 1
}
@@ -414,15 +414,15 @@ function InitializeBuildTool() {
function GetDefaultMSBuildEngine() {
# Presence of tools.vs indicates the repo needs to build using VS msbuild on Windows.
if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') {
return 'vs'
if (Get-Member -InputObject $GlobalJson.tools -Name "vs") {
return "vs"
}
if (Get-Member -InputObject $GlobalJson.tools -Name 'dotnet') {
return 'dotnet'
if (Get-Member -InputObject $GlobalJson.tools -Name "dotnet") {
return "dotnet"
}
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'."
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'."
ExitWithExitCode 1
}
@@ -431,9 +431,9 @@ function GetNuGetPackageCachePath() {
# Use local cache on CI to ensure deterministic build,
# use global cache in dev builds to avoid cost of downloading packages.
if ($useGlobalNuGetCache) {
$env:NUGET_PACKAGES = Join-Path $env:UserProfile '.nuget\packages'
$env:NUGET_PACKAGES = Join-Path $env:UserProfile ".nuget\packages"
} else {
$env:NUGET_PACKAGES = Join-Path $RepoRoot '.packages'
$env:NUGET_PACKAGES = Join-Path $RepoRoot ".packages"
}
}
@@ -475,14 +475,14 @@ function InitializeToolset() {
}
if (-not $restore) {
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Toolset version $toolsetVersion has not been restored."
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Toolset version $toolsetVersion has not been restored."
ExitWithExitCode 1
}
$buildTool = InitializeBuildTool
$proj = Join-Path $ToolsetDir 'restore.proj'
$bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'ToolsetRestore.binlog') } else { '' }
$proj = Join-Path $ToolsetDir "restore.proj"
$bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "ToolsetRestore.binlog") } else { "" }
'<Project Sdk="Microsoft.DotNet.Arcade.Sdk"/>' | Set-Content $proj
@@ -504,7 +504,7 @@ function ExitWithExitCode([int] $exitCode) {
}
function Stop-Processes() {
Write-Host 'Killing running build processes...'
Write-Host "Killing running build processes..."
foreach ($processName in $processesToStopOnExit) {
Get-Process -Name $processName -ErrorAction SilentlyContinue | Stop-Process
}
@@ -521,7 +521,7 @@ function MSBuild() {
# Work around issues with Azure Artifacts credential provider
# https://github.com/dotnet/arcade/issues/3932
if ($ci -and $buildTool.Tool -eq 'dotnet') {
if ($ci -and $buildTool.Tool -eq "dotnet") {
dotnet nuget locals http-cache -c
$env:NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS = 20
@@ -532,7 +532,7 @@ function MSBuild() {
$toolsetBuildProject = InitializeToolset
$path = Split-Path -parent $toolsetBuildProject
$path = Join-Path $path (Join-Path $buildTool.Framework 'Microsoft.DotNet.Arcade.Sdk.dll')
$path = Join-Path $path (Join-Path $buildTool.Framework "Microsoft.DotNet.Arcade.Sdk.dll")
$args += "/logger:$path"
}
@@ -547,12 +547,12 @@ function MSBuild() {
function MSBuild-Core() {
if ($ci) {
if (!$binaryLog) {
Write-PipelineTelemetryError -Category 'Build' -Message 'Binary log must be enabled in CI build.'
Write-PipelineTaskError -Message "Binary log must be enabled in CI build."
ExitWithExitCode 1
}
if ($nodeReuse) {
Write-PipelineTelemetryError -Category 'Build' -Message 'Node reuse must be disabled in CI build.'
Write-PipelineTaskError -Message "Node reuse must be disabled in CI build."
ExitWithExitCode 1
}
}
@@ -562,10 +562,10 @@ function MSBuild-Core() {
$cmdArgs = "$($buildTool.Command) /m /nologo /clp:Summary /v:$verbosity /nr:$nodeReuse /p:ContinuousIntegrationBuild=$ci"
if ($warnAsError) {
$cmdArgs += ' /warnaserror /p:TreatWarningsAsErrors=true'
$cmdArgs += " /warnaserror /p:TreatWarningsAsErrors=true"
}
else {
$cmdArgs += ' /p:TreatWarningsAsErrors=false'
$cmdArgs += " /p:TreatWarningsAsErrors=false"
}
foreach ($arg in $args) {
@@ -577,7 +577,7 @@ function MSBuild-Core() {
$exitCode = Exec-Process $buildTool.Path $cmdArgs
if ($exitCode -ne 0) {
Write-PipelineTelemetryError Category 'Build' -Message 'Build failed.'
Write-PipelineTaskError -Message "Build failed."
$buildLog = GetMSBuildBinaryLogCommandLineArgument $args
if ($buildLog -ne $null) {
@@ -592,12 +592,12 @@ function GetMSBuildBinaryLogCommandLineArgument($arguments) {
foreach ($argument in $arguments) {
if ($argument -ne $null) {
$arg = $argument.Trim()
if ($arg.StartsWith('/bl:', "OrdinalIgnoreCase")) {
return $arg.Substring('/bl:'.Length)
if ($arg.StartsWith("/bl:", "OrdinalIgnoreCase")) {
return $arg.Substring("/bl:".Length)
}
if ($arg.StartsWith('/binaryLogger:', 'OrdinalIgnoreCase')) {
return $arg.Substring('/binaryLogger:'.Length)
if ($arg.StartsWith("/binaryLogger:", "OrdinalIgnoreCase")) {
return $arg.Substring("/binaryLogger:".Length)
}
}
}
@@ -607,14 +607,14 @@ function GetMSBuildBinaryLogCommandLineArgument($arguments) {
. $PSScriptRoot\pipeline-logging-functions.ps1
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot '..\..')
$EngRoot = Resolve-Path (Join-Path $PSScriptRoot '..')
$ArtifactsDir = Join-Path $RepoRoot 'artifacts'
$ToolsetDir = Join-Path $ArtifactsDir 'toolset'
$ToolsDir = Join-Path $RepoRoot '.tools'
$LogDir = Join-Path (Join-Path $ArtifactsDir 'log') $configuration
$TempDir = Join-Path (Join-Path $ArtifactsDir 'tmp') $configuration
$GlobalJson = Get-Content -Raw -Path (Join-Path $RepoRoot 'global.json') | ConvertFrom-Json
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..")
$EngRoot = Resolve-Path (Join-Path $PSScriptRoot "..")
$ArtifactsDir = Join-Path $RepoRoot "artifacts"
$ToolsetDir = Join-Path $ArtifactsDir "toolset"
$ToolsDir = Join-Path $RepoRoot ".tools"
$LogDir = Join-Path (Join-Path $ArtifactsDir "log") $configuration
$TempDir = Join-Path (Join-Path $ArtifactsDir "tmp") $configuration
$GlobalJson = Get-Content -Raw -Path (Join-Path $RepoRoot "global.json") | ConvertFrom-Json
# true if global.json contains a "runtimes" section
$globalJsonHasRuntimes = if ($GlobalJson.tools.PSObject.Properties.Name -Match 'runtimes') { $true } else { $false }
@@ -631,14 +631,8 @@ Write-PipelineSetVariable -Name 'TMP' -Value $TempDir
# Import custom tools configuration, if present in the repo.
# Note: Import in global scope so that the script set top-level variables without qualification.
if (!$disableConfigureToolsetImport) {
$configureToolsetScript = Join-Path $EngRoot 'configure-toolset.ps1'
$configureToolsetScript = Join-Path $EngRoot "configure-toolset.ps1"
if (Test-Path $configureToolsetScript) {
. $configureToolsetScript
if ((Test-Path variable:failOnConfigureToolsetError) -And $failOnConfigureToolsetError) {
if ((Test-Path variable:LastExitCode) -And ($LastExitCode -ne 0)) {
Write-PipelineTelemetryError -Category 'Build' -Message 'configure-toolset.ps1 returned a non-zero exit code'
ExitWithExitCode $LastExitCode
}
}
. $configureToolsetScript
}
}
+7 -6
View File
@@ -4,6 +4,7 @@
# CI mode - set to true on CI server for PR validation build or official build.
ci=${ci:-false}
disable_configure_toolset_import=${disable_configure_toolset_import:-}
# Set to true to use the pipelines logger which will enable Azure logging output.
# https://github.com/Microsoft/azure-pipelines-tasks/blob/master/docs/authoring/commands.md
@@ -81,7 +82,7 @@ function ReadGlobalVersion {
local pattern="\"$key\" *: *\"(.*)\""
if [[ ! $line =~ $pattern ]]; then
Write-PipelineTelemetryError -category 'Build' "Error: Cannot find \"$key\" in $global_json_file"
Write-PipelineTelemetryError -category 'InitializeToolset' "Error: Cannot find \"$key\" in $global_json_file"
ExitWithExitCode 1
fi
@@ -324,7 +325,7 @@ function InitializeToolset {
local toolset_build_proj=`cat "$toolset_location_file"`
if [[ ! -a "$toolset_build_proj" ]]; then
Write-PipelineTelemetryError -category 'Build' "Invalid toolset path: $toolset_build_proj"
Write-PipelineTelemetryError -category 'InitializeToolset' "Invalid toolset path: $toolset_build_proj"
ExitWithExitCode 3
fi
@@ -374,12 +375,12 @@ function MSBuild {
function MSBuild-Core {
if [[ "$ci" == true ]]; then
if [[ "$binary_log" != true ]]; then
Write-PipelineTelemetryError -category 'Build' "Binary log must be enabled in CI build."
Write-PipelineTaskError "Binary log must be enabled in CI build."
ExitWithExitCode 1
fi
if [[ "$node_reuse" == true ]]; then
Write-PipelineTelemetryError -category 'Build' "Node reuse must be disabled in CI build."
Write-PipelineTaskError "Node reuse must be disabled in CI build."
ExitWithExitCode 1
fi
fi
@@ -393,7 +394,7 @@ function MSBuild-Core {
"$_InitializeBuildTool" "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@" || {
local exit_code=$?
Write-PipelineTelemetryError -category 'Build' "Build failed (exit code '$exit_code')."
Write-PipelineTaskError "Build failed (exit code '$exit_code')."
ExitWithExitCode $exit_code
}
}
@@ -436,7 +437,7 @@ Write-PipelineSetVariable -name "Temp" -value "$temp_dir"
Write-PipelineSetVariable -name "TMP" -value "$temp_dir"
# Import custom tools configuration, if present in the repo.
if [ -z "${disable_configure_toolset_import:-}" ]; then
if [[ -z "$disable_configure_toolset_import" ]]; then
configure_toolset_script="$eng_root/configure-toolset.sh"
if [[ -a "$configure_toolset_script" ]]; then
. "$configure_toolset_script"
+1 -1
+1 -1
+2 -2
View File
@@ -3,7 +3,7 @@
"dotnet": "5.0.100-alpha1-014854"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19608.1",
"Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.19608.1"
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19567.2",
"Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.19567.2"
}
}
-102
View File
@@ -1,102 +0,0 @@
# Usage:
# AC_MONO_OUTPUT()
#
# Generates the output files used by Mono.
#
AC_DEFUN([AC_MONO_OUTPUT], [
AC_CONFIG_FILES([po/mcs/Makefile.in])
AC_CONFIG_FILES([acceptance-tests/microbench-perf.sh], [chmod +x acceptance-tests/microbench-perf.sh])
AC_CONFIG_FILES([runtime/mono-wrapper], [chmod +x runtime/mono-wrapper])
AC_CONFIG_FILES([runtime/monodis-wrapper], [chmod +x runtime/monodis-wrapper])
AC_CONFIG_FILES([runtime/bin/mono-hang-watchdog], [chmod +x runtime/bin/mono-hang-watchdog])
AC_OUTPUT([
Makefile
llvm/Makefile
mono/Makefile
mono/btls/Makefile
mono/native/Makefile
mono/utils/Makefile
mono/metadata/Makefile
mono/zlib/Makefile
mono/dis/Makefile
mono/cil/Makefile
mono/arch/Makefile
mono/arch/x86/Makefile
mono/arch/amd64/Makefile
mono/arch/ppc/Makefile
mono/arch/sparc/Makefile
mono/arch/s390x/Makefile
mono/arch/arm/Makefile
mono/arch/arm64/Makefile
mono/arch/mips/Makefile
mono/arch/riscv/Makefile
mono/sgen/Makefile
mono/native/platform-type.c
mono/native/platform-type-compat.c
mono/native/platform-type-unified.c
mono/tests/Makefile
mono/tests/assembly-load-reference/Makefile
mono/tests/tests-config
mono/tests/gc-descriptors/Makefile
mono/tests/testing_gac/Makefile
mono/tests/fullaot-mixed/Makefile
mono/tests/llvmonly-mixed/Makefile
mono/unit-tests/Makefile
mono/benchmark/Makefile
mono/mini/Makefile
mono/profiler/Makefile
mono/eglib/Makefile
mono/eglib/eglib-config.h
mono/eglib/test/Makefile
m4/Makefile
msvc/Makefile
mono/utils/jemalloc/Makefile
mono-uninstalled.pc
acceptance-tests/Makefile
scripts/mono-find-provides
scripts/mono-find-requires
ikvm-native/Makefile
scripts/Makefile
man/Makefile
docs/Makefile
data/Makefile
data/net_2_0/Makefile
data/net_4_0/Makefile
data/net_4_5/Makefile
data/net_2_0/Browsers/Makefile
data/net_4_0/Browsers/Makefile
data/net_4_5/Browsers/Makefile
data/mint.pc
data/mono-2.pc
data/monosgen-2.pc
data/mono.pc
data/mono-cairo.pc
data/mono-options.pc
data/mono-lineeditor.pc
data/monodoc.pc
data/dotnet.pc
data/dotnet35.pc
data/wcf.pc
data/cecil.pc
data/system.web.extensions_1.0.pc
data/system.web.extensions.design_1.0.pc
data/system.web.mvc.pc
data/system.web.mvc2.pc
data/system.web.mvc3.pc
data/aspnetwebstack.pc
data/reactive.pc
samples/Makefile
support/Makefile
data/config
tools/Makefile
tools/locale-builder/Makefile
tools/sgen/Makefile
tools/pedump/Makefile
tools/mono-hang-watchdog/Makefile
runtime/Makefile
po/Makefile
netcore/corerun/Makefile
])
])
@@ -43,16 +43,33 @@ namespace Mono.Messaging.RabbitMQ {
public class RabbitMQMessagingProvider : IMessagingProvider {
private int txCounter = 0;
private readonly Guid localId;
private readonly uint localIp;
private readonly MessagingContextPool contextPool;
public RabbitMQMessagingProvider ()
{
localId = Guid.NewGuid ();
localIp = GetLocalIP ();
contextPool = new MessagingContextPool (new MessageFactory (this),
CreateConnection);
}
private static uint GetLocalIP ()
{
String strHostName = Dns.GetHostName ();
IPHostEntry ipEntry = Dns.GetHostByName (strHostName);
foreach (IPAddress ip in ipEntry.AddressList) {
if (AddressFamily.InterNetwork == ip.AddressFamily) {
byte[] addr = ip.GetAddressBytes ();
uint localIP = 0;
for (int i = 0; i < 4 && i < addr.Length; i++) {
localIP += (uint) (addr[i] << 8 * (3 - i));
}
return localIP;
}
}
return 0;
}
public IMessage CreateMessage ()
{
return new MessageBase ();
@@ -61,7 +78,7 @@ namespace Mono.Messaging.RabbitMQ {
public IMessageQueueTransaction CreateMessageQueueTransaction ()
{
Interlocked.Increment (ref txCounter);
string txId = localId.ToString () + "_" + txCounter.ToString ();
string txId = localIp.ToString () + txCounter.ToString ();
return new RabbitMQMessageQueueTransaction (txId, contextPool);
}
@@ -86,8 +86,8 @@ namespace Mono.Security {
Buffer.BlockCopy (data, (2 + nLenLength), m_aValue, 0, nLength);
if ((m_nTag & 0x20) == 0x20) {
int nStart = 0;
Decode (m_aValue, ref nStart, m_aValue.Length);
int nStart = (2 + nLenLength);
Decode (data, ref nStart, data.Length);
}
}
@@ -312,7 +312,7 @@ namespace Mono.Security {
public override string ToString()
{
StringBuilder hexLine = new StringBuilder ();
// Add tag
hexLine.AppendFormat ("Tag: {0} {1}", m_nTag.ToString ("X2"), Environment.NewLine);
@@ -78,8 +78,8 @@ namespace System.Net.Http
}
public bool UseProxy {
get => throw new PlatformNotSupportedException ("Property UseProxy is not supported.");
set => throw new PlatformNotSupportedException ("Property UseProxy is not supported.");
get => throw new PlatformNotSupportedException ("Property AutomaticDecompression is not supported.");
set => throw new PlatformNotSupportedException ("Property AutomaticDecompression is not supported.");
}
public IWebProxy Proxy {
@@ -132,7 +132,7 @@ namespace System.Net.Http
set => throw new PlatformNotSupportedException ("Property MaxRequestContentBufferSize is not supported.");
}
public IDictionary<string, object> Properties => throw new PlatformNotSupportedException ("Property Properties is not supported.");
public IDictionary<string, object> Properties => throw new PlatformNotSupportedException ();
public static Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> DangerousAcceptAnyServerCertificateValidator { get; } = delegate { return true; };
@@ -30,10 +30,7 @@ namespace MonoTests.Remoting
{
try
{
Hashtable tcpOptions = new Hashtable ();
tcpOptions ["port"] = 0;
tcpOptions ["bindTo"] = "127.0.0.1";
tcp = new TcpChannel (tcpOptions, null, null);
tcp = new TcpChannel (0);
Hashtable options = new Hashtable ();
options ["timeout"] = 10000; // 10s
@@ -45,8 +42,8 @@ namespace MonoTests.Remoting
AppDomain domain = BaseCallTest.CreateDomain ("testdomain_activation");
server = (ActivationServer) domain.CreateInstanceAndUnwrap(GetType().Assembly.FullName,"MonoTests.Remoting.ActivationServer");
var tcpUrlPrefix = $"tcp://127.0.0.1:{server.TcpPort}";
var httpUrlPrefix = $"http://127.0.0.1:{server.HttpPort}";
var tcpUrlPrefix = $"tcp://localhost:{server.TcpPort}";
var httpUrlPrefix = $"http://localhost:{server.HttpPort}";
RemotingConfiguration.RegisterActivatedClientType (typeof(CaObject1), tcpUrlPrefix);
RemotingConfiguration.RegisterActivatedClientType (typeof(CaObject2), httpUrlPrefix);
RemotingConfiguration.RegisterWellKnownClientType (typeof(WkObjectSinglecall1), tcpUrlPrefix + "/wkoSingleCall1");
@@ -172,14 +169,8 @@ namespace MonoTests.Remoting
{
TcpPort = NetworkHelpers.FindFreePort ();
HttpPort = NetworkHelpers.FindFreePort ();
IDictionary tcpProps = new Hashtable ();
IDictionary httpProps = new Hashtable ();
tcpProps ["port"] = TcpPort;
tcpProps ["bindTo"] = "127.0.0.1";
httpProps ["port"] = HttpPort;
httpProps ["bindTo"] = "127.0.0.1";
tcp = new TcpChannel (tcpProps, null, null);
http = new HttpChannel (httpProps, null, null);
tcp = new TcpChannel (TcpPort);
http = new HttpChannel (HttpPort);
ChannelServices.RegisterChannel (tcp);
ChannelServices.RegisterChannel (http);
@@ -172,7 +172,6 @@ namespace MonoTests.Remoting
IDictionary props = new Hashtable ();
props ["name"] = Guid.NewGuid ().ToString("N");
props ["port"] = port;
props ["bindTo"] = "127.0.0.1";
TcpChannel chan = new TcpChannel (props, null, null);
ChannelServices.RegisterChannel (chan);
@@ -20,15 +20,11 @@ namespace MonoTests.Remoting.Http
[Ignore ("This test somehow keeps http channel registered and then blocks any further http tests working. This also happens under .NET, so this test itself is wrong with nunit 2.4.8.")]
public void Test ()
{
var port = NetworkHelpers.FindFreePort ();
Hashtable props = new Hashtable ();
props["port"] = port;
props["bindTo"] = "127.0.0.1";
new HttpChannel (props, null, null);
new HttpChannel (8086);
RemotingServices.Marshal (new Service (), "test");
Service remObj = (Service) RemotingServices.Connect (
typeof (Service), $"http://127.0.0.1:{port}/test");
typeof (Service), "http://localhost:8086/test");
ArrayList list;
remObj.Test (out list);
@@ -74,16 +70,13 @@ namespace MonoTests.Remoting.Http
public void Main ()
{
var port = NetworkHelpers.FindFreePort ();
Hashtable props = new Hashtable ();
props["port"] = port;
props["bindTo"] = "127.0.0.1";
channel = new HttpChannel (props, null, null);
channel = new HttpChannel (port);
ChannelServices.RegisterChannel (channel);
RemotingConfiguration.RegisterWellKnownServiceType
(typeof (Bug321420),"Server.soap", WellKnownObjectMode.Singleton);
Bug321420 s = (Bug321420) Activator.GetObject (typeof
(Bug321420), $"http://127.0.0.1:{port}/Server.soap");
(Bug321420), $"http://localhost:{port}/Server.soap");
// this works: s.Method ("a", "b");
s.Method ("a", "a");
@@ -108,7 +101,7 @@ namespace MonoTests.Remoting.Http
public void Main ()
{
Foo foo = (Foo) Activator.GetObject (typeof (Foo),
$"http://127.0.0.1:{server.HttpPort}/Test");
$"http://localhost:{server.HttpPort}/Test");
Bar bar = foo.Login ();
if (bar != null)
@@ -153,10 +146,7 @@ namespace MonoTests.Remoting.Http
public void Start ()
{
HttpPort = NetworkHelpers.FindFreePort ();
Hashtable props = new Hashtable ();
props["port"] = HttpPort;
props["bindTo"] = "127.0.0.1";
c = new HttpChannel (props, null, null);
c = new HttpChannel (HttpPort);
ChannelServices.RegisterChannel (c);
Type t = typeof(Foo);
@@ -184,14 +174,11 @@ namespace MonoTests.Remoting.Http
[Test]
public void Main ()
{
Hashtable props = new Hashtable ();
props["port"] = 0;
props["bindTo"] = "127.0.0.1";
channel = new HttpChannel (props, null, null);
channel = new HttpChannel (0);
ChannelServices.RegisterChannel (channel);
MarshalByRefObject obj = (MarshalByRefObject) RemotingServices.Connect (
typeof (IFactorial),
$"http://127.0.0.1:{server.HttpPort}/MyEndPoint");
$"http://localhost:{server.HttpPort}/MyEndPoint");
IFactorial cal = (IFactorial) obj;
Assert.AreEqual (cal.CalculateFactorial (4), 24);
}
@@ -229,10 +216,7 @@ namespace MonoTests.Remoting.Http
public void Start ()
{
HttpPort = NetworkHelpers.FindFreePort ();
Hashtable props = new Hashtable ();
props["port"] = HttpPort;
props["bindTo"] = "127.0.0.1";
c = new HttpChannel (props, null, null);
c = new HttpChannel (HttpPort);
ChannelServices.RegisterChannel (c);
Type t = typeof(Calculator);
@@ -294,7 +294,6 @@ namespace MonoTests.Remoting
IDictionary props = new Hashtable ();
props ["name"] = objMarshal.Uri;
props ["port"] = port;
props ["bindTo"] = "127.0.0.1";
TcpChannel chn = new TcpChannel (props, null, null);
ChannelServices.RegisterChannel (chn);
@@ -318,7 +317,6 @@ namespace MonoTests.Remoting
IDictionary props = new Hashtable ();
props ["name"] = objMarshal.Uri;
props ["port"] = port;
props ["bindTo"] = "127.0.0.1";
TcpChannel chn = new TcpChannel (props, null, null);
ChannelServices.RegisterChannel (chn);
@@ -348,10 +346,7 @@ namespace MonoTests.Remoting
public void ExecuteMessage ()
{
var port = NetworkHelpers.FindFreePort ();
IDictionary props = new Hashtable ();
props ["port"] = port;
props ["bindTo"] = "127.0.0.1";
TcpChannel chn = new TcpChannel (props, null, null);
TcpChannel chn = new TcpChannel (port);
ChannelServices.RegisterChannel (chn);
try {
MarshalObject objMarshal = NewMarshalObject ();
@@ -384,10 +379,7 @@ namespace MonoTests.Remoting
public void IsOneWay ()
{
var port = NetworkHelpers.FindFreePort ();
IDictionary props = new Hashtable ();
props ["port"] = port;
props ["bindTo"] = "127.0.0.1";
TcpChannel chn = new TcpChannel (props, null, null);
TcpChannel chn = new TcpChannel (port);
ChannelServices.RegisterChannel (chn);
try {
RemotingConfiguration.RegisterWellKnownServiceType (typeof (MarshalObject), "MarshalObject.rem", WellKnownObjectMode.Singleton);
@@ -411,10 +403,7 @@ namespace MonoTests.Remoting
public void GetObjRefForProxy ()
{
var port = NetworkHelpers.FindFreePort ();
IDictionary props = new Hashtable ();
props ["port"] = port;
props ["bindTo"] = "127.0.0.1";
TcpChannel chn = new TcpChannel (props, null, null);
TcpChannel chn = new TcpChannel (port);
ChannelServices.RegisterChannel (chn);
try {
// Register le factory as a SAO
@@ -438,10 +427,7 @@ namespace MonoTests.Remoting
public void GetRealProxy ()
{
var port = NetworkHelpers.FindFreePort ();
IDictionary props = new Hashtable ();
props ["port"] = port;
props ["bindTo"] = "127.0.0.1";
TcpChannel chn = new TcpChannel (props, null, null);
TcpChannel chn = new TcpChannel (port);
ChannelServices.RegisterChannel (chn);
try {
RemotingConfiguration.RegisterWellKnownServiceType (typeof (MarshalObject), "MonoTests.System.Runtime.Remoting.RemotingServicesTest.MarshalObject.soap", WellKnownObjectMode.Singleton);
@@ -463,10 +449,7 @@ namespace MonoTests.Remoting
public void SetObjectUriForMarshal ()
{
var port = NetworkHelpers.FindFreePort ();
IDictionary props = new Hashtable ();
props ["port"] = port;
props ["bindTo"] = "127.0.0.1";
TcpChannel chn = new TcpChannel (props, null, null);
TcpChannel chn = new TcpChannel (port);
ChannelServices.RegisterChannel (chn);
try {
MarshalObject objRem = NewMarshalObject ();
@@ -486,10 +469,7 @@ namespace MonoTests.Remoting
public void GetServeurTypeForUri ()
{
var port = NetworkHelpers.FindFreePort ();
IDictionary props = new Hashtable ();
props ["port"] = port;
props ["bindTo"] = "127.0.0.1";
TcpChannel chn = new TcpChannel (props, null, null);
TcpChannel chn = new TcpChannel (port);
Type type = typeof (MarshalObject);
ChannelServices.RegisterChannel (chn);
try {
@@ -511,10 +491,7 @@ namespace MonoTests.Remoting
public void IsObjectOutOf ()
{
var port = NetworkHelpers.FindFreePort ();
IDictionary props = new Hashtable ();
props ["port"] = port;
props ["bindTo"] = "127.0.0.1";
TcpChannel chn = new TcpChannel (props, null, null);
TcpChannel chn = new TcpChannel (port);
ChannelServices.RegisterChannel (chn);
try {
RemotingConfiguration.RegisterWellKnownServiceType (typeof (MarshalObject), "MarshalObject2.rem", WellKnownObjectMode.Singleton);
@@ -537,10 +514,7 @@ namespace MonoTests.Remoting
{
var port = NetworkHelpers.FindFreePort ();
RemotingConfiguration.ApplicationName = "app";
IDictionary props = new Hashtable ();
props ["port"] = port;
props ["bindTo"] = "127.0.0.1";
TcpChannel chn = new TcpChannel (props, null, null);
TcpChannel chn = new TcpChannel (port);
ChannelServices.RegisterChannel (chn);
try {
RemotingConfiguration.RegisterWellKnownServiceType (typeof (MarshalObject), "obj3.rem", WellKnownObjectMode.Singleton);
@@ -567,10 +541,7 @@ namespace MonoTests.Remoting
public void GetObjectWithChannelDataTest ()
{
var port = NetworkHelpers.FindFreePort ();
IDictionary props = new Hashtable ();
props ["port"] = port;
props ["bindTo"] = "127.0.0.1";
TcpChannel chn = new TcpChannel (props, null, null);
TcpChannel chn = new TcpChannel (port);
ChannelServices.RegisterChannel (chn);
try {
RemotingConfiguration.RegisterWellKnownServiceType (typeof (MarshalObject), "getobjectwithchanneldata.rem", WellKnownObjectMode.Singleton);
@@ -7,7 +7,6 @@
//
using System;
using System.Collections;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
@@ -56,18 +55,12 @@ namespace MonoTests.Remoting
{
public override IChannelSender CreateClientChannel ()
{
Hashtable props = new Hashtable ();
props["port"] = 0;
props["bindTo"] = "127.0.0.1";
return new TcpChannel (props, null, null);
return new TcpChannel (0);
}
public override IChannelReceiver CreateServerChannel ()
{
Hashtable props = new Hashtable ();
props["port"] = 0;
props["bindTo"] = "127.0.0.1";
return new TcpChannel (props, null, null);
return new TcpChannel (0);
}
}
}
@@ -92,16 +92,14 @@ namespace System.Windows.Forms {
#region Protected Methods
protected override void OnClick (EventArgs e)
{
Form p = FindForm ();
if (p != null) {
p.dialog_result_changed = false; // manages the case where the DialogResult of the form is overriden in the button click event.
base.OnClick (e);
if (dialog_result != DialogResult.None && !p.dialog_result_changed) {
if (dialog_result != DialogResult.None) {
Form p = FindForm ();
if (p != null)
p.DialogResult = dialog_result;
}
} else {
base.OnClick (e);
}
base.OnClick (e);
}
protected override void OnFontChanged (EventArgs e)
@@ -1695,7 +1695,7 @@ namespace System.Windows.Forms
}
}
void SetSelectedIndex (int value, bool supressAutoScroll, bool triggerEvents = true)
void SetSelectedIndex (int value, bool supressAutoScroll)
{
if (selected_index == value)
return;
@@ -1718,11 +1718,9 @@ namespace System.Windows.Forms
if (listbox_ctrl != null)
listbox_ctrl.HighlightedIndex = value;
if (triggerEvents) {
OnSelectedValueChanged (EventArgs.Empty);
OnSelectedIndexChanged (EventArgs.Empty);
OnSelectedItemChanged (EventArgs.Empty);
}
OnSelectedValueChanged (EventArgs.Empty);
OnSelectedIndexChanged (EventArgs.Empty);
OnSelectedItemChanged (EventArgs.Empty);
}
// If no item is currently selected, and an item is found matching the text
@@ -2136,7 +2134,9 @@ namespace System.Windows.Forms
throw new ArgumentOutOfRangeException ("index");
if (index < owner.SelectedIndex)
owner.SetSelectedIndex (owner.SelectedIndex - 1, false, false);
--owner.SelectedIndex;
else if (index == owner.SelectedIndex)
owner.SelectedIndex = -1;
object removed = object_items [index];
@@ -2589,16 +2589,6 @@ namespace System.Windows.Forms
if (!pea.Handled)
OnPaint (pea);
}
// Call DrawToBitmap for all children of the control
for (int i=0; i < child_controls.Count; i++) {
Rectangle childRect = child_controls[i].ClientRectangle;
Bitmap childBitmap = new Bitmap (childRect.Width, childRect.Height);
child_controls[i].DrawToBitmap (childBitmap, childRect);
g.DrawImage (childBitmap, new Rectangle (child_controls[i].Location, child_controls[i].Size));
}
}
}
@@ -5377,12 +5367,6 @@ namespace System.Windows.Forms
}
private void WmMButtonUp (ref Message m) {
// Menu handle.
if (XplatUI.IsEnabled (Handle) && active_tracker != null) {
ProcessActiveTracker (ref m);
return;
}
MouseEventArgs me;
me = new MouseEventArgs (FromParamToMouseButtons ((int) m.WParam.ToInt32()) | MouseButtons.Middle,
@@ -5401,12 +5385,6 @@ namespace System.Windows.Forms
}
private void WmMButtonDown (ref Message m) {
// Menu handle.
if (XplatUI.IsEnabled (Handle) && active_tracker != null) {
ProcessActiveTracker (ref m);
return;
}
InternalCapture = true;
OnMouseDown (new MouseEventArgs (FromParamToMouseButtons ((int) m.WParam.ToInt32()),
mouse_clicks, LowOrder ((int) m.LParam.ToInt32 ()), HighOrder ((int) m.LParam.ToInt32 ()),
@@ -108,7 +108,6 @@ namespace System.Windows.Forms {
cell.defaultNewRowValue = this.defaultNewRowValue;
cell.description = this.description;
cell.valueIsIcon = this.valueIsIcon;
cell.imageLayout = this.imageLayout;
return cell;
}
@@ -56,7 +56,6 @@ namespace System.Windows.Forms
clone.linkBehavior = this.linkBehavior;
clone.visited_link_color = this.visited_link_color;
clone.trackVisitedState = this.trackVisitedState;
clone.useColumnTextForLinkValue = this.useColumnTextForLinkValue;
return clone;
}
@@ -77,8 +77,7 @@ namespace System.Windows.Forms
throw new InvalidOperationException ("CellTemplate is null when getting this property.");
template.ActiveLinkColor = value;
if (DataGridView == null)
return;
foreach (DataGridViewRow row in DataGridView.Rows) {
DataGridViewLinkCell cell = row.Cells[Index] as DataGridViewLinkCell;
if (cell != null)
@@ -114,8 +113,6 @@ namespace System.Windows.Forms
throw new InvalidOperationException ("CellTemplate is null when getting this property.");
template.LinkBehavior = value;
if (DataGridView == null)
return;
foreach (DataGridViewRow row in DataGridView.Rows)
{
DataGridViewLinkCell cell = row.Cells[Index] as DataGridViewLinkCell;
@@ -140,8 +137,6 @@ namespace System.Windows.Forms
if (template == null)
throw new InvalidOperationException ("CellTemplate is null when getting this property.");
template.LinkColor = value;
if (DataGridView == null)
return;
foreach (DataGridViewRow row in DataGridView.Rows)
{
DataGridViewLinkCell cell = row.Cells[Index] as DataGridViewLinkCell;
@@ -155,20 +150,20 @@ namespace System.Windows.Forms
[DefaultValue ((string) null)]
public string Text {
get {
DataGridViewLinkCell template = CellTemplate as DataGridViewLinkCell;
if (template == null)
throw new InvalidOperationException ("CellTemplate is null when getting this property.");
return text;
}
set {
if (this.Text == value)
return;
DataGridViewLinkCell template = CellTemplate as DataGridViewLinkCell;
if (template == null)
throw new InvalidOperationException ("CellTemplate is null when getting this property.");
//TODO : sets the Text property of every cell in the column
//TODO only if UseColumnTextForLinkValue is true
text = value;
if (DataGridView == null)
return;
foreach (DataGridViewRow row in DataGridView.Rows)
{
DataGridViewLinkCell cell = row.Cells[Index] as DataGridViewLinkCell;
if (cell != null && cell.UseColumnTextForLinkValue)
cell.Value = value;
}
DataGridView.InvalidateColumn (Index);
}
}
@@ -189,8 +184,6 @@ namespace System.Windows.Forms
if (template == null)
throw new InvalidOperationException ("CellTemplate is null when getting this property.");
template.TrackVisitedState = value;
if (DataGridView == null)
return;
foreach (DataGridViewRow row in DataGridView.Rows)
{
DataGridViewLinkCell cell = row.Cells[Index] as DataGridViewLinkCell;
@@ -217,8 +210,6 @@ namespace System.Windows.Forms
if (template == null)
throw new InvalidOperationException ("CellTemplate is null when getting this property.");
template.UseColumnTextForLinkValue = value;
if (DataGridView == null)
return;
foreach (DataGridViewRow row in DataGridView.Rows)
{
DataGridViewLinkCell cell = row.Cells[Index] as DataGridViewLinkCell;
@@ -244,8 +235,6 @@ namespace System.Windows.Forms
if (template == null)
throw new InvalidOperationException ("CellTemplate is null when getting this property.");
template.VisitedLinkColor = value;
if (DataGridView == null)
return;
foreach (DataGridViewRow row in DataGridView.Rows)
{
DataGridViewLinkCell cell = row.Cells[Index] as DataGridViewLinkCell;
@@ -356,7 +356,6 @@ namespace System.Windows.Forms
{
DataGridViewRow row = (DataGridViewRow)MemberwiseClone ();
row.DefaultCellStyle = (DataGridViewCellStyle)DefaultCellStyle.Clone ();
row.HeaderCell = (DataGridViewRowHeaderCell)HeaderCell.Clone ();
row.SetIndex (-1);
@@ -102,7 +102,6 @@ namespace System.Windows.Forms {
private bool autoscale_base_size_set;
internal ArrayList disabled_by_showdialog = new ArrayList();
internal static ArrayList modal_dialogs = new ArrayList();
internal bool dialog_result_changed;
#endregion // Local Variables
#region Private & Internal Methods
@@ -638,7 +637,6 @@ namespace System.Windows.Forms {
typeof (DialogResult));
dialog_result = value;
dialog_result_changed = true;
if (dialog_result != DialogResult.None && is_modal)
RaiseCloseEvents (false, false); // .Net doesn't send WM_CLOSE here.
}
@@ -26,9 +26,7 @@
// NOT COMPLETE
using System.Collections.Generic;
using System.Globalization;
using System.Runtime.InteropServices;
namespace System.Windows.Forms {
public sealed class InputLanguage {
@@ -39,15 +37,6 @@ namespace System.Windows.Forms {
private static InputLanguage current_input;
private static InputLanguage default_input;
#region user32.dll functions
[DllImport("user32", CharSet = CharSet.Auto)]
private static extern IntPtr GetKeyboardLayout(UInt32 idThread);
[DllImport("user32", CharSet = CharSet.Auto)]
private static extern Int32 GetKeyboardLayoutList(Int32 nBuff, IntPtr[] lpList);
#endregion // user32.dll functions
#region Private Constructor
[MonoInternalNote ("Pull Microsofts InputLanguages and enter them here")]
internal InputLanguage()
@@ -86,23 +75,9 @@ namespace System.Windows.Forms {
public static InputLanguageCollection InstalledInputLanguages {
get {
if (all == null) {
List<InputLanguage> inputLanguageList = new List<InputLanguage>();
if (Environment.OSVersion.Platform == PlatformID.Win32NT) {
var keyboardLayoutCount = GetKeyboardLayoutList (0, null);
var keyboardLayoutIds = new IntPtr[keyboardLayoutCount];
GetKeyboardLayoutList (keyboardLayoutCount, keyboardLayoutIds);
if (all == null)
all = new InputLanguageCollection (new InputLanguage[] { new InputLanguage (IntPtr.Zero, new CultureInfo(string.Empty), "US") });
foreach (var keyboardLayoutId in keyboardLayoutIds) {
var languageId = (Int32)keyboardLayoutId & 0xFFFF;
CultureInfo cultureInfo = CultureInfo.GetCultureInfo (languageId);
inputLanguageList.Add (new InputLanguage (IntPtr.Zero, cultureInfo, cultureInfo.Name));
}
}
if (inputLanguageList.Count == 0)
inputLanguageList.Add (new InputLanguage (IntPtr.Zero, new CultureInfo(string.Empty), "US"));
all = new InputLanguageCollection (inputLanguageList.ToArray());
}
return all;
}
}
@@ -566,13 +566,11 @@ namespace System.Windows.Forms
internal void OnExpandItem (GridEntry item)
{
property_grid_view.ExpandItem (item);
OnExpandedItemChanged (EventArgs.Empty);
}
internal void OnCollapseItem (GridEntry item)
{
property_grid_view.CollapseItem (item);
OnExpandedItemChanged (EventArgs.Empty);
}
internal DialogResult ShowError (string text)
@@ -1083,7 +1081,7 @@ namespace System.Windows.Forms
if (eh != null)
eh (this, e);
}
protected virtual void OnPropertyTabChanged (PropertyTabChangedEventArgs e)
{
PropertyTabChangedEventHandler eh = (PropertyTabChangedEventHandler)(Events [PropertyTabChangedEvent]);
@@ -1121,13 +1119,6 @@ namespace System.Windows.Forms
base.OnVisibleChanged (e);
}
protected void OnExpandedItemChanged (EventArgs e)
{
EventHandler eh = (EventHandler)(Events [ExpandedItemChangedEvent]);
if (eh != null)
eh (this, e);
}
protected override bool ProcessDialogKey (Keys keyData) {
return base.ProcessDialogKey (keyData);
}
@@ -1149,7 +1140,6 @@ namespace System.Windows.Forms
static object PropertyValueChangedEvent = new object ();
static object SelectedGridItemChangedEvent = new object ();
static object SelectedObjectsChangedEvent = new object ();
static object ExpandedItemChangedEvent = new object ();
public event EventHandler PropertySortChanged {
add { Events.AddHandler (PropertySortChangedEvent, value); }
@@ -1175,12 +1165,6 @@ namespace System.Windows.Forms
add { Events.AddHandler (SelectedObjectsChangedEvent, value); }
remove { Events.RemoveHandler (SelectedObjectsChangedEvent, value); }
}
// UIA Framework Note: Used to track changes of expanded state of grid items
internal event EventHandler ExpandedItemChanged {
add { Events.AddHandler (ExpandedItemChangedEvent, value); }
remove { Events.RemoveHandler (ExpandedItemChangedEvent, value); }
}
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
@@ -326,6 +326,8 @@ namespace System.Windows.Forms {
if (!Checked) {
Checked = true;
}
} else {
Checked = !Checked;
}
base.OnClick (e);
@@ -837,10 +837,10 @@ namespace System.Windows.Forms {
*/
if (!vscrollbar.Visible) {
vscrollbar.Value = vscrollbar.Minimum;
vscrollbar.Value = 0;
}
if (!hscrollbar.Visible) {
hscrollbar.Value = hscrollbar.Minimum;
hscrollbar.Value = 0;
}
/* Manually setting the size of the thumb should be done before
@@ -1715,32 +1715,31 @@ namespace System.Windows.Forms {
public override void Remove (Control value)
{
bool invalid_selected_index = false;
bool change_index = false;
TabPage page = value as TabPage;
int next_selected_index = -1;
if (page != null && owner.Controls.Contains (page)) {
int index = owner.IndexForTabPage (page);
if (owner.SelectedIndex < index || owner.SelectedIndex == 0)
next_selected_index = owner.SelectedIndex;
else
next_selected_index = owner.SelectedIndex - 1;
owner.selected_index = -1; // Invalidate internal selected Index
invalid_selected_index = true;
if (index < owner.SelectedIndex || owner.SelectedIndex == Count - 1)
change_index = true;
}
base.Remove (value);
// We don't want to raise SelectedIndexChanged until after we
// have removed from the collection, so TabCount will be
// correct for the user.
if (invalid_selected_index) {
if (Count > 0)
owner.SelectedIndex = next_selected_index;
else // Count == 0
owner.OnSelectedIndexChanged (EventArgs.Empty);
if (change_index && Count > 0) {
// Clear the selected index internally, to avoid trying to access the previous
// selected tab when setting the new one - this is what .net seems to do
int prev_selected_index = owner.SelectedIndex;
owner.selected_index = -1;
owner.SelectedIndex = --prev_selected_index;
owner.Invalidate ();
} else if (change_index) {
owner.selected_index = -1;
owner.OnSelectedIndexChanged (EventArgs.Empty);
owner.Invalidate ();
} else
owner.Redraw ();
@@ -284,8 +284,8 @@ namespace System.Windows.Forms
{
if (control == null)
throw new ArgumentNullException ();
if (value < 1)
throw new ArgumentOutOfRangeException ();
if (value < -1)
throw new ArgumentException ();
column_spans[control] = value;
@@ -310,8 +310,8 @@ namespace System.Windows.Forms
{
if (control == null)
throw new ArgumentNullException ();
if (value < 1)
throw new ArgumentOutOfRangeException ();
if (value < -1)
throw new ArgumentException ();
row_spans[control] = value;
@@ -191,7 +191,7 @@ namespace System.Windows.Forms
protected Color defaultWindowBackColor;
protected Color defaultWindowForeColor;
internal SystemResPool ResPool = new SystemResPool ();
private int[] knownColorTable;
private MethodInfo update;
protected Theme ()
{
@@ -199,23 +199,13 @@ namespace System.Windows.Forms
private void SetSystemColors (KnownColor kc, Color value)
{
if (knownColorTable == null) {
Type knownColorTableClass = Type.GetType ("System.Drawing.KnownColorTable, " + Consts.AssemblySystem_Drawing);
if (knownColorTableClass != null)
{
MethodInfo ensureMethod = knownColorTableClass.GetMethod ("EnsureColorTable", BindingFlags.Static | BindingFlags.NonPublic);
if (ensureMethod != null) {
ensureMethod.Invoke(null, new object[]{});
FieldInfo colorTableField = knownColorTableClass.GetField ("s_colorTable", BindingFlags.Static | BindingFlags.NonPublic);
if (colorTableField != null) {
knownColorTable = colorTableField.GetValue (null) as int[];
}
}
}
}
if (knownColorTable != null) {
knownColorTable[(int)kc] = value.ToArgb();
if (update == null) {
Type known_colors = Type.GetType ("System.Drawing.KnownColors, " + Consts.AssemblySystem_Drawing);
if (known_colors != null)
update = known_colors.GetMethod ("Update", BindingFlags.Static | BindingFlags.Public);
}
if (update != null)
update.Invoke (null, new object [2] { (int)kc, value.ToArgb () });
}
/* OS Feature support */
@@ -732,22 +732,6 @@ namespace MonoTests.System.Windows.Forms
Assert.IsTrue (cmbbox.ItemHeight > 0, "#21");
}
[Test]
public void RemoveAt_SelectedIndex ()
{
ComboBox cmbbox = new ComboBox ();
cmbbox.Items.AddRange (new object[] {"1", "2", "3"});
cmbbox.SelectedIndex = 0;
cmbbox.Items.RemoveAt (0);
Assert.AreEqual (0, cmbbox.SelectedIndex, "#A1");
cmbbox.Items.Clear ();
cmbbox.Items.AddRange (new object[] {"1", "2", "3"});
cmbbox.SelectedIndex = 2;
cmbbox.Items.RemoveAt (0);
Assert.AreEqual (1, cmbbox.SelectedIndex, "#A2");
}
//
// Exceptions
//
@@ -90,10 +90,6 @@ using System.Runtime.InteropServices;
[assembly: InternalsVisibleTo ("Mono.Android, PublicKey=0024000004800000940000000602000000240000525341310004000011000000438ac2a5acfbf16cbd2b2b47a62762f273df9cb2795ceccdf77d10bf508e69e7a362ea7a45455bbf3ac955e1f2e2814f144e5d817efc4c6502cc012df310783348304e3ae38573c6d658c234025821fda87a0be8a0d504df564e2c93b2b878925f42503e9d54dfef9f9586d9e6f38a305769587b1de01f6c0410328b2c9733db")]
#endif
#if WASM
[assembly: InternalsVisibleTo ("WebAssembly.Net.WebSockets, PublicKey=00240000048000009400000006020000002400005253413100040000010001004b86c4cb78549b34bab61a3b1800e23bfeb5b3ec390074041536a7e3cbd97f5f04cf0f857155a8928eaa29ebfd11cfbbad3ba70efea7bda3226c6a8d370a4cd303f714486b6ebc225985a638471e6ef571cc92a4613c00b8fa65d61ccee0cbe5f36330c9a01f4183559f1bef24cc2917c6d913e3a541333a1d05d9bed22b38cb")]
#endif
[assembly: TypeForwardedTo (typeof (System.Collections.Generic.Stack<>))]
[assembly: TypeForwardedTo (typeof (System.Collections.Generic.Queue<>))]
[assembly: TypeForwardedTo (typeof (System.IO.Enumeration.FileSystemName))]
-4
View File
@@ -116,10 +116,6 @@ API_BIN_REFS += System.Configuration
LIB_MCS_FLAGS += -d:CONFIGURATION_DEP
endif
ifeq (wasm,$(PROFILE))
API_BIN_REFS += WebAssembly.Net.WebSockets
endif
EXTRA_DISTFILES = \
Test/test-config-file \
Test/System.Security.Cryptography.X509Certificates/pkits/Makefile \
@@ -1,108 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Net.Security;
using System.Net.Sockets;
using System.Runtime.ExceptionServices;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace System.Net.WebSockets
{
internal sealed class WebSocketHandle
{
private WebSocketState _state = WebSocketState.Connecting;
private WebAssembly.Net.WebSockets.ClientWebSocket _webSocket;
public static WebSocketHandle Create() => new WebSocketHandle();
public static bool IsValid(WebSocketHandle handle) => handle != null;
public WebSocketCloseStatus? CloseStatus => _webSocket?.CloseStatus;
public string CloseStatusDescription => _webSocket?.CloseStatusDescription;
public WebSocketState State => _webSocket?.State ?? _state;
public string SubProtocol => _webSocket?.SubProtocol;
public static void CheckPlatformSupport() { /* nop */ }
public void Dispose()
{
_state = WebSocketState.Closed;
_webSocket?.Dispose();
}
public void Abort()
{
_webSocket?.Abort();
}
public Task SendAsync(ArraySegment<byte> buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken) =>
_webSocket.SendAsync(buffer, messageType, endOfMessage, cancellationToken);
public ValueTask SendAsync(ReadOnlyMemory<byte> buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken) =>
_webSocket.SendAsync(buffer, messageType, endOfMessage, cancellationToken);
public Task<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byte> buffer, CancellationToken cancellationToken) =>
_webSocket.ReceiveAsync(buffer, cancellationToken);
public ValueTask<ValueWebSocketReceiveResult> ReceiveAsync(Memory<byte> buffer, CancellationToken cancellationToken) =>
_webSocket.ReceiveAsync(buffer, cancellationToken);
public Task CloseAsync(WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken) =>
_webSocket.CloseAsync(closeStatus, statusDescription, cancellationToken);
public Task CloseOutputAsync(WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken) =>
_webSocket.CloseOutputAsync(closeStatus, statusDescription, cancellationToken);
public async Task ConnectAsyncCore(Uri uri, CancellationToken cancellationToken, ClientWebSocketOptions options)
{
// TODO #14480 : Not currently implemented, or explicitly ignored:
// - ClientWebSocketOptions.UseDefaultCredentials
// - ClientWebSocketOptions.Credentials
// - ClientWebSocketOptions.Proxy
// - ClientWebSocketOptions._sendBufferSize
// throw new PlatformNotSupportedException ();
// Establish connection to the server
CancellationTokenRegistration registration = cancellationToken.Register(s => ((WebSocketHandle)s).Abort(), this);
try
{
_webSocket = new WebAssembly.Net.WebSockets.ClientWebSocket ();//(options);
foreach (var t in options.RequestedSubProtocols) {
_webSocket.Options.AddSubProtocol (t);
}
await _webSocket.ConnectAsync (uri, cancellationToken);
}
catch (Exception exc)
{
if (_state < WebSocketState.Closed)
{
_state = WebSocketState.Closed;
}
Abort();
if (exc is WebSocketException)
{
throw;
}
throw new WebSocketException(SR.net_webstatus_ConnectFailure, exc);
}
finally
{
registration.Dispose();
}
}
}
}
+1 -21
View File
@@ -461,6 +461,7 @@
<Compile Include="..\..\..\external\corefx\src\System.Net.WebClient\src\System\Net\WebClient.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\ClientWebSocket.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\ClientWebSocketOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WebSocketHandle.Managed.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets.WebSocketProtocol\src\System\Net\WebSockets\ManagedWebSocket.netstandard.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets\src\System\Net\WebSockets\ValueWebSocketReceiveResult.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets\src\System\Net\WebSockets\WebSocket.cs" />
@@ -1058,7 +1059,6 @@
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslClientAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslServerAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WebSocketHandle.Managed.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\CompiledRegexRunner.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\CompiledRegexRunnerFactory.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCompiler.cs" />
@@ -1218,7 +1218,6 @@
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslClientAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslServerAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WebSocketHandle.Managed.cs" />
<Compile Include="..\referencesource\System\net\System\Net\Sockets\TCPClient.cs" />
<Compile Include="..\referencesource\System\net\System\Net\Sockets\TCPListener.cs" />
<Compile Include="..\referencesource\System\net\System\Net\Sockets\UDPClient.cs" />
@@ -1364,7 +1363,6 @@
<Compile Include="System.Net.NetworkInformation\UnixTcpStatistics.cs" />
<Compile Include="System.Net.NetworkInformation\UnixUdpStatistics.cs" />
<Compile Include="System.Net.Security\SslStream.cs" />
<Compile Include="System.Net.WebSockets\WebSocketHandle.wasm.cs" />
<Compile Include="System.Net\AuthenticationManager.cs" />
<Compile Include="System.Net\BufferedReadStream.cs" />
<Compile Include="System.Net\ChunkedInputStream.cs" />
@@ -1441,7 +1439,6 @@
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslClientAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslServerAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WebSocketHandle.Managed.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\CompiledRegexRunner.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\CompiledRegexRunnerFactory.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCompiler.cs" />
@@ -1571,7 +1568,6 @@
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslClientAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslServerAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WebSocketHandle.Managed.cs" />
<Compile Include="..\referencesource\System\net\System\Net\Sockets\TCPClient.cs" />
<Compile Include="..\referencesource\System\net\System\Net\Sockets\TCPListener.cs" />
<Compile Include="..\referencesource\System\net\System\Net\Sockets\UDPClient.cs" />
@@ -1838,7 +1834,6 @@
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslClientAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslServerAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WebSocketHandle.Managed.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.Encoding\src\Internal\Cryptography\OidLookup.Windows.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\CompiledRegexRunner.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\CompiledRegexRunnerFactory.cs" />
@@ -2312,7 +2307,6 @@
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslClientAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslServerAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WebSocketHandle.Managed.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\CompiledRegexRunner.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\CompiledRegexRunnerFactory.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCompiler.cs" />
@@ -2811,7 +2805,6 @@
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslClientAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslServerAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WebSocketHandle.Managed.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\CompiledRegexRunner.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\CompiledRegexRunnerFactory.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCompiler.cs" />
@@ -3328,7 +3321,6 @@
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslClientAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslServerAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WebSocketHandle.Managed.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\CompiledRegexRunner.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\CompiledRegexRunnerFactory.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCompiler.cs" />
@@ -3690,7 +3682,6 @@
<Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\Security\Unix\SafeFreeNegoCredentials.cs" />
<Compile Include="..\..\..\external\corefx\src\System.IO.FileSystem.Watcher\src\System\IO\FileSystemWatcher.UnknownUnix.cs" />
<Compile Include="..\..\..\external\corefx\src\System.IO.FileSystem.Watcher\src\System\IO\FileSystemWatcher.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WebSocketHandle.Managed.cs" />
<Compile Include="..\Mono.Security\Mono.Security.Cryptography\PKCS8.cs" />
<Compile Include="..\Mono.Security\Mono.Security.X509.Extensions\AuthorityKeyIdentifierExtension.cs" />
<Compile Include="..\Mono.Security\Mono.Security.X509.Extensions\BasicConstraintsExtension.cs" />
@@ -3810,7 +3801,6 @@
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslClientAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslServerAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WebSocketHandle.Managed.cs" />
<Compile Include="..\referencesource\System\net\System\Net\Sockets\TCPClient.cs" />
<Compile Include="..\referencesource\System\net\System\Net\Sockets\TCPListener.cs" />
<Compile Include="..\referencesource\System\net\System\Net\Sockets\UDPClient.cs" />
@@ -3949,7 +3939,6 @@
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslClientAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslServerAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WebSocketHandle.Managed.cs" />
<Compile Include="..\referencesource\System\net\System\Net\Sockets\TCPClient.cs" />
<Compile Include="..\referencesource\System\net\System\Net\Sockets\TCPListener.cs" />
<Compile Include="..\referencesource\System\net\System\Net\Sockets\UDPClient.cs" />
@@ -4115,7 +4104,6 @@
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslClientAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslServerAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WebSocketHandle.Managed.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.Encoding\src\Internal\Cryptography\OidLookup.Windows.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\CompiledRegexRunner.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\CompiledRegexRunnerFactory.cs" />
@@ -4236,7 +4224,6 @@
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslClientAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslServerAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WebSocketHandle.Managed.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\CompiledRegexRunner.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\CompiledRegexRunnerFactory.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCompiler.cs" />
@@ -4379,7 +4366,6 @@
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslClientAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslServerAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WebSocketHandle.Managed.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\CompiledRegexRunner.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\CompiledRegexRunnerFactory.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCompiler.cs" />
@@ -4522,7 +4508,6 @@
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslClientAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Security\src\System\Net\Security\SslServerAuthenticationOptions.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.WebSockets.Client\src\System\Net\WebSockets\WebSocketHandle.Managed.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\CompiledRegexRunner.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\CompiledRegexRunnerFactory.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCompiler.cs" />
@@ -5093,11 +5078,6 @@
<HintPath>./../../../external/binary-reference-assemblies/build/monowasm/System.Numerics.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="./../../../external/binary-reference-assemblies/build/monowasm/WebAssembly.Net.WebSockets.dll">
<SpecificVersion>False</SpecificVersion>
<HintPath>./../../../external/binary-reference-assemblies/build/monowasm/WebAssembly.Net.WebSockets.dll</HintPath>
<Private>False</Private>
</Reference>
<ProjectReference Include="../Mono.Security/Mono.Security.csproj">
<Aliases>MonoSecurity</Aliases>
</ProjectReference>
@@ -197,9 +197,6 @@ namespace MonoTests.System.Collections.Concurrent
}
[Test]
#if WASM
[Category ("MultiThreaded")]
#endif
public void BasicRemoveEmptyTest ()
{
int result;
@@ -208,9 +205,6 @@ namespace MonoTests.System.Collections.Concurrent
}
[Test]
#if WASM
[Category ("MultiThreaded")]
#endif
public void BasicRemoveTwiceTest()
{
bag.Add (1);
@@ -254,9 +254,6 @@ namespace MonoTests.System.Collections.Specialized {
}
[Test]
#if WASM
[Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")]
#endif
public void CaseInsensitive ()
{
// default constructor is case insensitive
@@ -350,9 +347,6 @@ namespace MonoTests.System.Collections.Specialized {
}
[Test]
#if WASM
[Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")]
#endif
public void Remove ()
{
string[] items = { "mono", "MoNo", "mOnO", "MONO" };
@@ -420,9 +414,6 @@ namespace MonoTests.System.Collections.Specialized {
}
[Test]
#if WASM
[Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")]
#endif
public void Constructor_IEqualityComparer_Null ()
{
NameValueCollection c1 = new NameValueCollection ((IEqualityComparer)null);
@@ -432,9 +423,6 @@ namespace MonoTests.System.Collections.Specialized {
}
[Test]
#if WASM
[Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")]
#endif
public void Constructor_NameValueCollection ()
{
NameValueCollection c1 = new NameValueCollection (StringComparer.InvariantCultureIgnoreCase);
@@ -18,7 +18,6 @@ using NUnit.Framework;
namespace MonoTests.System.ComponentModel
{
[TestFixture]
[NUnit.Framework.CategoryAttribute ("NotWasm")]
public class AsyncOperationManagerTest
{
[Test]
@@ -81,9 +81,6 @@ namespace MonoTests.System.ComponentModel
}
[Test]
#if WASM
[NUnit.Framework.CategoryAttribute ("MultiThreaded")]
#endif
public void CancelBackgroundWorker ()
{
BackgroundWorker bw = new BackgroundWorker ();
@@ -120,9 +117,6 @@ namespace MonoTests.System.ComponentModel
}
[Test]
#if WASM
[NUnit.Framework.CategoryAttribute ("MultiThreaded")]
#endif
public void ExceptionBackgroundWorker ()
{
BackgroundWorker bw = new BackgroundWorker ();
@@ -160,9 +154,6 @@ namespace MonoTests.System.ComponentModel
}
[Test]
#if WASM
[NUnit.Framework.CategoryAttribute ("MultiThreaded")]
#endif
public void CompleteBackgroundWorker ()
{
BackgroundWorker bw = new BackgroundWorker ();
@@ -151,9 +151,6 @@ namespace MonoTests.System.ComponentModel
}
[Test] // Sort ()
#if WASM
[Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")]
#endif
public void Sort1 ()
{
EventDescriptorCollection descriptors;
@@ -195,9 +192,6 @@ namespace MonoTests.System.ComponentModel
}
[Test] // Sort (String [])
#if WASM
[Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")]
#endif
public void Sort2 ()
{
EventDescriptorCollection descriptors;
@@ -255,9 +249,6 @@ namespace MonoTests.System.ComponentModel
}
[Test] // Sort (IComparer)
#if WASM
[Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")]
#endif
public void Sort3 ()
{
EventDescriptorCollection descriptors;
@@ -315,9 +306,6 @@ namespace MonoTests.System.ComponentModel
}
[Test] // Sort (String [], IComparer)
#if WASM
[Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")]
#endif
public void Sort4 ()
{
EventDescriptorCollection descriptors;
@@ -247,9 +247,6 @@ namespace MonoTests.System.ComponentModel
}
[Test] // Sort ()
#if WASM
[Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")]
#endif
public void Sort1 ()
{
PropertyDescriptorCollection descriptors;
@@ -291,9 +288,6 @@ namespace MonoTests.System.ComponentModel
}
[Test] // Sort (String [])
#if WASM
[Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")]
#endif
public void Sort2 ()
{
PropertyDescriptorCollection descriptors;
@@ -351,9 +345,6 @@ namespace MonoTests.System.ComponentModel
}
[Test] // Sort (IComparer)
#if WASM
[Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")]
#endif
public void Sort3 ()
{
PropertyDescriptorCollection descriptors;
@@ -411,9 +402,6 @@ namespace MonoTests.System.ComponentModel
}
[Test] // Sort (String [], IComparer)
#if WASM
[Ignore ("WASM CompareInfo - https://github.com/mono/mono/issues/17837")]
#endif
public void Sort4 ()
{
PropertyDescriptorCollection descriptors;
@@ -40,7 +40,7 @@ namespace MonoTests.System.Net.Mail
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Credentials_Default ()
@@ -49,7 +49,7 @@ namespace MonoTests.System.Net.Mail
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void DeliveryMethod ()
@@ -67,7 +67,7 @@ namespace MonoTests.System.Net.Mail
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void EnableSsl ()
@@ -80,7 +80,7 @@ namespace MonoTests.System.Net.Mail
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Host ()
@@ -99,7 +99,7 @@ namespace MonoTests.System.Net.Mail
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Host_Value_Null ()
@@ -116,7 +116,7 @@ namespace MonoTests.System.Net.Mail
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Host_Value_Empty ()
@@ -134,7 +134,7 @@ namespace MonoTests.System.Net.Mail
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void PickupDirectoryLocation ()
@@ -153,7 +153,7 @@ namespace MonoTests.System.Net.Mail
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Port ()
@@ -166,7 +166,7 @@ namespace MonoTests.System.Net.Mail
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Port_Value_Invalid ()
@@ -195,7 +195,7 @@ namespace MonoTests.System.Net.Mail
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Send_Message_Null ()
@@ -212,7 +212,7 @@ namespace MonoTests.System.Net.Mail
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Send_Network_Host_Null ()
@@ -230,7 +230,7 @@ namespace MonoTests.System.Net.Mail
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Send_Network_Host_Whitespace ()
@@ -249,7 +249,7 @@ namespace MonoTests.System.Net.Mail
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Send_SpecifiedPickupDirectory ()
@@ -265,7 +265,7 @@ namespace MonoTests.System.Net.Mail
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Send_SpecifiedPickupDirectory_PickupDirectoryLocation_DirectoryNotFound ()
@@ -295,7 +295,7 @@ namespace MonoTests.System.Net.Mail
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Send_SpecifiedPickupDirectory_PickupDirectoryLocation_Empty ()
@@ -317,7 +317,7 @@ namespace MonoTests.System.Net.Mail
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Send_SpecifiedPickupDirectory_PickupDirectoryLocation_IllegalChars ()
@@ -345,7 +345,7 @@ namespace MonoTests.System.Net.Mail
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Send_SpecifiedPickupDirectory_PickupDirectoryLocation_NotAbsolute ()
@@ -367,7 +367,7 @@ namespace MonoTests.System.Net.Mail
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Send_SpecifiedPickupDirectory_PickupDirectoryLocation_Null ()
@@ -388,7 +388,7 @@ namespace MonoTests.System.Net.Mail
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Timeout ()
@@ -401,7 +401,7 @@ namespace MonoTests.System.Net.Mail
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#else
[ExpectedException (typeof (ArgumentOutOfRangeException))]
@@ -412,7 +412,7 @@ namespace MonoTests.System.Net.Mail
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void UseDefaultCredentials_Default ()
@@ -19,9 +19,6 @@ namespace MonoTests.System.Net.NetworkInformation
public class IPInterfacePropertiesTest
{
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void AtLeastOneUnicastAddress ()
{
int numUnicastAddresses = 0;
@@ -115,13 +112,10 @@ namespace MonoTests.System.Net.NetworkInformation
}
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void DnsEnabled ()
{
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
Assert.Ignore ("IsDnsEnabled is not necessarily enabled for all interfaces on windows.");
Assert.Ignore ("IsDnsEnabled is not nessasarily enabled for all interfaces on windows.");
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces ();
foreach (NetworkInterface adapter in adapters)
@@ -132,9 +126,6 @@ namespace MonoTests.System.Net.NetworkInformation
}
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
// The code works as expected when part of a regular app. It fails when executed from within an NUnit test
// Might be a problem with the test suite. To investigate.
[Category("AndroidNotWorking")]
@@ -19,27 +19,18 @@ namespace MonoTests.System.Net.NetworkInformation
public class NetworkInterfaceTest
{
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void IsNetworkAvailable ()
{
Assert.IsTrue (NetworkInterface.GetIsNetworkAvailable ());
}
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void LoopbackInterfaceIndex ()
{
Assert.IsTrue (NetworkInterface.LoopbackInterfaceIndex > 0);
}
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void AtLeastOneInterface ()
{
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces ();
@@ -47,9 +38,6 @@ namespace MonoTests.System.Net.NetworkInformation
}
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void FirstInterfaceId ()
{
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces ();
@@ -57,9 +45,6 @@ namespace MonoTests.System.Net.NetworkInformation
}
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void FirstInterfaceName ()
{
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces ();
@@ -67,9 +52,6 @@ namespace MonoTests.System.Net.NetworkInformation
}
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void FirstInterfaceType ()
{
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces ();
@@ -77,9 +59,6 @@ namespace MonoTests.System.Net.NetworkInformation
}
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void FirstInterfaceOperationalStatus ()
{
var adapter = NetworkInterface.GetAllNetworkInterfaces ()[0];
@@ -89,9 +68,6 @@ namespace MonoTests.System.Net.NetworkInformation
}
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void FirstInterfaceSpeed ()
{
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces ();
@@ -99,9 +75,6 @@ namespace MonoTests.System.Net.NetworkInformation
}
[Test]
#if WASM
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void IPv4Mask ()
{
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces ();
@@ -20,7 +20,7 @@ using System.Net;
using System.Net.Sockets;
using NUnit.Framework;
using System.IO;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using MonoTests.Helpers;
@@ -215,10 +215,6 @@ namespace MonoTests.System.Net.Sockets
#endif
public void ConnectFailAsync ()
{
// XXX: Hangs on AIX
if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("AIX")))
Assert.Ignore ("Skipping on AIX/i");
Socket sock = new Socket (AddressFamily.InterNetwork,
SocketType.Stream,
ProtocolType.Tcp);
@@ -93,7 +93,7 @@ namespace MonoTests.System.Net.Sockets
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#else
[ExpectedException (typeof (ArgumentNullException))]
@@ -104,7 +104,7 @@ namespace MonoTests.System.Net.Sockets
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#else
[ExpectedException (typeof (ArgumentNullException))]
@@ -115,7 +115,7 @@ namespace MonoTests.System.Net.Sockets
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#else
[ExpectedException (typeof (ArgumentOutOfRangeException))]
@@ -95,7 +95,7 @@ namespace MonoTests.System.Net.Sockets {
}
[Test] // .ctor (AddressFamily)
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Constructor2_Family_Invalid ()
@@ -176,7 +176,7 @@ namespace MonoTests.System.Net.Sockets {
}
[Test] // .ctor (Int32)
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Constructor3_Port_OutOfRange ()
@@ -240,7 +240,7 @@ namespace MonoTests.System.Net.Sockets {
}
[Test] // .ctor (IPEndPoint)
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Constructor4_LocalEP_Null ()
@@ -313,7 +313,7 @@ namespace MonoTests.System.Net.Sockets {
}
[Test] // .ctor (Int32, AddressFamily)
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Constructor5_Family_Invalid ()
@@ -346,7 +346,7 @@ namespace MonoTests.System.Net.Sockets {
}
[Test] // .ctor (Int32, AddressFamily)
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Constructor5_Port_OutOfRange ()
@@ -426,7 +426,7 @@ namespace MonoTests.System.Net.Sockets {
}
[Test] // .ctor (String, Int32)
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Constructor6_HostName_Null ()
@@ -443,7 +443,7 @@ namespace MonoTests.System.Net.Sockets {
}
[Test] // .ctor (String, Int32)
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Constructor6_Port_OutOfRange ()
@@ -38,7 +38,7 @@ namespace MonoTests.System.Net {
public class HttpListenerPrefixCollectionTest {
// NL -> Not listening -> tests when listener.IsListening == false
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void NL_DefaultProperties ()
@@ -51,7 +51,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void DefaultProperties ()
@@ -100,7 +100,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void EndsWithSlash ()
@@ -110,7 +110,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void DifferentPath ()
@@ -122,7 +122,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void NL_Clear ()
@@ -133,7 +133,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void NL_Remove ()
@@ -144,7 +144,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void NL_RemoveBadUri ()
@@ -155,7 +155,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#else
[ExpectedException (typeof (ArgumentException))]
@@ -168,7 +168,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#else
[ExpectedException (typeof (ArgumentException))]
@@ -180,7 +180,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void MultipleSlashes ()
@@ -196,7 +196,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void PercentSign ()
@@ -212,7 +212,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Disposed1 ()
@@ -226,7 +226,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#else
[ExpectedException (typeof (ObjectDisposedException))]
@@ -240,7 +240,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#else
[ExpectedException (typeof (ObjectDisposedException))]
@@ -254,7 +254,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#else
[ExpectedException (typeof (ObjectDisposedException))]
@@ -268,7 +268,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#else
[ExpectedException (typeof (ObjectDisposedException))]
@@ -283,7 +283,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Disposed6 ()
@@ -299,7 +299,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Disposed7 ()
@@ -39,7 +39,7 @@ namespace MonoTests.System.Net {
[TestFixture]
public class HttpListenerTest {
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void DefaultProperties ()
@@ -55,7 +55,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Start1 ()
@@ -65,7 +65,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Stop1 ()
@@ -75,7 +75,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#else
[ExpectedException (typeof (InvalidOperationException))]
@@ -88,7 +88,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#else
[ExpectedException (typeof (InvalidOperationException))]
@@ -102,7 +102,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#else
[ExpectedException (typeof (InvalidOperationException))]
@@ -115,7 +115,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void BeginGetContext2 ()
@@ -227,7 +227,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void CloseBeforeStart ()
@@ -271,7 +271,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void AbortBeforeStart ()
@@ -292,7 +292,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void PropertiesWhenClosed1 ()
@@ -308,7 +308,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#else
[ExpectedException (typeof (ObjectDisposedException))]
@@ -321,7 +321,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#else
[ExpectedException (typeof (ObjectDisposedException))]
@@ -334,7 +334,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#else
[ExpectedException (typeof (ObjectDisposedException))]
@@ -347,8 +347,7 @@ namespace MonoTests.System.Net {
}
[Test]
[Category ("NotWasm")]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#else
[ExpectedException (typeof (ObjectDisposedException))]
@@ -361,7 +360,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#else
[ExpectedException (typeof (ObjectDisposedException))]
@@ -374,7 +373,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#else
[ExpectedException (typeof (ObjectDisposedException))]
@@ -387,7 +386,7 @@ namespace MonoTests.System.Net {
}
[Test]
#if FEATURE_NO_BSD_SOCKETS && !WASM
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void PropertiesWhenClosed3 ()
@@ -209,13 +209,11 @@ public class ServicePointTest
Assert.AreSame (host0, host1, "HostEntry should result in the same IPHostEntry object.");
#if !WASM
Thread.Sleep (dnsRefreshTimeout * 2);
host2 = hostEntryProperty.GetValue (sp, null) as IPHostEntry;
Assert.AreNotSame(host0, host2, "HostEntry should result in a new IPHostEntry " +
"object when DnsRefreshTimeout is reached.");
#endif
}
// Debug code not used now, but could be useful later
@@ -41,7 +41,6 @@ namespace MonoTests.System.Net
public class WebClientTestAsync
{
[Test]
[Category("NotWasm")]
[Category("Async")]
[Category("AndroidNotWorking")] // Attempts to access the test dll which won't work on Android
[Category("BitcodeNotSupported")]
@@ -66,9 +66,6 @@ namespace MonoTests.System.Net
}
[Test]
#if WASM
[Ignore ("WASM - libc issue")]
#endif
public void BypassArrayList ()
{
Uri proxy1 = new Uri ("http://proxy.contoso.com");
@@ -127,9 +124,6 @@ namespace MonoTests.System.Net
}
[Test]
#if WASM
[Ignore ("WASM - libc issue")]
#endif
public void IsByPassed ()
{
WebProxy p = new WebProxy ("http://proxy.contoso.com", true);
Loaded 100 of 310 files, more files were not shown because too many files have changed in this diff. Show more