diff --git a/.gitignore b/.gitignore index b19d293427..150e51008b 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,6 @@ src/*.userprefs src/fsharp/FSStrings.resources lkg packages -packages src/fsharp/FSharp.Build/*.resx src/fsharp/FSharp.Build-proto/*.resx src/fsharp/FSharp.Build-proto/*.resources diff --git a/appveyor-build.cmd b/appveyor-build.cmd index e7e7e0dc19..fdcc935912 100644 --- a/appveyor-build.cmd +++ b/appveyor-build.cmd @@ -5,14 +5,17 @@ set APPVEYOR_CI=1 :: Check prerequisites if not '%VisualStudioVersion%' == '' goto vsversionset if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\common7\ide\devenv.exe" set VisualStudioVersion=14.0 +if exist "%ProgramFiles%\Microsoft Visual Studio 14.0\common7\ide\devenv.exe" set VisualStudioVersion=14.0 if not '%VisualStudioVersion%' == '' goto vsversionset if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\common7\ide\devenv.exe" set VisualStudioVersion=12.0 -:vsversionset -if '%VisualStudioVersion%' == '' echo Error: Could not find a Visual Studio Installed.MSBuild.exe. Please see http://www.visualstudio.com/en-us/news/vs2015-vs.aspx. && goto :eof +if exist "%ProgramFiles%\Microsoft Visual Studio 12.0\common7\ide\devenv.exe" set VisualStudioVersion=12.0 -if '%VisualStudioVersion%'=='14.0' set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" -if '%VisualStudioVersion%'=='12.0' set _msbuildexe="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe" -if not exist %_msbuildexe% echo Error: Could not find MSBuild.exe. Please see http://www.microsoft.com/en-us/download/details.aspx?id=40760. && goto :eof +:vsversionset +if '%VisualStudioVersion%' == '' echo Error: Could not find an installation of Visual Studio && goto :eof + +if exist "%ProgramFiles(x86)%\MSBuild\%VisualStudioVersion%\Bin\MSBuild.exe" set _msbuildexe="%ProgramFiles(x86)%\MSBuild\%VisualStudioVersion%\Bin\MSBuild.exe" +if exist "%ProgramFiles%\MSBuild\%VisualStudioVersion%\Bin\MSBuild.exe" set _msbuildexe="%ProgramFiles%\MSBuild\%VisualStudioVersion%\Bin\MSBuild.exe" +if not exist %_msbuildexe% echo Error: Could not find MSBuild.exe. && goto :eof set _ngenexe="%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\ngen.exe" if not exist %_ngenexe% echo Error: Could not find ngen.exe. && goto :eof @@ -24,9 +27,6 @@ if not exist %_ngenexe% echo Error: Could not find ngen.exe. && goto :eof %_msbuildexe% src\fsharp-proto-build.proj @if ERRORLEVEL 1 echo Error: compiler proto build failed && goto :eof -%_ngenexe% install proto\net40\bin\FSharp.Compiler-proto.dll -%_ngenexe% install proto\net40\bin\fsharp.core.dll -%_ngenexe% install proto\net40\bin\FSharp.Build-proto.dll %_ngenexe% install Proto\net40\bin\fsc-proto.exe @if ERRORLEVEL 1 echo Error: NGen of proto failed && goto :eof @@ -34,7 +34,7 @@ if not exist %_ngenexe% echo Error: Could not find ngen.exe. && goto :eof @if ERRORLEVEL 1 echo Error: library release build failed && goto :eof %_msbuildexe% src/fsharp-compiler-build.proj /p:Configuration=Release -@if ERRORLEVEL 1 echo Error: compile Release build failed && goto :eof +@if ERRORLEVEL 1 echo Error: compiler build failed && goto :eof %_msbuildexe% src/fsharp-library-build.proj /p:TargetFramework=portable47 /p:Configuration=Release @if ERRORLEVEL 1 echo Error: library portable47 build failed && goto :eof @@ -65,11 +65,12 @@ if not exist %_ngenexe% echo Error: Could not find ngen.exe. && goto :eof %_msbuildexe% src/fsharp-library-unittests-build.proj /p:TargetFramework=portable259 /p:Configuration=Release @if ERRORLEVEL 1 echo Error: library unittests build failed portable259 && goto :eof + %_msbuildexe% vsintegration\fsharp-vsintegration-build.proj /p:TargetFramework=net40 /p:Configuration=Release -@if ERRORLEVEL 1 echo Error: library unittests build failed vsintegration-unittests && goto :eof +@if ERRORLEVEL 1 echo Error: VS integration build failed && goto :eof %_msbuildexe% vsintegration\fsharp-vsintegration-unittests-build.proj /p:TargetFramework=net40 /p:Configuration=Release -@if ERRORLEVEL 1 echo Error: library unittests build failed vsintegration-unittests && goto :eof +@if ERRORLEVEL 1 echo Error: VS integration unit tests build failed && goto :eof @echo on call src\update.cmd release -ngen diff --git a/src/FSharpSource.Settings.targets b/src/FSharpSource.Settings.targets index 86f798c6ea..75ceab8fd9 100644 --- a/src/FSharpSource.Settings.targets +++ b/src/FSharpSource.Settings.targets @@ -71,4 +71,14 @@ bin\$(Configuration) 3 + + + $(DefineConstants),VS_VERSION_DEV12=True + $(DefineConstants);VS_VERSION_DEV12 + + + + core + V12.0 + \ No newline at end of file diff --git a/src/FSharpSource.msbuildreferences.targets b/src/FSharpSource.msbuildreferences.targets deleted file mode 100644 index d9fe2a5ab3..0000000000 --- a/src/FSharpSource.msbuildreferences.targets +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - Microsoft.Build.Framework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - Microsoft.Build.Engine, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - Microsoft.Build, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - Microsoft.Build.Utilities.core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - Microsoft.Build.Tasks.core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - Microsoft.Build.Conversion.core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - - - Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - Microsoft.Build.Engine, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - Microsoft.Build, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - Microsoft.Build.Utilities.V12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - Microsoft.Build.Tasks.V12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - Microsoft.Build.Conversion.V12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - - diff --git a/src/FSharpSource.targets b/src/FSharpSource.targets index a2d6b3bcb8..884080b828 100644 --- a/src/FSharpSource.targets +++ b/src/FSharpSource.targets @@ -64,8 +64,6 @@ - - @@ -97,6 +95,13 @@ $(DefineConstants);OPEN_BUILD + + + + 2.6.3 + 2.6.3.13283 + $(FSharpSourcesRoot)\..\packages\NUnit.$(NUnitVersion)\lib\ + $(FSharpSourcesRoot)\..\packages\NUnit.Runners.$(NUnitVersion)\tools\lib\ @@ -724,7 +729,7 @@ Outputs="@(CustomCopyLocal->'$(OutDir)%(TargetFilename)')" Condition="'$(targetCLIDir)'!='Silverlight/4.0/'" > - + @@ -745,11 +750,4 @@ - - - - - - diff --git a/src/fsharp/FSharp.Build/FSharp.Build.fsproj b/src/fsharp/FSharp.Build/FSharp.Build.fsproj index 00d05fed16..28683276f7 100644 --- a/src/fsharp/FSharp.Build/FSharp.Build.fsproj +++ b/src/fsharp/FSharp.Build/FSharp.Build.fsproj @@ -44,11 +44,11 @@ - - - - - + + + + + {DED3BBD7-53F4-428A-8C9F-27968E768605} FSharp.Core diff --git a/src/fsharp/FSharp.Compiler.Unittests/FSharp.Compiler.Unittests.fsproj b/src/fsharp/FSharp.Compiler.Unittests/FSharp.Compiler.Unittests.fsproj index 5a38e3aa85..5e468db0c9 100644 --- a/src/fsharp/FSharp.Compiler.Unittests/FSharp.Compiler.Unittests.fsproj +++ b/src/fsharp/FSharp.Compiler.Unittests/FSharp.Compiler.Unittests.fsproj @@ -43,12 +43,10 @@ 3 - - - true - $(FSharpSourcesRoot)\..\packages\NUnit.2.6.3\lib\nunit.framework.dll + + True + $(NUnitLibDir)\nunit.framework.dll - diff --git a/src/fsharp/FSharp.Compiler/FSharp.Compiler.fsproj b/src/fsharp/FSharp.Compiler/FSharp.Compiler.fsproj index 454a121e38..fc6dc81ace 100644 --- a/src/fsharp/FSharp.Compiler/FSharp.Compiler.fsproj +++ b/src/fsharp/FSharp.Compiler/FSharp.Compiler.fsproj @@ -528,11 +528,11 @@ - - - - - + + + + + {DED3BBD7-53F4-428A-8C9F-27968E768605} FSharp.Core diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj b/src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj index 51a498d46b..ba12c4af48 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj +++ b/src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj @@ -25,10 +25,6 @@ $(DefineConstants);SILVERLIGHT $(DefineConstants);EXTENSIONTYPING;$(TargetFramework.ToLower()) - - $(DefineConstants);FX_4_3_1_0 - $(DefineConstants);FX_4_4_0_0 - true full @@ -48,9 +44,10 @@ - + true - $(FSharpSourcesRoot)\..\packages\NUnit.2.6.3\lib\nunit.framework.dll + True + $(NUnitLibDir)\nunit.framework.dll @@ -109,10 +106,4 @@ - - - - - \ No newline at end of file diff --git a/src/fsharp/FSharp.LanguageService.Compiler/FSharp.LanguageService.Compiler.fsproj b/src/fsharp/FSharp.LanguageService.Compiler/FSharp.LanguageService.Compiler.fsproj index e22f12cf8c..c3b939c572 100644 --- a/src/fsharp/FSharp.LanguageService.Compiler/FSharp.LanguageService.Compiler.fsproj +++ b/src/fsharp/FSharp.LanguageService.Compiler/FSharp.LanguageService.Compiler.fsproj @@ -473,11 +473,11 @@ - - - - - + + + + + {DED3BBD7-53F4-428A-8C9F-27968E768605} FSharp.Core diff --git a/src/fsharp/ReferenceResolution.fs b/src/fsharp/ReferenceResolution.fs index 5c96b97575..f0346c99d3 100644 --- a/src/fsharp/ReferenceResolution.fs +++ b/src/fsharp/ReferenceResolution.fs @@ -96,8 +96,8 @@ module internal MSBuildResolver = let SupportedNetFrameworkVersions = set [ Net20; Net30; Net35; Net40; Net45; Net451; (*SL only*) "v5.0" ] -#if FX_ATLEAST_45 let GetPathToDotNetFramework(v) = +#if FX_ATLEAST_45 let v = match v with | Net11 -> Some TargetDotNetFrameworkVersion.Version11 @@ -115,13 +115,13 @@ module internal MSBuildResolver = | x -> [x] | _ -> [] #else - let GetPathToDotNetFramework(_) = // FX_ATLEAST_45 is not defined for step when we build compiler with proto compiler. + ignore v [] #endif -#if FX_ATLEAST_45 let DeriveTargetFrameworkDirectoriesFor40Plus(version) = +#if FX_ATLEAST_45 // starting with .Net 4.0, the runtime dirs (WindowsFramework) are never used by MSBuild RAR let v = match version with @@ -136,8 +136,8 @@ module internal MSBuildResolver = | x -> [x] | None -> [] #else - let DeriveTargetFrameworkDirectoriesFor40Plus(_) = // FX_ATLEAST_45 is not defined for step when we build compiler with proto compiler. + ignore version [] #endif diff --git a/src/fsharp/ast.fs b/src/fsharp/ast.fs index 6fba71fad7..d554332850 100644 --- a/src/fsharp/ast.fs +++ b/src/fsharp/ast.fs @@ -1706,20 +1706,6 @@ let ParseAssemblyCodeType s m = IL.EcmaILGlobals.typ_Object #endif -#if BUILDING_PROTO -let last (source : seq<_>) = - use e = source.GetEnumerator() - if e.MoveNext() then - let mutable res = e.Current - while (e.MoveNext()) do res <- e.Current - res - else - raise (new System.InvalidOperationException()) -#else -let last = Seq.last -#endif - - //------------------------------------------------------------------------ // AST constructors //------------------------------------------------------------------------ @@ -1755,7 +1741,7 @@ let mkSynDotBrackSeqSliceGet m mDot arr (argslist:list) = | SynIndexerArg.One x -> yield x | _ -> () ] if notsliced.Length = argslist.Length then - SynExpr.DotIndexedGet(arr,[SynIndexerArg.One (SynExpr.Tuple(notsliced,[],unionRanges (Seq.head notsliced).Range (last notsliced).Range))],mDot,m) + SynExpr.DotIndexedGet(arr,[SynIndexerArg.One (SynExpr.Tuple(notsliced,[],unionRanges (List.head notsliced).Range (List.last notsliced).Range))],mDot,m) else SynExpr.DotIndexedGet(arr,argslist,mDot,m) diff --git a/tests/BuildTestTools.cmd b/tests/BuildTestTools.cmd index 5acd3c2ffd..6ceb5b8e6a 100644 --- a/tests/BuildTestTools.cmd +++ b/tests/BuildTestTools.cmd @@ -18,14 +18,17 @@ exit /b 1 :: Check prerequisites if not '%VisualStudioVersion%' == '' goto vsversionset if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\common7\ide\devenv.exe" set VisualStudioVersion=14.0 +if exist "%ProgramFiles%\Microsoft Visual Studio 14.0\common7\ide\devenv.exe" set VisualStudioVersion=14.0 if not '%VisualStudioVersion%' == '' goto vsversionset if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\common7\ide\devenv.exe" set VisualStudioVersion=12.0 -:vsversionset -if '%VisualStudioVersion%' == '' echo Error: Could not find a Visual Studio Installed.MSBuild.exe. Please see http://www.visualstudio.com/en-us/news/vs2015-vs.aspx. && goto :eof +if exist "%ProgramFiles%\Microsoft Visual Studio 12.0\common7\ide\devenv.exe" set VisualStudioVersion=12.0 -if '%VisualStudioVersion%'=='14.0' set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" -if '%VisualStudioVersion%'=='12.0' set _msbuildexe="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe" -if not exist %_msbuildexe% echo Error: Could not find MSBuild.exe. Please see http://www.microsoft.com/en-us/download/details.aspx?id=40760. && goto :eof +:vsversionset +if '%VisualStudioVersion%' == '' echo Error: Could not find an installation of Visual Studio && goto :eof + +if exist "%ProgramFiles(x86)%\MSBuild\%VisualStudioVersion%\Bin\MSBuild.exe" set _msbuildexe="%ProgramFiles(x86)%\MSBuild\%VisualStudioVersion%\Bin\MSBuild.exe" +if exist "%ProgramFiles%\MSBuild\%VisualStudioVersion%\Bin\MSBuild.exe" set _msbuildexe="%ProgramFiles%\MSBuild\%VisualStudioVersion%\Bin\MSBuild.exe" +if not exist %_msbuildexe% echo Error: Could not find MSBuild.exe. && goto :eof if not exist "%~dp0\fsharpqa\testenv\bin" mkdir "%~dp0\fsharpqa\testenv\bin" || goto :error %_msbuildexe% %~dp0\fsharpqa\testenv\src\ILComparer\ILComparer.fsproj /p:Configuration=%1 /t:Build || goto :error diff --git a/tests/RunTests.cmd b/tests/RunTests.cmd index d96a56b1e4..1ea4eb6568 100644 --- a/tests/RunTests.cmd +++ b/tests/RunTests.cmd @@ -10,8 +10,8 @@ goto :USAGE :flavor_ok -set nunitpath=%~dp0%..\packages\NUnit.Runners.2.6.3\tools\ -if not exist "%nunitpath%" ( +set NUNITPATH=%~dp0%..\packages\NUnit.Runners.2.6.3\tools\ +if not exist "%NUNITPATH%" ( pushd %~dp0.. .\.nuget\nuget.exe restore packages.config -PackagesDirectory packages popd @@ -191,8 +191,8 @@ set XMLFILE=CoreUnit_%coreunitsuffix%_Xml.xml set OUTPUTFILE=CoreUnit_%coreunitsuffix%_Output.log set ERRORFILE=CoreUnit_%coreunitsuffix%_Error.log -echo %nunitpath%\nunit-console.exe /nologo /result=%XMLFILE% /output=%OUTPUTFILE% /err=%ERRORFILE% /work=%RESULTSDIR% %FSCBINPATH%\..\..\%coreunitsuffix%\bin\FSharp.Core.Unittests.dll - %nunitpath%\nunit-console.exe /nologo /result=%XMLFILE% /output=%OUTPUTFILE% /err=%ERRORFILE% /work=%RESULTSDIR% %FSCBINPATH%\..\..\%coreunitsuffix%\bin\FSharp.Core.Unittests.dll +echo "%NUNITPATH%\nunit-console.exe" /nologo /result=%XMLFILE% /output=%OUTPUTFILE% /err=%ERRORFILE% /work=%RESULTSDIR% %FSCBINPATH%\..\..\%coreunitsuffix%\bin\FSharp.Core.Unittests.dll + "%NUNITPATH%\nunit-console.exe" /nologo /result=%XMLFILE% /output=%OUTPUTFILE% /err=%ERRORFILE% /work=%RESULTSDIR% %FSCBINPATH%\..\..\%coreunitsuffix%\bin\FSharp.Core.Unittests.dll goto :EOF @@ -202,8 +202,8 @@ set XMLFILE=ComplierUnit_%compilerunitsuffix%_Xml.xml set OUTPUTFILE=ComplierUnit_%compilerunitsuffix%_Output.log set ERRORFILE=ComplierUnit_%compilerunitsuffix%_Error.log -echo %nunitpath%\nunit-console.exe /nologo /result=%XMLFILE% /output=%OUTPUTFILE% /err=%ERRORFILE% /work=%RESULTSDIR% %FSCBINPATH%\..\..\%compilerunitsuffix%\bin\FSharp.Compiler.Unittests.dll - %nunitpath%\nunit-console.exe /nologo /result=%XMLFILE% /output=%OUTPUTFILE% /err=%ERRORFILE% /work=%RESULTSDIR% %FSCBINPATH%\..\..\%compilerunitsuffix%\bin\FSharp.Compiler.Unittests.dll +echo "%NUNITPATH%\nunit-console.exe" /nologo /result=%XMLFILE% /output=%OUTPUTFILE% /err=%ERRORFILE% /work=%RESULTSDIR% %FSCBINPATH%\..\..\%compilerunitsuffix%\bin\FSharp.Compiler.Unittests.dll + "%NUNITPATH%\nunit-console.exe" /nologo /result=%XMLFILE% /output=%OUTPUTFILE% /err=%ERRORFILE% /work=%RESULTSDIR% %FSCBINPATH%\..\..\%compilerunitsuffix%\bin\FSharp.Compiler.Unittests.dll goto :EOF @@ -213,7 +213,7 @@ set XMLFILE=IDEUnit_Xml.xml set OUTPUTFILE=IDEUnit_Output.log set ERRORFILE=IDEUnit_Error.log -echo %nunitpath%\nunit-console-x86.exe /nologo /result=%XMLFILE% /output=%OUTPUTFILE% /err=%ERRORFILE% /work=%RESULTSDIR% %FSCBINPATH%\Unittests.dll - %nunitpath%\nunit-console-x86.exe /nologo /result=%XMLFILE% /output=%OUTPUTFILE% /err=%ERRORFILE% /work=%RESULTSDIR% %FSCBINPATH%\Unittests.dll +echo "%NUNITPATH%\nunit-console-x86.exe" /nologo /result=%XMLFILE% /output=%OUTPUTFILE% /err=%ERRORFILE% /work=%RESULTSDIR% %FSCBINPATH%\Unittests.dll + "%NUNITPATH%\nunit-console-x86.exe" /nologo /result=%XMLFILE% /output=%OUTPUTFILE% /err=%ERRORFILE% /work=%RESULTSDIR% %FSCBINPATH%\Unittests.dll goto :EOF \ No newline at end of file diff --git a/vsintegration/src/Salsa/Salsa.fsproj b/vsintegration/src/Salsa/Salsa.fsproj index 17417734a1..a0a9c3db10 100644 --- a/vsintegration/src/Salsa/Salsa.fsproj +++ b/vsintegration/src/Salsa/Salsa.fsproj @@ -7,7 +7,6 @@ true - Debug AnyCPU @@ -18,10 +17,6 @@ $(NoWarn);45;47;52;58;75 FX_ATLEAST_45;$(DefineConstants) - - $(DefineConstants);VS_VERSION_DEV12 - $(DefineConstants);VS_VERSION_DEV14 - @@ -41,11 +36,11 @@ - - - - - + + + + + @@ -66,8 +61,14 @@ - True - True + + True + $(NUnitLibDir)\nunit.framework.dll + + + True + $(NunitToolsLibDir)\nunit.util.dll + {DED3BBD7-53F4-428A-8C9F-27968E768605} FSharp.Core diff --git a/vsintegration/src/Salsa/VsMocks.fs b/vsintegration/src/Salsa/VsMocks.fs index 3151549b07..b70b3e234a 100644 --- a/vsintegration/src/Salsa/VsMocks.fs +++ b/vsintegration/src/Salsa/VsMocks.fs @@ -1635,10 +1635,10 @@ module internal VsActual = open Microsoft.VisualStudio.Text let vsInstallDir = -#if VS_VERSION_DEV14 - let key = @"SOFTWARE\Microsoft\VisualStudio\14.0" -#else +#if VS_VERSION_DEV12 let key = @"SOFTWARE\Microsoft\VisualStudio\12.0" +#else + let key = @"SOFTWARE\Microsoft\VisualStudio\14.0" #endif let hklm = Microsoft.Win32.RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, Microsoft.Win32.RegistryView.Registry32) let rkey = hklm.OpenSubKey(key) diff --git a/vsintegration/src/fsharp.vsreferences.targets b/vsintegration/src/fsharp.vsreferences.targets deleted file mode 100644 index 2b80e862d5..0000000000 --- a/vsintegration/src/fsharp.vsreferences.targets +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - Microsoft.VisualStudio.Shell.14.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL - Microsoft.VisualStudio.Shell.UI.Internal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL - Microsoft.VisualStudio.Utilities, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL - Microsoft.VisualStudio.Package.LanguageService.14.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL - - - - - Microsoft.VisualStudio.Shell.12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL - Microsoft.VisualStudio.Shell.UI.Internal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL - Microsoft.VisualStudio.Utilities, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL - Microsoft.VisualStudio.Package.LanguageService.12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL - - - - diff --git a/vsintegration/src/unittests/Tests.LanguageService.Script.fs b/vsintegration/src/unittests/Tests.LanguageService.Script.fs index 0826585336..260e47e828 100644 --- a/vsintegration/src/unittests/Tests.LanguageService.Script.fs +++ b/vsintegration/src/unittests/Tests.LanguageService.Script.fs @@ -568,11 +568,11 @@ type ScriptTests() as this = [] [] - // Nunit still registers itself in AssemblyFoldersEx so try to locate it. And we know that nunit exists on a machine running tests + // 'Microsoft.VisualStudio.QualityTools.Common.dll' is resolved via AssemblyFoldersEx over recent VS releases member public this.``Fsx.NoError.HashR.ResolveFromAssemblyFoldersEx``() = let fileContent = """ #light - #r "nunit.framework.dll" + #r "Microsoft.VisualStudio.QualityTools.Common.dll" """ this.VerifyFSXNoErrorList(fileContent) @@ -904,10 +904,10 @@ type ScriptTests() as this = [] [] member public this.``Fsx.HashR_QuickInfo.ResolveFromAssemblyFoldersEx``() = - let fileContent = """#r "nunit.framework.dll" """ // 'nunit.framework.dll' is located via AssemblyFoldersEx - let marker = "#r \"nunit.fra" - this.AssertQuickInfoContainsAtEndOfMarkerInFsxFile fileContent marker "nunit.framework, Version=" - this.AssertQuickInfoContainsAtEndOfMarkerInFsxFile fileContent marker "nunit.framework.dll" + let fileContent = """#r "Microsoft.VisualStudio.QualityTools.Common.dll" """ // 'Microsoft.VisualStudio.QualityTools.Common.dll' is located via AssemblyFoldersEx + let marker = "#r \"Microsoft.Vis" + this.AssertQuickInfoContainsAtEndOfMarkerInFsxFile fileContent marker "Microsoft.VisualStudio.QualityTools.Common, Version=" + this.AssertQuickInfoContainsAtEndOfMarkerInFsxFile fileContent marker "Microsoft.VisualStudio.QualityTools.Common.dll" [] [] @@ -1298,45 +1298,24 @@ type ScriptTests() as this = use _guard = this.UsingNewVS() let solution = this.CreateSolution() let project = CreateProject(solution,"testproject") -#if FX_ATLEAST_45 + let fsVersion = #if VS_VERSION_DEV12 - PlaceIntoProjectFileBeforeImport - (project, @" - - - - True - - - True - - ") + "4.3.1.0" #else + "4.4.0.0" +#endif PlaceIntoProjectFileBeforeImport - (project, @" + (project, sprintf @" - + True - + True - ") -#endif -#else - PlaceIntoProjectFileBeforeImport - (project, @" - - - - True - - - True - - ") -#endif + " fsVersion fsVersion) + let fsx = AddFileFromTextEx(project,"Script.fsx","Script.fsx",BuildAction.Compile, ["let x = fsi.CommandLineArgs"]) let build = time1 Build project "Time to build project" diff --git a/vsintegration/src/unittests/Tests.ProjectSystem.References.fs b/vsintegration/src/unittests/Tests.ProjectSystem.References.fs index a52fc2a760..319734ad26 100644 --- a/vsintegration/src/unittests/Tests.ProjectSystem.References.fs +++ b/vsintegration/src/unittests/Tests.ProjectSystem.References.fs @@ -22,18 +22,20 @@ type References() = inherit TheTests() //TODO: look for a way to remove the helper functions - static let Net35RefAssemPathOnThisMachine() = + static let Net35RefAssemPath () = let key = @"SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\Microsoft .NET Framework 3.5 Reference Assemblies" let hklm = Registry.LocalMachine let rkey = hklm.OpenSubKey(key) - rkey.GetValue("") :?> string - static let Net20AssemExPathOnThisMachine() = + let path = rkey.GetValue("") :?> string + if String.IsNullOrEmpty(path) then None + else Some(path) + static let Net20AssemExPath () = let key = @"SOFTWARE\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx\Public Assemblies (Common Files)" let hklm = Registry.LocalMachine let rkey = hklm.OpenSubKey(key) - rkey.GetValue("") :?> string - static let IsNet20AssemExPathOnThisMachine() = - if Net20AssemExPathOnThisMachine() <> "" then false else true + let path = rkey.GetValue("") :?> string + if String.IsNullOrEmpty(path) then None + else Some(path) ///////////////////////////////// // project helpers @@ -174,9 +176,10 @@ type References() = [] member public this.``ReferenceResolution.Bug4423.LoadedFsProj.WorksWithFilenames``() = - if IsNet20AssemExPathOnThisMachine() then - let edte = Path.Combine(Net20AssemExPathOnThisMachine(), "EnvDTE80.dll") - let ssmw = Path.Combine(Net35RefAssemPathOnThisMachine(), "System.ServiceModel.Web.dll") + match (Net20AssemExPath(), Net35RefAssemPath()) with + | Some(net20), Some(net35) -> + let edte = Path.Combine(net20, "EnvDTE80.dll") + let ssmw = Path.Combine(net35, "System.ServiceModel.Web.dll") this.MakeProjectAndDo(["doesNotMatter.fs"], [edte; ssmw], "", "v3.5", (fun project -> let expectedRefInfo = [ edte, true ssmw, true ] @@ -189,8 +192,7 @@ type References() = ] AssertEqual expectedRefInfo actualRefInfo )) - else - () + |_ -> () [] member public this.``ReferenceResolution.Bug4423.LoadedFsProj.WeirdCases``() = @@ -230,65 +232,79 @@ type References() = [] member public this.``ReferenceResolution.Bug4423.FxAssembly.NetTab.AddDuplicate1``() = - try - this.ReferenceResolutionHelper(AddReferenceDialogTab.DotNetTab, - Path.Combine(Net35RefAssemPathOnThisMachine(), "System.ServiceModel.Web.dll"), - @"whatever, expectation does not matter, will throw before then", - "v3.5", - ["System.ServiceModel.Web"]) // assembly name - Assert.Fail("adding a duplicate reference should have failed") - with e -> - TheTests.HelpfulAssertMatches ' ' "A reference to '.*' \\(with assembly name '.*'\\) could not be added. A reference to the component '.*' with the same assembly name already exists in the project." e.Message - + match Net35RefAssemPath() with + | Some(net35) -> + try + this.ReferenceResolutionHelper(AddReferenceDialogTab.DotNetTab, + Path.Combine(net35, "System.ServiceModel.Web.dll"), + @"whatever, expectation does not matter, will throw before then", + "v3.5", + ["System.ServiceModel.Web"]) // assembly name + Assert.Fail("adding a duplicate reference should have failed") + with e -> + TheTests.HelpfulAssertMatches ' ' "A reference to '.*' \\(with assembly name '.*'\\) could not be added. A reference to the component '.*' with the same assembly name already exists in the project." e.Message + | _ -> () // see 5491 [] member public this.``ReferenceResolution.Bug4423.FxAssembly.NetTab.AddDuplicate2``() = - try - this.ReferenceResolutionHelper(AddReferenceDialogTab.DotNetTab, - Path.Combine(Net35RefAssemPathOnThisMachine(), "System.ServiceModel.Web.dll"), - @"whatever, expectation does not matter, will throw before then", - "v3.5", - ["System.ServiceModel.Web.dll"]) // filename - Assert.Fail("adding a duplicate reference should have failed") - with e -> - TheTests.HelpfulAssertMatches ' ' "A reference to '.*' could not be added. A reference to the component '.*' already exists in the project." e.Message + match Net35RefAssemPath() with + | Some(net35) -> + try + this.ReferenceResolutionHelper(AddReferenceDialogTab.DotNetTab, + Path.Combine(net35, "System.ServiceModel.Web.dll"), + @"whatever, expectation does not matter, will throw before then", + "v3.5", + ["System.ServiceModel.Web.dll"]) // filename + Assert.Fail("adding a duplicate reference should have failed") + with e -> + TheTests.HelpfulAssertMatches ' ' "A reference to '.*' could not be added. A reference to the component '.*' already exists in the project." e.Message + | _ -> () [] member public this.``ReferenceResolution.Bug4423.FxAssembly.NetTab``() = - this.ReferenceResolutionHelper(AddReferenceDialogTab.DotNetTab, - Path.Combine(Net35RefAssemPathOnThisMachine(), "System.ServiceModel.Web.dll"), - // TODO the intent here is to match whatever C# does; below is a snapshot from July 7, 2009 - @"") + match Net35RefAssemPath() with + | Some(net35) -> + this.ReferenceResolutionHelper(AddReferenceDialogTab.DotNetTab, + Path.Combine(net35, "System.ServiceModel.Web.dll"), + // TODO the intent here is to match whatever C# does; below is a snapshot from July 7, 2009 + @"") + | _ -> () [] member public this.``ReferenceResolution.Bug4423.FxAssembly.BrowseTab.SameVersion``() = - let sysCoreRefAssemPath = Path.Combine(Net35RefAssemPathOnThisMachine(), "System.ServiceModel.Web.dll") - let dirName = Path.GetTempPath() - let copy = Path.Combine(dirName, "System.ServiceModel.Web.dll") - try - File.Copy(sysCoreRefAssemPath, copy, true) - this.ReferenceResolutionHelper(AddReferenceDialogTab.BrowseTab, - copy, - // TODO the intent here is to match whatever C# does; below is a snapshot from July 7, 2009 - @"") - finally - File.Delete(copy) + match Net35RefAssemPath() with + | Some(net35) -> + let sysCoreRefAssemPath = Path.Combine(net35, "System.ServiceModel.Web.dll") + let dirName = Path.GetTempPath() + let copy = Path.Combine(dirName, "System.ServiceModel.Web.dll") + try + File.Copy(sysCoreRefAssemPath, copy, true) + this.ReferenceResolutionHelper(AddReferenceDialogTab.BrowseTab, + copy, + // TODO the intent here is to match whatever C# does; below is a snapshot from July 7, 2009 + @"") + finally + File.Delete(copy) + | _ -> () [] member public this.``ReferenceResolution.Bug4423.FxAssembly.BrowseTab.DifferentVersion``() = - let sysCoreRefAssemPath = Path.Combine(Net35RefAssemPathOnThisMachine(), "System.ServiceModel.Web.dll") - let dirName = Path.GetTempPath() - let copy = Path.Combine(dirName, "System.ServiceModel.Web.dll") - try - File.Copy(sysCoreRefAssemPath, copy, true) - this.ReferenceResolutionHelper(AddReferenceDialogTab.BrowseTab, - copy, - // TODO the intent here is to match whatever C# does; below is a snapshot from July 7, 2009 - @"", - "v4.0", // TargetFramework is 4.0, but browsing to 3.5 reference assembly - []) - finally - File.Delete(copy) + match Net35RefAssemPath() with + | Some(net35) -> + let sysCoreRefAssemPath = Path.Combine(net35, "System.ServiceModel.Web.dll") + let dirName = Path.GetTempPath() + let copy = Path.Combine(dirName, "System.ServiceModel.Web.dll") + try + File.Copy(sysCoreRefAssemPath, copy, true) + this.ReferenceResolutionHelper(AddReferenceDialogTab.BrowseTab, + copy, + // TODO the intent here is to match whatever C# does; below is a snapshot from July 7, 2009 + @"", + "v4.0", // TargetFramework is 4.0, but browsing to 3.5 reference assembly + []) + finally + File.Delete(copy) + | _ -> () [] member public this.``ReferenceResolution.NonFxAssembly.SeveralCandidates``() = @@ -332,8 +348,9 @@ type References() = [] member public this.``ReferenceResolution.Bug4423.NonFxAssembly.NetTab``() = - if IsNet20AssemExPathOnThisMachine() then - this.ReferenceResolutionHelper(AddReferenceDialogTab.DotNetTab, Path.Combine(Net20AssemExPathOnThisMachine(), "EnvDTE80.dll"), + match Net20AssemExPath() with + | Some(net20) -> + this.ReferenceResolutionHelper(AddReferenceDialogTab.DotNetTab, Path.Combine(net20, "EnvDTE80.dll"), (* TODO, no NoPIA support yet, so *) @"") (* instead of below @@ -342,13 +359,13 @@ type References() = + @"\s*True" + @"\s*") *) - else - () + | _ -> () [] member public this.``ReferenceResolution.Bug4423.NonFxAssembly.BrowseTab.SameVersion``() = - if IsNet20AssemExPathOnThisMachine() then - let envDte80RefAssemPath = Path.Combine(Net20AssemExPathOnThisMachine(), "EnvDTE80.dll") + match Net20AssemExPath() with + | Some(net20) -> + let envDte80RefAssemPath = Path.Combine(net20, "EnvDTE80.dll") let dirName = Path.GetTempPath() let copy = Path.Combine(dirName, "EnvDTE80.dll") try @@ -372,12 +389,12 @@ type References() = *) finally File.Delete(copy) - else - () + | _ -> () [] member public this.``ReferenceResolution.Bug650591.AutomationReference.Add.FullPath``() = - if IsNet20AssemExPathOnThisMachine() then + match Net20AssemExPath() with + | Some(net20) -> let invoker = { new Microsoft.Internal.VisualStudio.Shell.Interop.IVsInvokerPrivate with @@ -414,7 +431,7 @@ type References() = } let _ = Microsoft.VisualStudio.Shell.ServiceProvider.CreateFromSetSite(mockProvider) - let envDte80RefAssemPath = Path.Combine(Net20AssemExPathOnThisMachine(), "EnvDTE80.dll") + let envDte80RefAssemPath = Path.Combine(net20, "EnvDTE80.dll") let dirName = Path.GetTempPath() let copy = Path.Combine(dirName, "EnvDTE80.dll") try @@ -439,8 +456,7 @@ type References() = ) finally File.Delete(copy) - else - () + | _ -> () /// Create a dummy project named 'Test', build it, and then call k with the full path to the resulting exe member public this.CreateDummyTestProjectBuildItAndDo(k : string -> unit) = diff --git a/vsintegration/src/unittests/Unittests.dll.config b/vsintegration/src/unittests/Unittests.dll.config index da55b74c98..67a0d2d2c1 100644 --- a/vsintegration/src/unittests/Unittests.dll.config +++ b/vsintegration/src/unittests/Unittests.dll.config @@ -20,11 +20,11 @@ - + - + diff --git a/vsintegration/src/unittests/Unittests.dll.v12.config b/vsintegration/src/unittests/Unittests.dll.v12.config deleted file mode 100644 index e822f23210..0000000000 --- a/vsintegration/src/unittests/Unittests.dll.v12.config +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vsintegration/src/unittests/Unittests.fsproj b/vsintegration/src/unittests/Unittests.fsproj index d625acdf19..a558740f47 100644 --- a/vsintegration/src/unittests/Unittests.fsproj +++ b/vsintegration/src/unittests/Unittests.fsproj @@ -7,7 +7,6 @@ true - Debug 2.0 @@ -19,10 +18,6 @@ 58;75 x86 - - $(DefineConstants);VS_VERSION_DEV12 - $(DefineConstants);VS_VERSION_DEV14 - Internal.Utilities.Collections.fsi @@ -67,10 +62,7 @@ - - Unittests.dll.config - - + Unittests.dll.config @@ -88,16 +80,16 @@ - - - - + + + + - + @@ -112,8 +104,14 @@ - True - True + + True + $(NunitToolsLibDir)\nunit.util.dll + + + True + $(NUnitLibDir)\nunit.framework.dll + {ffde9e47-9675-4498-b540-69b2583dd600} Fsc diff --git a/vsintegration/src/vs/FsPkgs/FSharp.Editor/FSharp.Editor.fsproj b/vsintegration/src/vs/FsPkgs/FSharp.Editor/FSharp.Editor.fsproj index f367d8cc26..ffa3858371 100644 --- a/vsintegration/src/vs/FsPkgs/FSharp.Editor/FSharp.Editor.fsproj +++ b/vsintegration/src/vs/FsPkgs/FSharp.Editor/FSharp.Editor.fsproj @@ -7,7 +7,6 @@ true - Debug AnyCPU diff --git a/vsintegration/src/vs/FsPkgs/FSharp.LanguageService/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj b/vsintegration/src/vs/FsPkgs/FSharp.LanguageService/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj index bdefd798be..05941c09dc 100644 --- a/vsintegration/src/vs/FsPkgs/FSharp.LanguageService/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj +++ b/vsintegration/src/vs/FsPkgs/FSharp.LanguageService/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj @@ -37,10 +37,9 @@ true - - - + + @@ -53,7 +52,7 @@ - + diff --git a/vsintegration/src/vs/FsPkgs/FSharp.LanguageService/FSharp.LanguageService.fsproj b/vsintegration/src/vs/FsPkgs/FSharp.LanguageService/FSharp.LanguageService.fsproj index f41774823d..422b2babc7 100644 --- a/vsintegration/src/vs/FsPkgs/FSharp.LanguageService/FSharp.LanguageService.fsproj +++ b/vsintegration/src/vs/FsPkgs/FSharp.LanguageService/FSharp.LanguageService.fsproj @@ -21,7 +21,6 @@ true - @@ -58,14 +57,14 @@ - - + + - + @@ -73,7 +72,7 @@ - + diff --git a/vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project/IDEBuildLogger.cs b/vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project/IDEBuildLogger.cs index f2e5522949..e13d221e7d 100644 --- a/vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project/IDEBuildLogger.cs +++ b/vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project/IDEBuildLogger.cs @@ -21,10 +21,10 @@ namespace Microsoft.VisualStudio.FSharp.ProjectSystem { public static class LoggingConstants { -#if VS_VERSION_DEV14 - public const string DefaultVSRegistryRoot = @"Software\Microsoft\VisualStudio\14.0"; -#else +#if VS_VERSION_DEV12 public const string DefaultVSRegistryRoot = @"Software\Microsoft\VisualStudio\12.0"; +#else + public const string DefaultVSRegistryRoot = @"Software\Microsoft\VisualStudio\14.0"; #endif public const string BuildVerbosityRegistrySubKey = @"General"; public const string BuildVerbosityRegistryValue = "MSBuildLoggerVerbosity"; diff --git a/vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project/ProjectConfig.cs b/vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project/ProjectConfig.cs index 4b42b85346..4d608ea7a9 100644 --- a/vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project/ProjectConfig.cs +++ b/vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project/ProjectConfig.cs @@ -1658,10 +1658,10 @@ namespace Microsoft.VisualStudio.FSharp.ProjectSystem { #if FX_ATLEAST_45 -#if VS_VERSION_DEV14 - private static string RegistryRoot = @"SOFTWARE\Microsoft\VisualStudio\14.0\"; -#else +#if VS_VERSION_DEV12 private static string RegistryRoot = @"SOFTWARE\Microsoft\VisualStudio\12.0\"; +#else + private static string RegistryRoot = @"SOFTWARE\Microsoft\VisualStudio\14.0\"; #endif private static bool? isMultiThreadedBuildEnabled = null; internal static bool IsMultiThreadedBuildEnabled() diff --git a/vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project/ProjectSystem.Base.csproj b/vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project/ProjectSystem.Base.csproj index d166926da5..72df109e23 100644 --- a/vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project/ProjectSystem.Base.csproj +++ b/vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project/ProjectSystem.Base.csproj @@ -29,8 +29,6 @@ - - true $(FSharpSourcesRoot)\fsharp\msft.pubkey @@ -38,17 +36,12 @@ true true - - $(DefineConstants);VS_VERSION_DEV12 - $(DefineConstants);VS_VERSION_DEV14 - - - - - - - + + + + + @@ -67,7 +60,7 @@ - + diff --git a/vsintegration/src/vs/FsPkgs/FSharp.Project/FS/ProjectSystem.fsproj b/vsintegration/src/vs/FsPkgs/FSharp.Project/FS/ProjectSystem.fsproj index 9ec028f0d7..19d3d27b45 100644 --- a/vsintegration/src/vs/FsPkgs/FSharp.Project/FS/ProjectSystem.fsproj +++ b/vsintegration/src/vs/FsPkgs/FSharp.Project/FS/ProjectSystem.fsproj @@ -26,7 +26,6 @@ ProjectResources.rc - @@ -66,13 +65,13 @@ - - - - - - - + + + + + + + diff --git a/vsintegration/src/vs/FsPkgs/FSharp.Project/VB/FSharpPropPage/FSharp.PropertiesPages.vbproj b/vsintegration/src/vs/FsPkgs/FSharp.Project/VB/FSharpPropPage/FSharp.PropertiesPages.vbproj index 26d5756b95..b1943d111a 100644 --- a/vsintegration/src/vs/FsPkgs/FSharp.Project/VB/FSharpPropPage/FSharp.PropertiesPages.vbproj +++ b/vsintegration/src/vs/FsPkgs/FSharp.Project/VB/FSharpPropPage/FSharp.PropertiesPages.vbproj @@ -47,7 +47,6 @@ true - @@ -60,7 +59,7 @@ - + diff --git a/vsintegration/src/vs/FsPkgs/FSharp.VS.FSI/FSHarp.VS.FSI.fsproj b/vsintegration/src/vs/FsPkgs/FSharp.VS.FSI/FSHarp.VS.FSI.fsproj index b465475096..f19d703afb 100644 --- a/vsintegration/src/vs/FsPkgs/FSharp.VS.FSI/FSHarp.VS.FSI.fsproj +++ b/vsintegration/src/vs/FsPkgs/FSharp.VS.FSI/FSHarp.VS.FSI.fsproj @@ -8,7 +8,6 @@ 14.0 - Debug AnyCPU @@ -40,13 +39,14 @@ - + - + + @@ -79,7 +79,6 @@ - {DED3BBD7-53F4-428A-8C9F-27968E768605} FSharp.Core