From 76a929374b4b9313f2e1cf6a1e5a2b17a439fd90 Mon Sep 17 00:00:00 2001 From: Erik Mavrinac Date: Thu, 21 Nov 2019 14:08:42 -0800 Subject: [PATCH 01/24] Convert netframework proj files to 472, add netcore3.1 for MC++ library and dual compilation for unit tests --- .../ProjectedFSLib.Managed.Netcore.vcxproj | 27 ++ .../ProjectedFSLib.Managed.vcxproj | 16 + .../ProjectedFSLib.Managed.vcxproj.filters | 226 ++++++------- ...d.vcxproj => ProjectedFSLib.Managed.props} | 303 +++++++++--------- .../ProjectedFSLib.Managed.Test.csproj | 12 +- ProjectedFSLib.Managed.cs.props | 8 +- ProjectedFSLib.Managed.props | 2 +- ProjectedFSLib.Managed.sln | 30 +- scripts/BuildProjFS-Managed.bat | 6 +- scripts/RunTests.bat | 2 +- .../SimpleProviderManaged.csproj | 93 ++---- simpleProviderManaged/packages.config | 7 - 12 files changed, 355 insertions(+), 377 deletions(-) create mode 100644 ProjectedFSLib.Managed.API/NetCore/ProjectedFSLib.Managed.Netcore.vcxproj create mode 100644 ProjectedFSLib.Managed.API/NetFramework/ProjectedFSLib.Managed.vcxproj rename ProjectedFSLib.Managed.API/{ => NetFramework}/ProjectedFSLib.Managed.vcxproj.filters (97%) rename ProjectedFSLib.Managed.API/{ProjectedFSLib.Managed.vcxproj => ProjectedFSLib.Managed.props} (61%) delete mode 100644 simpleProviderManaged/packages.config diff --git a/ProjectedFSLib.Managed.API/NetCore/ProjectedFSLib.Managed.Netcore.vcxproj b/ProjectedFSLib.Managed.API/NetCore/ProjectedFSLib.Managed.Netcore.vcxproj new file mode 100644 index 0000000..2abbf06 --- /dev/null +++ b/ProjectedFSLib.Managed.API/NetCore/ProjectedFSLib.Managed.Netcore.vcxproj @@ -0,0 +1,27 @@ + + + + {D29E5723-25E6-41C7-AEB9-099CDE30538A} + netcoreapp3.1 + NetCore + + + + + + 4564 + + + + + + 4564 + + + + + \ No newline at end of file diff --git a/ProjectedFSLib.Managed.API/NetFramework/ProjectedFSLib.Managed.vcxproj b/ProjectedFSLib.Managed.API/NetFramework/ProjectedFSLib.Managed.vcxproj new file mode 100644 index 0000000..428d57a --- /dev/null +++ b/ProjectedFSLib.Managed.API/NetFramework/ProjectedFSLib.Managed.vcxproj @@ -0,0 +1,16 @@ + + + + {4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA} + v4.7.2 + true + + + + + + + + + + diff --git a/ProjectedFSLib.Managed.API/ProjectedFSLib.Managed.vcxproj.filters b/ProjectedFSLib.Managed.API/NetFramework/ProjectedFSLib.Managed.vcxproj.filters similarity index 97% rename from ProjectedFSLib.Managed.API/ProjectedFSLib.Managed.vcxproj.filters rename to ProjectedFSLib.Managed.API/NetFramework/ProjectedFSLib.Managed.vcxproj.filters index 43a0d38..d74e85b 100644 --- a/ProjectedFSLib.Managed.API/ProjectedFSLib.Managed.vcxproj.filters +++ b/ProjectedFSLib.Managed.API/NetFramework/ProjectedFSLib.Managed.vcxproj.filters @@ -1,114 +1,114 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Resource Files - - - - - Resource Files - - - - - Source Files - - - Source Files - - + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Resource Files + + + + + Resource Files + + + + + Source Files + + + Source Files + + \ No newline at end of file diff --git a/ProjectedFSLib.Managed.API/ProjectedFSLib.Managed.vcxproj b/ProjectedFSLib.Managed.API/ProjectedFSLib.Managed.props similarity index 61% rename from ProjectedFSLib.Managed.API/ProjectedFSLib.Managed.vcxproj rename to ProjectedFSLib.Managed.API/ProjectedFSLib.Managed.props index 3d218e5..e820489 100644 --- a/ProjectedFSLib.Managed.API/ProjectedFSLib.Managed.vcxproj +++ b/ProjectedFSLib.Managed.API/ProjectedFSLib.Managed.props @@ -1,157 +1,148 @@ - - - - - Debug - x64 - - - Release - x64 - - - - 15.0 - {4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA} - v4.6.1 - ManagedCProj - Microsoft.Windows.ProjFS - 10.0.17763.0 - - - - - DynamicLibrary - true - v141 - true - Unicode - - - DynamicLibrary - false - v141 - true - Unicode - Spectre - - - - - - - - - - - - - - - true - MixedRecommendedRules.ruleset - true - ProjectedFSLib.Managed - C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(IncludePath) - - - false - MixedRecommendedRules.ruleset - false - ProjectedFSLib.Managed - C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(IncludePath) - - - - stdcpp17 - true - true - Level4 - true - true - C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(BuildOutputDir)\$(ProjectName);%(AdditionalIncludeDirectories) - - - ProjectedFSLib.lib;%(AdditionalDependencies) - C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64;%(AdditionalLibraryDirectories) - - - $(ProjectDir)\Scripts\CreateVersionHeader.bat $(ProjectName) $(ProjFSManagedVersion) $(SolutionDir) && $(ProjectDir)\Scripts\CreateCliAssemblyVersion.bat $(ProjectName) $(ProjFSManagedVersion) $(SolutionDir) - - - $(BuildOutputDir)\$(ProjectName);%(AdditionalIncludeDirectories) - - - - - stdcpp17 - true - true - Level4 - true - false - true - C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt;$(BuildOutputDir)\$(ProjectName);%(AdditionalIncludeDirectories) - - - ProjectedFSLib.lib;%(AdditionalDependencies) - C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64;%(AdditionalLibraryDirectories) - - - $(ProjectDir)\Scripts\CreateVersionHeader.bat $(ProjectName) $(ProjFSManagedVersion) $(SolutionDir) && $(ProjectDir)\Scripts\CreateCliAssemblyVersion.bat $(ProjectName) $(ProjFSManagedVersion) $(SolutionDir) - - - $(BuildOutputDir)\$(ProjectName);%(AdditionalIncludeDirectories) - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create - Create - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug + x64 + + + Release + x64 + + + + 16.0 + ManagedCProj + Microsoft.Windows.ProjFS + 10.0 + + + + + DynamicLibrary + true + v142 + Unicode + + + DynamicLibrary + false + v142 + Unicode + Spectre + + + + + + + + + + + + + + + true + MixedRecommendedRules.ruleset + true + ProjectedFSLib.Managed + C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362\um;$(IncludePath) + + + false + MixedRecommendedRules.ruleset + false + ProjectedFSLib.Managed + C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um;$(IncludePath) + + + + stdcpp17 + true + true + Level4 + true + true + C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um;$(BuildOutputDir)\$(ProjectName);%(AdditionalIncludeDirectories) + + + ProjectedFSLib.lib;%(AdditionalDependencies) + C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64;%(AdditionalLibraryDirectories) + + + $(ProjectDir)\..\Scripts\CreateVersionHeader.bat $(ProjectName) $(ProjFSManagedVersion) $(SolutionDir) && $(ProjectDir)\..\Scripts\CreateCliAssemblyVersion.bat $(ProjectName) $(ProjFSManagedVersion) $(SolutionDir) + + + $(BuildOutputDir)\$(ProjectName);%(AdditionalIncludeDirectories) + + + + + stdcpp17 + true + true + Level4 + true + false + true + C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um;$(BuildOutputDir)\$(ProjectName);%(AdditionalIncludeDirectories) + + + ProjectedFSLib.lib;%(AdditionalDependencies) + C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64;%(AdditionalLibraryDirectories) + + + $(ProjectDir)\..\Scripts\CreateVersionHeader.bat $(ProjectName) $(ProjFSManagedVersion) $(SolutionDir) && $(ProjectDir)\..\Scripts\CreateCliAssemblyVersion.bat $(ProjectName) $(ProjFSManagedVersion) $(SolutionDir) + + + $(BuildOutputDir)\$(ProjectName);%(AdditionalIncludeDirectories) + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ProjectedFSLib.Managed.Test/ProjectedFSLib.Managed.Test.csproj b/ProjectedFSLib.Managed.Test/ProjectedFSLib.Managed.Test.csproj index 0ff0cf5..2ba9748 100644 --- a/ProjectedFSLib.Managed.Test/ProjectedFSLib.Managed.Test.csproj +++ b/ProjectedFSLib.Managed.Test/ProjectedFSLib.Managed.Test.csproj @@ -1,14 +1,13 @@  - - net461 + + + netcoreapp3.1 false false - AnyCPU;x64 - + x64 Exe - @@ -17,7 +16,8 @@ - + + \ No newline at end of file diff --git a/ProjectedFSLib.Managed.cs.props b/ProjectedFSLib.Managed.cs.props index e8e27b2..e4fbd0a 100644 --- a/ProjectedFSLib.Managed.cs.props +++ b/ProjectedFSLib.Managed.cs.props @@ -4,9 +4,9 @@ - $(BuildOutputDir)\$(MSBuildProjectName)\bin\$(Platform)\$(Configuration)\ - $(BuildOutputDir)\$(MSBuildProjectName)\obj\$(Platform)\$(Configuration)\ - $(BuildOutputDir)\$(MSBuildProjectName)\intermediate\$(Platform)\$(Configuration)\ + $(BuildOutputDir)\$(MSBuildProjectName)\bin\$(Platform)\$(Configuration)\$(TargetFramework)\ + $(BuildOutputDir)\$(MSBuildProjectName)\obj\$(Platform)\$(Configuration)\$(TargetFramework)\ + $(BuildOutputDir)\$(MSBuildProjectName)\intermediate\$(Platform)\$(Configuration)\$(TargetFramework)\ - + diff --git a/ProjectedFSLib.Managed.props b/ProjectedFSLib.Managed.props index f233e9c..b6a5097 100644 --- a/ProjectedFSLib.Managed.props +++ b/ProjectedFSLib.Managed.props @@ -2,7 +2,7 @@ - 0.2.173.2 + 0.3.0.0 diff --git a/ProjectedFSLib.Managed.sln b/ProjectedFSLib.Managed.sln index 11d680a..91213d5 100644 --- a/ProjectedFSLib.Managed.sln +++ b/ProjectedFSLib.Managed.sln @@ -1,13 +1,15 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28010.2048 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29512.175 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ProjectedFSLib.Managed", "ProjectedFSLib.Managed.API\ProjectedFSLib.Managed.vcxproj", "{4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ProjectedFSLib.Managed", "ProjectedFSLib.Managed.API\NetFramework\ProjectedFSLib.Managed.vcxproj", "{4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ProjectedFSLib.Managed.NetCore", "ProjectedFSLib.Managed.API\NetCore\ProjectedFSLib.Managed.NetCore.vcxproj", "{D29E5723-25E6-41C7-AEB9-099CDE30538A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProjectedFSLib.Managed.Test", "ProjectedFSLib.Managed.Test\ProjectedFSLib.Managed.Test.csproj", "{B4018C7F-BF11-47BC-8770-72B05C9437EE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleProviderManaged", "simpleProviderManaged\SimpleProviderManaged.csproj", "{5697F978-E1ED-4C2E-8218-4110F5EA559D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleProviderManaged", "simpleProviderManaged\SimpleProviderManaged.csproj", "{5697F978-E1ED-4C2E-8218-4110F5EA559D}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{028D4D62-E4B9-44F0-A086-921292B7E89B}" ProjectSection(SolutionItems) = preProject @@ -32,14 +34,18 @@ Global {4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA}.Debug|x64.Build.0 = Debug|x64 {4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA}.Release|x64.ActiveCfg = Release|x64 {4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA}.Release|x64.Build.0 = Release|x64 - {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Debug|x64.ActiveCfg = Debug|x64 - {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Debug|x64.Build.0 = Debug|x64 - {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Release|x64.ActiveCfg = Release|x64 - {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Release|x64.Build.0 = Release|x64 - {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Debug|x64.ActiveCfg = Debug|x64 - {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Debug|x64.Build.0 = Debug|x64 - {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Release|x64.ActiveCfg = Release|x64 - {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Release|x64.Build.0 = Release|x64 + {D29E5723-25E6-41C7-AEB9-099CDE30538A}.Debug|x64.ActiveCfg = Debug|x64 + {D29E5723-25E6-41C7-AEB9-099CDE30538A}.Debug|x64.Build.0 = Debug|x64 + {D29E5723-25E6-41C7-AEB9-099CDE30538A}.Release|x64.ActiveCfg = Release|x64 + {D29E5723-25E6-41C7-AEB9-099CDE30538A}.Release|x64.Build.0 = Release|x64 + {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Debug|x64.ActiveCfg = Debug|Any CPU + {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Debug|x64.Build.0 = Debug|Any CPU + {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Release|x64.ActiveCfg = Release|Any CPU + {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Release|x64.Build.0 = Release|Any CPU + {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Debug|x64.ActiveCfg = Debug|Any CPU + {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Debug|x64.Build.0 = Debug|Any CPU + {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Release|x64.ActiveCfg = Release|Any CPU + {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/scripts/BuildProjFS-Managed.bat b/scripts/BuildProjFS-Managed.bat index 5305eae..86c7570 100644 --- a/scripts/BuildProjFS-Managed.bat +++ b/scripts/BuildProjFS-Managed.bat @@ -4,7 +4,7 @@ SETLOCAL ENABLEDELAYEDEXPANSION CALL %~dp0\InitializeEnvironment.bat || EXIT /b 10 IF "%1"=="" (SET "Configuration=Debug") ELSE (SET "Configuration=%1") -IF "%2"=="" (SET "ProjFSManagedVersion=0.2.173.2") ELSE (SET "ProjFSManagedVersion=%2") +IF "%2"=="" (SET "ProjFSManagedVersion=0.3.0.0") ELSE (SET "ProjFSManagedVersion=%2") SET SolutionConfiguration=%Configuration% @@ -48,9 +48,9 @@ IF NOT EXIST %msbuild% ( :: Restore all dependencies. %nuget% restore %PROJFS_SRCDIR%\ProjectedFSLib.Managed.sln -dotnet restore %PROJFS_SRCDIR%\ProjectedFSLib.Managed.sln /p:Configuration=%SolutionConfiguration% /p:VCTargetsPath="C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140" --packages %PROJFS_PACKAGESDIR% || exit /b 1 +dotnet restore %PROJFS_SRCDIR%\ProjectedFSLib.Managed.sln /p:Configuration=%SolutionConfiguration% /p:VCTargetsPath="C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Microsoft\VC\v160\Platforms\x64\PlatformToolsets\!PlatformToolset!" --packages %PROJFS_PACKAGESDIR% || exit /b 1 :: Kick off the build. !msbuild! %PROJFS_SRCDIR%\ProjectedFSLib.Managed.sln /p:ProjFSManagedVersion=%ProjFSManagedVersion% /p:Configuration=%SolutionConfiguration% /p:Platform=x64 /p:PlatformToolset=!PlatformToolset! || exit /b 1 -ENDLOCAL \ No newline at end of file +ENDLOCAL diff --git a/scripts/RunTests.bat b/scripts/RunTests.bat index 9fc1f69..27431f5 100644 --- a/scripts/RunTests.bat +++ b/scripts/RunTests.bat @@ -5,6 +5,6 @@ IF "%1"=="" (SET "Configuration=Debug") ELSE (SET "Configuration=%1") set RESULT=0 -%PROJFS_OUTPUTDIR%\ProjectedFSLib.Managed.Test\bin\x64\%Configuration%\net461\ProjectedFSLib.Managed.Test.exe --params ProviderExe=%PROJFS_OUTPUTDIR%\SimpleProviderManaged\bin\x64\%Configuration%\SimpleProviderManaged.exe || set RESULT=1 +%PROJFS_OUTPUTDIR%\ProjectedFSLib.Managed.Test\bin\x64\%Configuration%\net472\ProjectedFSLib.Managed.Test.exe --params ProviderExe=%PROJFS_OUTPUTDIR%\SimpleProviderManaged\bin\x64\%Configuration%\net472\SimpleProviderManaged.exe || set RESULT=1 exit /b %RESULT% \ No newline at end of file diff --git a/simpleProviderManaged/SimpleProviderManaged.csproj b/simpleProviderManaged/SimpleProviderManaged.csproj index 8fa1160..c007143 100644 --- a/simpleProviderManaged/SimpleProviderManaged.csproj +++ b/simpleProviderManaged/SimpleProviderManaged.csproj @@ -1,87 +1,32 @@ - + + + - Debug - x86 - {5697F978-E1ED-4C2E-8218-4110F5EA559D} + net472 Exe - false - SimpleProviderManaged - v4.6.1 - - - 512 - - - SimpleProviderManaged - - - true - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - false - - - TRACE - true - pdbonly x64 - prompt MinimumRecommendedRules.ruleset - false - - - true + - - ..\..\packages\CommandLineParser.2.4.3\lib\netstandard2.0\CommandLine.dll - - - - ..\..\packages\Serilog.2.8.0\lib\net46\Serilog.dll - - - ..\..\packages\Serilog.Sinks.Console.3.1.1\lib\net45\Serilog.Sinks.Console.dll - - - ..\..\packages\Serilog.Sinks.File.4.0.0\lib\net45\Serilog.Sinks.File.dll - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - + {4e5f40b3-b56f-4b62-92cb-68e7e0e36afa} ProjectedFSLib.Managed - - - - - \ No newline at end of file + + + + + + + + diff --git a/simpleProviderManaged/packages.config b/simpleProviderManaged/packages.config deleted file mode 100644 index fd09f24..0000000 --- a/simpleProviderManaged/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file From ec1f116c9ca14233e6c3f5d55c6320a089b1bf31 Mon Sep 17 00:00:00 2001 From: Erik Mavrinac Date: Mon, 25 Nov 2019 19:00:44 -0800 Subject: [PATCH 02/24] Move BuildOutput under the enlistment --- .gitignore | 1 + .../scripts/CreateCliAssemblyVersion.bat | 16 ++++++++-------- .../scripts/CreateVersionHeader.bat | 12 ++++++------ ProjectedFSLib.Managed.props | 4 ++-- ProjectedFSLib.Managed.sln.DotSettings | 2 ++ 5 files changed, 19 insertions(+), 16 deletions(-) create mode 100644 ProjectedFSLib.Managed.sln.DotSettings diff --git a/.gitignore b/.gitignore index 3e759b7..88f999f 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ *.userprefs # Build results +BuildOutput/ [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ diff --git a/ProjectedFSLib.Managed.API/scripts/CreateCliAssemblyVersion.bat b/ProjectedFSLib.Managed.API/scripts/CreateCliAssemblyVersion.bat index d7603e4..369ebac 100644 --- a/ProjectedFSLib.Managed.API/scripts/CreateCliAssemblyVersion.bat +++ b/ProjectedFSLib.Managed.API/scripts/CreateCliAssemblyVersion.bat @@ -4,11 +4,11 @@ set ProjectName=%1 set VersionString=%2 set SolutionDir=%3 -mkdir %SolutionDir%\..\BuildOutput -mkdir %SolutionDir%\..\BuildOutput\%ProjectName% -echo #include "stdafx.h" > %SolutionDir%\..\BuildOutput\%ProjectName%\AssemblyVersion.h -echo using namespace System::Reflection; >> %SolutionDir%\..\BuildOutput\%ProjectName%\AssemblyVersion.h -echo [assembly:AssemblyVersion("%VersionString%")]; >> %SolutionDir%\..\BuildOutput\%ProjectName%\AssemblyVersion.h -echo [assembly:AssemblyFileVersion("%VersionString%")]; >> %SolutionDir%\..\BuildOutput\%ProjectName%\AssemblyVersion.h -echo [assembly:AssemblyKeyFileAttribute(LR"(%SolutionDir%ProjectedFSLib.Managed.API\signing\35MSSharedLib1024.snk)")]; >> %SolutionDir%\..\BuildOutput\%ProjectName%\AssemblyVersion.h -echo [assembly:AssemblyDelaySignAttribute(true)]; >> %SolutionDir%\..\BuildOutput\%ProjectName%\AssemblyVersion.h \ No newline at end of file +mkdir %SolutionDir%\BuildOutput +mkdir %SolutionDir%\BuildOutput\%ProjectName% +echo #include "stdafx.h" > %SolutionDir%\BuildOutput\%ProjectName%\AssemblyVersion.h +echo using namespace System::Reflection; >> %SolutionDir%\BuildOutput\%ProjectName%\AssemblyVersion.h +echo [assembly:AssemblyVersion("%VersionString%")]; >> %SolutionDir%\BuildOutput\%ProjectName%\AssemblyVersion.h +echo [assembly:AssemblyFileVersion("%VersionString%")]; >> %SolutionDir%\BuildOutput\%ProjectName%\AssemblyVersion.h +echo [assembly:AssemblyKeyFileAttribute(LR"(%SolutionDir%ProjectedFSLib.Managed.API\signing\35MSSharedLib1024.snk)")]; >> %SolutionDir%\BuildOutput\%ProjectName%\AssemblyVersion.h +echo [assembly:AssemblyDelaySignAttribute(true)]; >> %SolutionDir%\BuildOutput\%ProjectName%\AssemblyVersion.h \ No newline at end of file diff --git a/ProjectedFSLib.Managed.API/scripts/CreateVersionHeader.bat b/ProjectedFSLib.Managed.API/scripts/CreateVersionHeader.bat index 74d6f53..55c5de5 100644 --- a/ProjectedFSLib.Managed.API/scripts/CreateVersionHeader.bat +++ b/ProjectedFSLib.Managed.API/scripts/CreateVersionHeader.bat @@ -4,13 +4,13 @@ set ProjectName=%1 set VersionString=%2 set SolutionDir=%3 -mkdir %SolutionDir%\..\BuildOutput -mkdir %SolutionDir%\..\BuildOutput\%ProjectName% +mkdir %SolutionDir%\BuildOutput +mkdir %SolutionDir%\BuildOutput\%ProjectName% set comma_version_string=%VersionString% set comma_version_string=%comma_version_string:.=,% -echo #define PRJLIB_FILE_VERSION %comma_version_string% > %SolutionDir%\..\BuildOutput\%ProjectName%\VersionHeader.h -echo #define PRJLIB_FILE_VERSION_STRING "%VersionString%" >> %SolutionDir%\..\BuildOutput\%ProjectName%\VersionHeader.h -echo #define PRJLIB_PRODUCT_VERSION %comma_version_string% >> %SolutionDir%\..\BuildOutput\%ProjectName%\VersionHeader.h -echo #define PRJLIB_PRODUCT_VERSION_STRING "%VersionString%" >> %SolutionDir%\..\BuildOutput\%ProjectName%\VersionHeader.h \ No newline at end of file +echo #define PRJLIB_FILE_VERSION %comma_version_string% > %SolutionDir%\BuildOutput\%ProjectName%\VersionHeader.h +echo #define PRJLIB_FILE_VERSION_STRING "%VersionString%" >> %SolutionDir%\BuildOutput\%ProjectName%\VersionHeader.h +echo #define PRJLIB_PRODUCT_VERSION %comma_version_string% >> %SolutionDir%\BuildOutput\%ProjectName%\VersionHeader.h +echo #define PRJLIB_PRODUCT_VERSION_STRING "%VersionString%" >> %SolutionDir%\BuildOutput\%ProjectName%\VersionHeader.h \ No newline at end of file diff --git a/ProjectedFSLib.Managed.props b/ProjectedFSLib.Managed.props index b6a5097..95ae608 100644 --- a/ProjectedFSLib.Managed.props +++ b/ProjectedFSLib.Managed.props @@ -8,8 +8,8 @@ Debug x64 - $(SolutionDir)..\BuildOutput - $(SolutionDir)..\packages + $(SolutionDir)BuildOutput + $(SolutionDir)packages diff --git a/ProjectedFSLib.Managed.sln.DotSettings b/ProjectedFSLib.Managed.sln.DotSettings new file mode 100644 index 0000000..7c67746 --- /dev/null +++ b/ProjectedFSLib.Managed.sln.DotSettings @@ -0,0 +1,2 @@ + + True \ No newline at end of file From 719824399dc8b0df73e0e1d1d0bc27787639110f Mon Sep 17 00:00:00 2001 From: Erik Mavrinac Date: Mon, 25 Nov 2019 19:12:00 -0800 Subject: [PATCH 03/24] Revert "Move BuildOutput under the enlistment" This reverts commit ec1f116c9ca14233e6c3f5d55c6320a089b1bf31. --- .gitignore | 1 - .../scripts/CreateCliAssemblyVersion.bat | 16 ++++++++-------- .../scripts/CreateVersionHeader.bat | 12 ++++++------ ProjectedFSLib.Managed.props | 4 ++-- ProjectedFSLib.Managed.sln.DotSettings | 2 -- 5 files changed, 16 insertions(+), 19 deletions(-) delete mode 100644 ProjectedFSLib.Managed.sln.DotSettings diff --git a/.gitignore b/.gitignore index 88f999f..3e759b7 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,6 @@ *.userprefs # Build results -BuildOutput/ [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ diff --git a/ProjectedFSLib.Managed.API/scripts/CreateCliAssemblyVersion.bat b/ProjectedFSLib.Managed.API/scripts/CreateCliAssemblyVersion.bat index 369ebac..d7603e4 100644 --- a/ProjectedFSLib.Managed.API/scripts/CreateCliAssemblyVersion.bat +++ b/ProjectedFSLib.Managed.API/scripts/CreateCliAssemblyVersion.bat @@ -4,11 +4,11 @@ set ProjectName=%1 set VersionString=%2 set SolutionDir=%3 -mkdir %SolutionDir%\BuildOutput -mkdir %SolutionDir%\BuildOutput\%ProjectName% -echo #include "stdafx.h" > %SolutionDir%\BuildOutput\%ProjectName%\AssemblyVersion.h -echo using namespace System::Reflection; >> %SolutionDir%\BuildOutput\%ProjectName%\AssemblyVersion.h -echo [assembly:AssemblyVersion("%VersionString%")]; >> %SolutionDir%\BuildOutput\%ProjectName%\AssemblyVersion.h -echo [assembly:AssemblyFileVersion("%VersionString%")]; >> %SolutionDir%\BuildOutput\%ProjectName%\AssemblyVersion.h -echo [assembly:AssemblyKeyFileAttribute(LR"(%SolutionDir%ProjectedFSLib.Managed.API\signing\35MSSharedLib1024.snk)")]; >> %SolutionDir%\BuildOutput\%ProjectName%\AssemblyVersion.h -echo [assembly:AssemblyDelaySignAttribute(true)]; >> %SolutionDir%\BuildOutput\%ProjectName%\AssemblyVersion.h \ No newline at end of file +mkdir %SolutionDir%\..\BuildOutput +mkdir %SolutionDir%\..\BuildOutput\%ProjectName% +echo #include "stdafx.h" > %SolutionDir%\..\BuildOutput\%ProjectName%\AssemblyVersion.h +echo using namespace System::Reflection; >> %SolutionDir%\..\BuildOutput\%ProjectName%\AssemblyVersion.h +echo [assembly:AssemblyVersion("%VersionString%")]; >> %SolutionDir%\..\BuildOutput\%ProjectName%\AssemblyVersion.h +echo [assembly:AssemblyFileVersion("%VersionString%")]; >> %SolutionDir%\..\BuildOutput\%ProjectName%\AssemblyVersion.h +echo [assembly:AssemblyKeyFileAttribute(LR"(%SolutionDir%ProjectedFSLib.Managed.API\signing\35MSSharedLib1024.snk)")]; >> %SolutionDir%\..\BuildOutput\%ProjectName%\AssemblyVersion.h +echo [assembly:AssemblyDelaySignAttribute(true)]; >> %SolutionDir%\..\BuildOutput\%ProjectName%\AssemblyVersion.h \ No newline at end of file diff --git a/ProjectedFSLib.Managed.API/scripts/CreateVersionHeader.bat b/ProjectedFSLib.Managed.API/scripts/CreateVersionHeader.bat index 55c5de5..74d6f53 100644 --- a/ProjectedFSLib.Managed.API/scripts/CreateVersionHeader.bat +++ b/ProjectedFSLib.Managed.API/scripts/CreateVersionHeader.bat @@ -4,13 +4,13 @@ set ProjectName=%1 set VersionString=%2 set SolutionDir=%3 -mkdir %SolutionDir%\BuildOutput -mkdir %SolutionDir%\BuildOutput\%ProjectName% +mkdir %SolutionDir%\..\BuildOutput +mkdir %SolutionDir%\..\BuildOutput\%ProjectName% set comma_version_string=%VersionString% set comma_version_string=%comma_version_string:.=,% -echo #define PRJLIB_FILE_VERSION %comma_version_string% > %SolutionDir%\BuildOutput\%ProjectName%\VersionHeader.h -echo #define PRJLIB_FILE_VERSION_STRING "%VersionString%" >> %SolutionDir%\BuildOutput\%ProjectName%\VersionHeader.h -echo #define PRJLIB_PRODUCT_VERSION %comma_version_string% >> %SolutionDir%\BuildOutput\%ProjectName%\VersionHeader.h -echo #define PRJLIB_PRODUCT_VERSION_STRING "%VersionString%" >> %SolutionDir%\BuildOutput\%ProjectName%\VersionHeader.h \ No newline at end of file +echo #define PRJLIB_FILE_VERSION %comma_version_string% > %SolutionDir%\..\BuildOutput\%ProjectName%\VersionHeader.h +echo #define PRJLIB_FILE_VERSION_STRING "%VersionString%" >> %SolutionDir%\..\BuildOutput\%ProjectName%\VersionHeader.h +echo #define PRJLIB_PRODUCT_VERSION %comma_version_string% >> %SolutionDir%\..\BuildOutput\%ProjectName%\VersionHeader.h +echo #define PRJLIB_PRODUCT_VERSION_STRING "%VersionString%" >> %SolutionDir%\..\BuildOutput\%ProjectName%\VersionHeader.h \ No newline at end of file diff --git a/ProjectedFSLib.Managed.props b/ProjectedFSLib.Managed.props index 95ae608..b6a5097 100644 --- a/ProjectedFSLib.Managed.props +++ b/ProjectedFSLib.Managed.props @@ -8,8 +8,8 @@ Debug x64 - $(SolutionDir)BuildOutput - $(SolutionDir)packages + $(SolutionDir)..\BuildOutput + $(SolutionDir)..\packages diff --git a/ProjectedFSLib.Managed.sln.DotSettings b/ProjectedFSLib.Managed.sln.DotSettings deleted file mode 100644 index 7c67746..0000000 --- a/ProjectedFSLib.Managed.sln.DotSettings +++ /dev/null @@ -1,2 +0,0 @@ - - True \ No newline at end of file From 789cac7f536f38680d3ae633d8f87241ed0182e2 Mon Sep 17 00:00:00 2001 From: Erik Mavrinac Date: Tue, 26 Nov 2019 09:23:42 -0800 Subject: [PATCH 04/24] Dual target test suite and run both in runtests.bat --- ProjectedFSLib.Managed.Test/Helpers.cs | 2 +- .../ProjectedFSLib.Managed.Test.csproj | 3 +-- ProjectedFSLib.Managed.cs.props | 6 +++--- scripts/RunTests.bat | 15 +++++++++++++-- .../SimpleProviderManaged.csproj | 3 +-- 5 files changed, 19 insertions(+), 10 deletions(-) diff --git a/ProjectedFSLib.Managed.Test/Helpers.cs b/ProjectedFSLib.Managed.Test/Helpers.cs index dd0e1b5..98cb4fd 100644 --- a/ProjectedFSLib.Managed.Test/Helpers.cs +++ b/ProjectedFSLib.Managed.Test/Helpers.cs @@ -114,7 +114,7 @@ public void GetRootNamesForTest(out string sourceName, out string virtRootName) public void CreateRootsForTest(out string sourceName, out string virtRootName) { GetRootNamesForTest(out sourceName, out virtRootName); - + DirectoryInfo sourceInfo = new DirectoryInfo(sourceName); if (!sourceInfo.Exists) { diff --git a/ProjectedFSLib.Managed.Test/ProjectedFSLib.Managed.Test.csproj b/ProjectedFSLib.Managed.Test/ProjectedFSLib.Managed.Test.csproj index 2ba9748..04f8473 100644 --- a/ProjectedFSLib.Managed.Test/ProjectedFSLib.Managed.Test.csproj +++ b/ProjectedFSLib.Managed.Test/ProjectedFSLib.Managed.Test.csproj @@ -2,8 +2,7 @@ - - netcoreapp3.1 + net472;netcoreapp3.1 false false x64 diff --git a/ProjectedFSLib.Managed.cs.props b/ProjectedFSLib.Managed.cs.props index e4fbd0a..a590d5f 100644 --- a/ProjectedFSLib.Managed.cs.props +++ b/ProjectedFSLib.Managed.cs.props @@ -4,9 +4,9 @@ - $(BuildOutputDir)\$(MSBuildProjectName)\bin\$(Platform)\$(Configuration)\$(TargetFramework)\ - $(BuildOutputDir)\$(MSBuildProjectName)\obj\$(Platform)\$(Configuration)\$(TargetFramework)\ - $(BuildOutputDir)\$(MSBuildProjectName)\intermediate\$(Platform)\$(Configuration)\$(TargetFramework)\ + $(BuildOutputDir)\$(MSBuildProjectName)\bin\$(Platform)\$(Configuration)\ + $(BuildOutputDir)\$(MSBuildProjectName)\obj\$(Platform)\$(Configuration)\\ + $(BuildOutputDir)\$(MSBuildProjectName)\intermediate\$(Platform)\$(Configuration)\ diff --git a/scripts/RunTests.bat b/scripts/RunTests.bat index 27431f5..ea86ff3 100644 --- a/scripts/RunTests.bat +++ b/scripts/RunTests.bat @@ -3,8 +3,19 @@ CALL %~dp0\InitializeEnvironment.bat || EXIT /b 10 IF "%1"=="" (SET "Configuration=Debug") ELSE (SET "Configuration=%1") -set RESULT=0 +set RESULT_FRAMEWORK=0 +set TESTDIR=%PROJFS_OUTPUTDIR%\ProjectedFSLib.Managed.Test\bin\AnyCPU\%Configuration%\net472 +pushd %TESTDIR% +%TESTDIR%\ProjectedFSLib.Managed.Test.exe --params ProviderExe=%PROJFS_OUTPUTDIR%\SimpleProviderManaged\bin\AnyCPU\%Configuration%\net472\SimpleProviderManaged.exe || set RESULT_FRAMEWORK=1 +popd + +set RESULT_CORE=0 +set TESTDIR=%PROJFS_OUTPUTDIR%\ProjectedFSLib.Managed.Test\bin\AnyCPU\%Configuration%\netcoreapp3.1 +pushd %TESTDIR% +%TESTDIR%\ProjectedFSLib.Managed.Test.exe --params ProviderExe=%PROJFS_OUTPUTDIR%\SimpleProviderManaged\bin\AnyCPU\%Configuration%\netcoreapp3.1\SimpleProviderManaged.exe || set RESULT_CORE=1 +popd -%PROJFS_OUTPUTDIR%\ProjectedFSLib.Managed.Test\bin\x64\%Configuration%\net472\ProjectedFSLib.Managed.Test.exe --params ProviderExe=%PROJFS_OUTPUTDIR%\SimpleProviderManaged\bin\x64\%Configuration%\net472\SimpleProviderManaged.exe || set RESULT=1 +set RESULT=0 +if "%RESULT_FRAMEWORK% %RESULT_CORE%" neq "0 0" set RESULT=1 exit /b %RESULT% \ No newline at end of file diff --git a/simpleProviderManaged/SimpleProviderManaged.csproj b/simpleProviderManaged/SimpleProviderManaged.csproj index c007143..848b0a8 100644 --- a/simpleProviderManaged/SimpleProviderManaged.csproj +++ b/simpleProviderManaged/SimpleProviderManaged.csproj @@ -3,7 +3,7 @@ - net472 + net472;netcoreapp3.1 Exe x64 MinimumRecommendedRules.ruleset @@ -25,7 +25,6 @@ - From c019d8c4c2c75cda01fcb869c6f0dbdcc0b2a801 Mon Sep 17 00:00:00 2001 From: Erik Mavrinac Date: Tue, 26 Nov 2019 10:33:44 -0800 Subject: [PATCH 05/24] Improve SimpleProviderManaged debugging, point it at correct netcore project --- ProjectedFSLib.Managed.Test/Helpers.cs | 37 +++++++-------- ProjectedFSLib.Managed.cs.props | 2 +- scripts/BuildProjFS-Managed.bat | 2 +- simpleProviderManaged/Program.cs | 46 +++++++++++++------ .../SimpleProviderManaged.csproj | 6 +-- 5 files changed, 53 insertions(+), 40 deletions(-) diff --git a/ProjectedFSLib.Managed.Test/Helpers.cs b/ProjectedFSLib.Managed.Test/Helpers.cs index 98cb4fd..6657133 100644 --- a/ProjectedFSLib.Managed.Test/Helpers.cs +++ b/ProjectedFSLib.Managed.Test/Helpers.cs @@ -13,11 +13,9 @@ namespace ProjectedFSLib.Managed.Test { class Helpers { - private Process m_providerProcess; - public Process ProviderProcess { get => m_providerProcess; set => m_providerProcess = value; } + public Process ProviderProcess { get; set; } - private int m_waitTimeoutInMs; - public int WaitTimeoutInMs { get => m_waitTimeoutInMs; set => m_waitTimeoutInMs = value; } + public int WaitTimeoutInMs { get; set; } internal enum NotifyWaitHandleNames { @@ -34,26 +32,25 @@ internal enum NotifyWaitHandleNames FilePreConvertToFull, } - private List notificationEvents; - public List NotificationEvents { get => notificationEvents; } - + public List NotificationEvents { get; } + public Helpers( int waitTimeoutInMs ) { - m_waitTimeoutInMs = waitTimeoutInMs; + WaitTimeoutInMs = waitTimeoutInMs; // Create the events that the notifications tests use. - notificationEvents = new List(); + NotificationEvents = new List(); foreach (string eventName in Enum.GetNames(typeof(NotifyWaitHandleNames))) { - notificationEvents.Add(new EventWaitHandle(false, EventResetMode.AutoReset, eventName)); + NotificationEvents.Add(new EventWaitHandle(false, EventResetMode.AutoReset, eventName)); } } public void StartTestProvider() { - StartTestProvider(out string sourceRoot, out string virtRoot); + StartTestProvider(out _, out _); } public void StartTestProvider(out string sourceRoot, out string virtRoot) @@ -64,7 +61,7 @@ public void StartTestProvider(out string sourceRoot, out string virtRoot) var providerExe = TestContext.Parameters.Get("ProviderExe"); // Create an event for the provider to signal once it is up and running. - EventWaitHandle waitHandle = new EventWaitHandle(false, EventResetMode.AutoReset, "ProviderTestProceed"); + var waitHandle = new EventWaitHandle(false, EventResetMode.AutoReset, "ProviderTestProceed"); // Set up the provider process and start it. ProviderProcess = new Process(); @@ -115,7 +112,7 @@ public void CreateRootsForTest(out string sourceName, out string virtRootName) { GetRootNamesForTest(out sourceName, out virtRootName); - DirectoryInfo sourceInfo = new DirectoryInfo(sourceName); + var sourceInfo = new DirectoryInfo(sourceName); if (!sourceInfo.Exists) { sourceInfo.Create(); @@ -131,7 +128,7 @@ public string CreateVirtualFile(string fileName, string fileContent) GetRootNamesForTest(out string sourceRoot, out string virtRoot); string sourceFileName = Path.Combine(sourceRoot, fileName); - FileInfo sourceFile = new FileInfo(sourceFileName); + var sourceFile = new FileInfo(sourceFileName); if (!sourceFile.Exists) { @@ -162,14 +159,14 @@ public string CreateVirtualFile(string fileName) // Returns the full path to the full file. public string CreateFullFile(string fileName, string fileContent) { - GetRootNamesForTest(out string sourceRoot, out string virtRoot); + GetRootNamesForTest(out _, out string virtRoot); string fullFileName = Path.Combine(virtRoot, fileName); - FileInfo fullFile = new FileInfo(fullFileName); + var fullFile = new FileInfo(fullFileName); if (!fullFile.Exists) { - DirectoryInfo ancestorPath = new DirectoryInfo(Path.GetDirectoryName(fullFile.FullName)); + var ancestorPath = new DirectoryInfo(Path.GetDirectoryName(fullFile.FullName)); if (!ancestorPath.Exists) { ancestorPath.Create(); @@ -193,10 +190,10 @@ public string CreateFullFile(string fileName) public string ReadFileInVirtRoot(string fileName) { - GetRootNamesForTest(out string sourceRoot, out string virtRoot); + GetRootNamesForTest(out _, out string virtRoot); string destFileName = Path.Combine(virtRoot, fileName); - FileInfo destFile = new FileInfo(destFileName); + var destFile = new FileInfo(destFileName); string fileContent; using (StreamReader sr = destFile.OpenText()) { @@ -208,7 +205,7 @@ public string ReadFileInVirtRoot(string fileName) public FileStream OpenFileInVirtRoot(string fileName, FileMode mode) { - GetRootNamesForTest(out string sourceRoot, out string virtRoot); + GetRootNamesForTest(out _, out string virtRoot); string destFileName = Path.Combine(virtRoot, fileName); FileStream stream = File.Open(destFileName, mode); diff --git a/ProjectedFSLib.Managed.cs.props b/ProjectedFSLib.Managed.cs.props index a590d5f..ab7e095 100644 --- a/ProjectedFSLib.Managed.cs.props +++ b/ProjectedFSLib.Managed.cs.props @@ -5,7 +5,7 @@ $(BuildOutputDir)\$(MSBuildProjectName)\bin\$(Platform)\$(Configuration)\ - $(BuildOutputDir)\$(MSBuildProjectName)\obj\$(Platform)\$(Configuration)\\ + $(BuildOutputDir)\$(MSBuildProjectName)\obj\$(Platform)\$(Configuration)\ $(BuildOutputDir)\$(MSBuildProjectName)\intermediate\$(Platform)\$(Configuration)\ diff --git a/scripts/BuildProjFS-Managed.bat b/scripts/BuildProjFS-Managed.bat index 86c7570..c0b573c 100644 --- a/scripts/BuildProjFS-Managed.bat +++ b/scripts/BuildProjFS-Managed.bat @@ -18,7 +18,7 @@ IF NOT EXIST %nuget% ( ) :: Acquire vswhere to find dev15/dev16 installations reliably. -SET vswherever=2.5.2 +SET vswherever=2.8.4 %nuget% install vswhere -Version %vswherever% || exit /b 1 SET vswhere=%PROJFS_PACKAGESDIR%\vswhere.%vswherever%\tools\vswhere.exe diff --git a/simpleProviderManaged/Program.cs b/simpleProviderManaged/Program.cs index d088982..9e88e0b 100644 --- a/simpleProviderManaged/Program.cs +++ b/simpleProviderManaged/Program.cs @@ -1,29 +1,47 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + using CommandLine; using Serilog; using System; +using System.Threading; namespace SimpleProviderManaged { public class Program { - public static void Main(string[] args) + private enum ReturnCode + { + Success = 0, + InvalidArguments = 1, + GeneralException = 2, + } + + public static int Main(string[] args) { - // We want verbose logging so we can see all our callback invocations. - Log.Logger = new LoggerConfiguration() - .WriteTo.Console() - .WriteTo.File("SimpleProviderManaged-.log", rollingInterval: RollingInterval.Day) - .CreateLogger(); + try + { + // We want verbose logging so we can see all our callback invocations. + Log.Logger = new LoggerConfiguration() + .WriteTo.Console() + .WriteTo.File("SimpleProviderManaged-.log", rollingInterval: RollingInterval.Day) + .CreateLogger(); - Log.Information("Start"); + Log.Information("Start"); - var parserResult = Parser.Default - .ParseArguments(args) - .WithParsed((ProviderOptions options) => { Run(options); }); + var parserResult = Parser.Default + .ParseArguments(args) + .WithParsed((ProviderOptions options) => Run(options)); - Log.Information("Exit"); + Log.Information("Exit successfully"); + return (int) ReturnCode.Success; + } + catch (Exception ex) + { + Console.Error.WriteLine($"Unexpected exception: {ex}"); + Thread.Sleep(5 * 1000); + return (int)ReturnCode.GeneralException; + } } private static void Run(ProviderOptions options) diff --git a/simpleProviderManaged/SimpleProviderManaged.csproj b/simpleProviderManaged/SimpleProviderManaged.csproj index 848b0a8..8bf43fd 100644 --- a/simpleProviderManaged/SimpleProviderManaged.csproj +++ b/simpleProviderManaged/SimpleProviderManaged.csproj @@ -17,10 +17,8 @@ - - {4e5f40b3-b56f-4b62-92cb-68e7e0e36afa} - ProjectedFSLib.Managed - + + From 610620327912b171be537ead815994b2c6187f97 Mon Sep 17 00:00:00 2001 From: Erik Mavrinac Date: Tue, 26 Nov 2019 11:06:03 -0800 Subject: [PATCH 06/24] step --- scripts/BuildProjFS-Managed.bat | 3 ++- simpleProviderManaged/SimpleProvider.cs | 13 ++++++------- simpleProviderManaged/app.config | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/BuildProjFS-Managed.bat b/scripts/BuildProjFS-Managed.bat index c0b573c..683fb2e 100644 --- a/scripts/BuildProjFS-Managed.bat +++ b/scripts/BuildProjFS-Managed.bat @@ -24,7 +24,8 @@ SET vswhere=%PROJFS_PACKAGESDIR%\vswhere.%vswherever%\tools\vswhere.exe :: Use vswhere to find the latest VS installation (including prerelease installations) with the msbuild component. :: See https://github.com/Microsoft/vswhere/wiki/Find-MSBuild -for /f "usebackq tokens=*" %%i in (`%vswhere% -all -prerelease -latest -version "[15.0,17.0)" -products * -requires Microsoft.Component.MSBuild Microsoft.VisualStudio.Workload.ManagedDesktop Microsoft.VisualStudio.Workload.NativeDesktop Microsoft.VisualStudio.Workload.NetCoreTools Microsoft.VisualStudio.Component.Windows10SDK.17763 Microsoft.VisualStudio.Component.VC.CLI.Support -property installationPath`) do ( +set WINSDK_BUILD=18362 +for /f "usebackq tokens=*" %%i in (`%vswhere% -all -prerelease -latest -version "[16.4,17.0)" -products * -requires Microsoft.Component.MSBuild Microsoft.VisualStudio.Workload.ManagedDesktop Microsoft.VisualStudio.Workload.NativeDesktop Microsoft.VisualStudio.Workload.NetCoreTools Microsoft.VisualStudio.Component.Windows10SDK.%WINSDK_BUILD% Microsoft.VisualStudio.Component.VC.CLI.Support -property installationPath`) do ( set VsInstallDir=%%i ) diff --git a/simpleProviderManaged/SimpleProvider.cs b/simpleProviderManaged/SimpleProvider.cs index 551799f..fd1b2c0 100644 --- a/simpleProviderManaged/SimpleProvider.cs +++ b/simpleProviderManaged/SimpleProvider.cs @@ -47,7 +47,7 @@ public SimpleProvider(ProviderOptions options) if (this.Options.EnableNotifications) { string rootName = string.Empty; - notificationMappings = new List() + notificationMappings = new List { new NotificationMapping( NotificationType.FileOpened @@ -80,7 +80,7 @@ public SimpleProvider(ProviderOptions options) enableNegativePathCache: false, notificationMappings: notificationMappings); } - catch(Exception ex) + catch (Exception ex) { Log.Fatal(ex, "Failed to create VirtualizationInstance."); throw; @@ -426,7 +426,7 @@ internal HResult EndDirectoryEnumerationCallback( { Log.Information("----> EndDirectoryEnumerationCallback"); - if (!this.activeEnumerations.TryRemove(enumerationId, out ActiveEnumeration enumeration)) + if (!this.activeEnumerations.TryRemove(enumerationId, out _)) { return HResult.InternalError; } @@ -445,7 +445,7 @@ internal HResult GetPlaceholderInfoCallback( Log.Information("----> GetPlaceholderInfoCallback [{Path}]", relativePath); Log.Information(" Placeholder creation triggered by [{ProcName} {PID}]", triggeringProcessImageFileName, triggeringProcessId); - HResult hr = HResult.Ok; + HResult hr; ProjectedFileInfo fileInfo = this.GetFileInfoInLayer(relativePath); if (fileInfo == null) { @@ -484,8 +484,7 @@ internal HResult GetFileDataCallback( Log.Information("----> GetFileDataCallback relativePath [{Path}]", relativePath); Log.Information(" triggered by [{ProcName} {PID}]", triggeringProcessImageFileName, triggeringProcessId); - HResult hr = HResult.Ok; - + HResult hr; if (!this.FileExistsInLayer(relativePath)) { hr = HResult.FileNotFound; @@ -561,7 +560,7 @@ private HResult QueryFileNameCallback( { Log.Information("----> QueryFileNameCallback relativePath [{Path}]", relativePath); - HResult hr = HResult.Ok; + HResult hr; string parentDirectory = Path.GetDirectoryName(relativePath); string childName = Path.GetFileName(relativePath); if (this.GetChildItemsInLayer(parentDirectory).Any(child => Utils.IsFileNameMatch(child.Name, childName))) diff --git a/simpleProviderManaged/app.config b/simpleProviderManaged/app.config index 3dbff35..312bb3f 100644 --- a/simpleProviderManaged/app.config +++ b/simpleProviderManaged/app.config @@ -1,3 +1,3 @@ - + From 8f2d981f61714ac602e27f3664da5e86374df31e Mon Sep 17 00:00:00 2001 From: Erik Mavrinac Date: Tue, 26 Nov 2019 12:57:14 -0800 Subject: [PATCH 07/24] Build script fixes for VS 16.4+ --- README.md | 4 ++-- scripts/BuildProjFS-Managed.bat | 39 +++++++++++++-------------------- 2 files changed, 17 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 31aaba8..e4077d1 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ coverage of the managed wrapper API surface. ## Building the ProjFS Managed API -* Install [Visual Studio 2017 Community Edition](https://www.visualstudio.com/downloads/) or higher. +* Install [Visual Studio 2019 Community Edition](https://www.visualstudio.com/downloads/) version 16.4 or higher. * Include the following workloads: * **.NET desktop development** * **.NET Core cross-platform development** @@ -55,7 +55,7 @@ coverage of the managed wrapper API surface. * Include the following individual components: * **.NET Framework 4.6.1 SDK** * **C++/CLI support** - * **Windows 10 SDK (10.0.17763.0)** + * **Windows 10 SDK (10.0.18362.0)** * Create a folder to clone into, e.g. `C:\Repos\ProjFS-Managed` * Clone this repo into the `src` subfolder, e.g. `C:\Repos\ProjFS-Managed\src` * Run `src\scripts\BuildProjFS-Managed.bat` diff --git a/scripts/BuildProjFS-Managed.bat b/scripts/BuildProjFS-Managed.bat index 683fb2e..4ff929c 100644 --- a/scripts/BuildProjFS-Managed.bat +++ b/scripts/BuildProjFS-Managed.bat @@ -17,41 +17,32 @@ IF NOT EXIST %nuget% ( powershell -ExecutionPolicy Bypass -Command "Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/latest/nuget.exe' -OutFile %nuget%" ) -:: Acquire vswhere to find dev15/dev16 installations reliably. +:: Use vswhere to find the latest VS installation (including prerelease installations) with the msbuild component. +:: See https://github.com/Microsoft/vswhere/wiki/Find-MSBuild SET vswherever=2.8.4 %nuget% install vswhere -Version %vswherever% || exit /b 1 SET vswhere=%PROJFS_PACKAGESDIR%\vswhere.%vswherever%\tools\vswhere.exe - -:: Use vswhere to find the latest VS installation (including prerelease installations) with the msbuild component. -:: See https://github.com/Microsoft/vswhere/wiki/Find-MSBuild set WINSDK_BUILD=18362 for /f "usebackq tokens=*" %%i in (`%vswhere% -all -prerelease -latest -version "[16.4,17.0)" -products * -requires Microsoft.Component.MSBuild Microsoft.VisualStudio.Workload.ManagedDesktop Microsoft.VisualStudio.Workload.NativeDesktop Microsoft.VisualStudio.Workload.NetCoreTools Microsoft.VisualStudio.Component.Windows10SDK.%WINSDK_BUILD% Microsoft.VisualStudio.Component.VC.CLI.Support -property installationPath`) do ( - set VsInstallDir=%%i + set VsDir=%%i ) -IF NOT DEFINED VsInstallDir ( +IF NOT DEFINED VsDir ( echo ERROR: Could not locate a Visual Studio installation with required components. echo Refer to Readme.md for a list of the required Visual Studio components. exit /b 10 ) -SET msbuild="%VsInstallDir%\MSBuild\15.0\Bin\amd64\msbuild.exe" -SET PlatformToolset="v141" -IF NOT EXIST %msbuild% ( - :: dev16 has msbuild.exe at a different location - SET msbuild="%VsInstallDir%\MSBuild\Current\Bin\amd64\msbuild.exe" - SET PlatformToolset="v142" - IF NOT EXIST !msbuild! ( - echo ERROR: Could not find msbuild - exit /b 1 - ) -) - -:: Restore all dependencies. -%nuget% restore %PROJFS_SRCDIR%\ProjectedFSLib.Managed.sln -dotnet restore %PROJFS_SRCDIR%\ProjectedFSLib.Managed.sln /p:Configuration=%SolutionConfiguration% /p:VCTargetsPath="C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Microsoft\VC\v160\Platforms\x64\PlatformToolsets\!PlatformToolset!" --packages %PROJFS_PACKAGESDIR% || exit /b 1 - -:: Kick off the build. -!msbuild! %PROJFS_SRCDIR%\ProjectedFSLib.Managed.sln /p:ProjFSManagedVersion=%ProjFSManagedVersion% /p:Configuration=%SolutionConfiguration% /p:Platform=x64 /p:PlatformToolset=!PlatformToolset! || exit /b 1 +echo Setting up the VS Developer Command Prompt environment variables from %VsDir% +call "%VsDir%\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 +@rem pushd "%VsDir%" +@rem call "%VsDir%\Common7\Tools\VsDevCmd.bat" +@rem popd + +:: Restore all dependencies and run the build. +pushd "%PROJFS_SRCDIR%" +msbuild /t:Restore ProjectedFSLib.Managed.sln +msbuild ProjectedFSLib.Managed.sln /p:ProjFSManagedVersion=%ProjFSManagedVersion% /p:Configuration=%SolutionConfiguration% /p:Platform=x64 || exit /b 1 +popd ENDLOCAL From 450321a39022df05d3b8f796bb4dda851d39bc17 Mon Sep 17 00:00:00 2001 From: Erik Mavrinac Date: Tue, 26 Nov 2019 13:01:04 -0800 Subject: [PATCH 08/24] Framework version in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e4077d1..a7244ae 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ coverage of the managed wrapper API surface. * **.NET Core cross-platform development** * **Desktop development with C++** * Include the following individual components: - * **.NET Framework 4.6.1 SDK** + * **.NET Framework 4.7.2 SDK** * **C++/CLI support** * **Windows 10 SDK (10.0.18362.0)** * Create a folder to clone into, e.g. `C:\Repos\ProjFS-Managed` From 1d11bbdb3a9d1271767829b4ea0c5cf275b11c12 Mon Sep 17 00:00:00 2001 From: Erik Mavrinac Date: Tue, 26 Nov 2019 15:11:59 -0800 Subject: [PATCH 09/24] Add nuget package generation starting at v1.2.0 --- NugetPackage/Microsoft.Windows.ProjFS.nuspec | 20 +++++++ NugetPackage/ProjectedFSLib.Package.csproj | 60 ++++++++++++++++++++ ProjectedFSLib.Managed.sln | 24 ++++++++ global.json | 5 ++ 4 files changed, 109 insertions(+) create mode 100644 NugetPackage/Microsoft.Windows.ProjFS.nuspec create mode 100644 NugetPackage/ProjectedFSLib.Package.csproj create mode 100644 global.json diff --git a/NugetPackage/Microsoft.Windows.ProjFS.nuspec b/NugetPackage/Microsoft.Windows.ProjFS.nuspec new file mode 100644 index 0000000..3dbf07d --- /dev/null +++ b/NugetPackage/Microsoft.Windows.ProjFS.nuspec @@ -0,0 +1,20 @@ + + + + Microsoft.Windows.ProjFS + 1.2.0.0 + Microsoft + Microsoft + true + MIT + https://licenses.nuget.org/MIT + https://github.com/Microsoft/ProjFS-Managed-API + A managed-code API for the Windows Projected File System. + © Microsoft Corporation. All rights reserved. + + + + + + + diff --git a/NugetPackage/ProjectedFSLib.Package.csproj b/NugetPackage/ProjectedFSLib.Package.csproj new file mode 100644 index 0000000..cf1a05e --- /dev/null +++ b/NugetPackage/ProjectedFSLib.Package.csproj @@ -0,0 +1,60 @@ + + + + + netcoreapp3.1 + x64 + + + + + + + + + + + + + + + + + + + + + + $(OutputPath)\pkg\ + + + + + + + + + + + + + + diff --git a/ProjectedFSLib.Managed.sln b/ProjectedFSLib.Managed.sln index 91213d5..34e2e74 100644 --- a/ProjectedFSLib.Managed.sln +++ b/ProjectedFSLib.Managed.sln @@ -24,28 +24,52 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scripts", "Scripts", "{80F7 scripts\RunTests.bat = scripts\RunTests.bat EndProjectSection EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProjectedFSLib.Package", "NugetPackage\ProjectedFSLib.Package.csproj", "{01FCBE2D-7018-42C1-B617-EF02032A889C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU Debug|x64 = Debug|x64 + Release|Any CPU = Release|Any CPU Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA}.Debug|Any CPU.ActiveCfg = Debug|x64 {4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA}.Debug|x64.ActiveCfg = Debug|x64 {4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA}.Debug|x64.Build.0 = Debug|x64 + {4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA}.Release|Any CPU.ActiveCfg = Release|x64 {4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA}.Release|x64.ActiveCfg = Release|x64 {4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA}.Release|x64.Build.0 = Release|x64 + {D29E5723-25E6-41C7-AEB9-099CDE30538A}.Debug|Any CPU.ActiveCfg = Debug|x64 {D29E5723-25E6-41C7-AEB9-099CDE30538A}.Debug|x64.ActiveCfg = Debug|x64 {D29E5723-25E6-41C7-AEB9-099CDE30538A}.Debug|x64.Build.0 = Debug|x64 + {D29E5723-25E6-41C7-AEB9-099CDE30538A}.Release|Any CPU.ActiveCfg = Release|x64 {D29E5723-25E6-41C7-AEB9-099CDE30538A}.Release|x64.ActiveCfg = Release|x64 {D29E5723-25E6-41C7-AEB9-099CDE30538A}.Release|x64.Build.0 = Release|x64 + {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Debug|Any CPU.Build.0 = Debug|Any CPU {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Debug|x64.ActiveCfg = Debug|Any CPU {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Debug|x64.Build.0 = Debug|Any CPU + {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Release|Any CPU.Build.0 = Release|Any CPU {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Release|x64.ActiveCfg = Release|Any CPU {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Release|x64.Build.0 = Release|Any CPU + {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Debug|Any CPU.Build.0 = Debug|Any CPU {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Debug|x64.ActiveCfg = Debug|Any CPU {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Debug|x64.Build.0 = Debug|Any CPU + {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Release|Any CPU.Build.0 = Release|Any CPU {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Release|x64.ActiveCfg = Release|Any CPU {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Release|x64.Build.0 = Release|Any CPU + {01FCBE2D-7018-42C1-B617-EF02032A889C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {01FCBE2D-7018-42C1-B617-EF02032A889C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {01FCBE2D-7018-42C1-B617-EF02032A889C}.Debug|x64.ActiveCfg = Debug|Any CPU + {01FCBE2D-7018-42C1-B617-EF02032A889C}.Debug|x64.Build.0 = Debug|Any CPU + {01FCBE2D-7018-42C1-B617-EF02032A889C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {01FCBE2D-7018-42C1-B617-EF02032A889C}.Release|Any CPU.Build.0 = Release|Any CPU + {01FCBE2D-7018-42C1-B617-EF02032A889C}.Release|x64.ActiveCfg = Release|Any CPU + {01FCBE2D-7018-42C1-B617-EF02032A889C}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/global.json b/global.json new file mode 100644 index 0000000..b3a5089 --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "msbuild-sdks": { + "Microsoft.Build.NoTargets": "1.0.85" + } +} From 8691cd98aa3061539e0b7e0995cad6ea279551ea Mon Sep 17 00:00:00 2001 From: Erik Mavrinac Date: Tue, 26 Nov 2019 15:17:37 -0800 Subject: [PATCH 10/24] step --- NugetPackage/ProjectedFSLib.Package.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/NugetPackage/ProjectedFSLib.Package.csproj b/NugetPackage/ProjectedFSLib.Package.csproj index cf1a05e..e9d4ba4 100644 --- a/NugetPackage/ProjectedFSLib.Package.csproj +++ b/NugetPackage/ProjectedFSLib.Package.csproj @@ -4,6 +4,7 @@ netcoreapp3.1 x64 + false From 873e335c0b4fa29752a7f425230b784f307c7ef5 Mon Sep 17 00:00:00 2001 From: Erik Mavrinac Date: Tue, 26 Nov 2019 17:59:08 -0800 Subject: [PATCH 11/24] Fix package base path --- NugetPackage/ProjectedFSLib.Package.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NugetPackage/ProjectedFSLib.Package.csproj b/NugetPackage/ProjectedFSLib.Package.csproj index e9d4ba4..4c79c6b 100644 --- a/NugetPackage/ProjectedFSLib.Package.csproj +++ b/NugetPackage/ProjectedFSLib.Package.csproj @@ -56,6 +56,6 @@ + Command="$(PkgNuget_CommandLine)\tools\nuget.exe pack $(MSBuildProjectDirectory)\Microsoft.Windows.ProjFS.nuspec -BasePath $(PkgDir) -OutputDirectory $(OutputPath)" /> From 61c9ae55cfe4604f2f9d14bbc8a168445691efdd Mon Sep 17 00:00:00 2001 From: Erik Mavrinac Date: Sat, 7 Dec 2019 22:41:39 -0800 Subject: [PATCH 12/24] PR comments --- ProjectedFSLib.Managed.props | 4 +++- simpleProviderManaged/Program.cs | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ProjectedFSLib.Managed.props b/ProjectedFSLib.Managed.props index b6a5097..48dcd8b 100644 --- a/ProjectedFSLib.Managed.props +++ b/ProjectedFSLib.Managed.props @@ -2,7 +2,9 @@ - 0.3.0.0 + + 0.2.172.2 diff --git a/simpleProviderManaged/Program.cs b/simpleProviderManaged/Program.cs index 9e88e0b..82c62d9 100644 --- a/simpleProviderManaged/Program.cs +++ b/simpleProviderManaged/Program.cs @@ -4,7 +4,6 @@ using CommandLine; using Serilog; using System; -using System.Threading; namespace SimpleProviderManaged { @@ -39,7 +38,6 @@ public static int Main(string[] args) catch (Exception ex) { Console.Error.WriteLine($"Unexpected exception: {ex}"); - Thread.Sleep(5 * 1000); return (int)ReturnCode.GeneralException; } } From e6f012fd84a9af90e6a1abbde5367ffeb122ff07 Mon Sep 17 00:00:00 2001 From: Erik Mavrinac Date: Sat, 7 Dec 2019 22:51:33 -0800 Subject: [PATCH 13/24] PR comments --- ProjectedFSLib.Managed.Test/Helpers.cs | 45 +++++++++++++------------ ProjectedFSLib.Managed.props | 2 +- scripts/BuildProjFS-Managed.bat | 2 +- simpleProviderManaged/SimpleProvider.cs | 2 +- 4 files changed, 27 insertions(+), 24 deletions(-) diff --git a/ProjectedFSLib.Managed.Test/Helpers.cs b/ProjectedFSLib.Managed.Test/Helpers.cs index 6657133..08ad1af 100644 --- a/ProjectedFSLib.Managed.Test/Helpers.cs +++ b/ProjectedFSLib.Managed.Test/Helpers.cs @@ -13,9 +13,11 @@ namespace ProjectedFSLib.Managed.Test { class Helpers { - public Process ProviderProcess { get; set; } + private Process m_providerProcess; + public Process ProviderProcess { get => m_providerProcess; set => m_providerProcess = value; } - public int WaitTimeoutInMs { get; set; } + private int m_waitTimeoutInMs; + public int WaitTimeoutInMs { get => m_waitTimeoutInMs; set => m_waitTimeoutInMs = value; } internal enum NotifyWaitHandleNames { @@ -32,25 +34,26 @@ internal enum NotifyWaitHandleNames FilePreConvertToFull, } - public List NotificationEvents { get; } + private List notificationEvents; + public List NotificationEvents { get => notificationEvents; } public Helpers( int waitTimeoutInMs ) { - WaitTimeoutInMs = waitTimeoutInMs; - - // Create the events that the notifications tests use. - NotificationEvents = new List(); + m_waitTimeoutInMs = waitTimeoutInMs; + + // Create the events that the notifications tests use. + notificationEvents = new List(); foreach (string eventName in Enum.GetNames(typeof(NotifyWaitHandleNames))) { - NotificationEvents.Add(new EventWaitHandle(false, EventResetMode.AutoReset, eventName)); + notificationEvents.Add(new EventWaitHandle(false, EventResetMode.AutoReset, eventName)); } } public void StartTestProvider() - { - StartTestProvider(out _, out _); + { + StartTestProvider(out string sourceRoot, out string virtRoot); } public void StartTestProvider(out string sourceRoot, out string virtRoot) @@ -61,8 +64,8 @@ public void StartTestProvider(out string sourceRoot, out string virtRoot) var providerExe = TestContext.Parameters.Get("ProviderExe"); // Create an event for the provider to signal once it is up and running. - var waitHandle = new EventWaitHandle(false, EventResetMode.AutoReset, "ProviderTestProceed"); - + EventWaitHandle waitHandle = new EventWaitHandle(false, EventResetMode.AutoReset, "ProviderTestProceed"); + // Set up the provider process and start it. ProviderProcess = new Process(); ProviderProcess.StartInfo.FileName = providerExe; @@ -111,8 +114,8 @@ public void GetRootNamesForTest(out string sourceName, out string virtRootName) public void CreateRootsForTest(out string sourceName, out string virtRootName) { GetRootNamesForTest(out sourceName, out virtRootName); - - var sourceInfo = new DirectoryInfo(sourceName); + + DirectoryInfo sourceInfo = new DirectoryInfo(sourceName); if (!sourceInfo.Exists) { sourceInfo.Create(); @@ -128,7 +131,7 @@ public string CreateVirtualFile(string fileName, string fileContent) GetRootNamesForTest(out string sourceRoot, out string virtRoot); string sourceFileName = Path.Combine(sourceRoot, fileName); - var sourceFile = new FileInfo(sourceFileName); + FileInfo sourceFile = new FileInfo(sourceFileName); if (!sourceFile.Exists) { @@ -159,14 +162,14 @@ public string CreateVirtualFile(string fileName) // Returns the full path to the full file. public string CreateFullFile(string fileName, string fileContent) { - GetRootNamesForTest(out _, out string virtRoot); + GetRootNamesForTest(out string sourceRoot, out string virtRoot); string fullFileName = Path.Combine(virtRoot, fileName); - var fullFile = new FileInfo(fullFileName); + FileInfo fullFile = new FileInfo(fullFileName); if (!fullFile.Exists) { - var ancestorPath = new DirectoryInfo(Path.GetDirectoryName(fullFile.FullName)); + DirectoryInfo ancestorPath = new DirectoryInfo(Path.GetDirectoryName(fullFile.FullName)); if (!ancestorPath.Exists) { ancestorPath.Create(); @@ -190,10 +193,10 @@ public string CreateFullFile(string fileName) public string ReadFileInVirtRoot(string fileName) { - GetRootNamesForTest(out _, out string virtRoot); + GetRootNamesForTest(out string sourceRoot, out string virtRoot); string destFileName = Path.Combine(virtRoot, fileName); - var destFile = new FileInfo(destFileName); + FileInfo destFile = new FileInfo(destFileName); string fileContent; using (StreamReader sr = destFile.OpenText()) { @@ -205,7 +208,7 @@ public string ReadFileInVirtRoot(string fileName) public FileStream OpenFileInVirtRoot(string fileName, FileMode mode) { - GetRootNamesForTest(out _, out string virtRoot); + GetRootNamesForTest(out string sourceRoot, out string virtRoot); string destFileName = Path.Combine(virtRoot, fileName); FileStream stream = File.Open(destFileName, mode); diff --git a/ProjectedFSLib.Managed.props b/ProjectedFSLib.Managed.props index 48dcd8b..ef70ac0 100644 --- a/ProjectedFSLib.Managed.props +++ b/ProjectedFSLib.Managed.props @@ -4,7 +4,7 @@ - 0.2.172.2 + 0.2.173.2 diff --git a/scripts/BuildProjFS-Managed.bat b/scripts/BuildProjFS-Managed.bat index 4ff929c..3d8da5f 100644 --- a/scripts/BuildProjFS-Managed.bat +++ b/scripts/BuildProjFS-Managed.bat @@ -4,7 +4,7 @@ SETLOCAL ENABLEDELAYEDEXPANSION CALL %~dp0\InitializeEnvironment.bat || EXIT /b 10 IF "%1"=="" (SET "Configuration=Debug") ELSE (SET "Configuration=%1") -IF "%2"=="" (SET "ProjFSManagedVersion=0.3.0.0") ELSE (SET "ProjFSManagedVersion=%2") +IF "%2"=="" (SET "ProjFSManagedVersion=0.32.173.2") ELSE (SET "ProjFSManagedVersion=%2") SET SolutionConfiguration=%Configuration% diff --git a/simpleProviderManaged/SimpleProvider.cs b/simpleProviderManaged/SimpleProvider.cs index fd1b2c0..fd87341 100644 --- a/simpleProviderManaged/SimpleProvider.cs +++ b/simpleProviderManaged/SimpleProvider.cs @@ -426,7 +426,7 @@ internal HResult EndDirectoryEnumerationCallback( { Log.Information("----> EndDirectoryEnumerationCallback"); - if (!this.activeEnumerations.TryRemove(enumerationId, out _)) + if (!this.activeEnumerations.TryRemove(enumerationId, out ActiveEnumeration enumeration)) { return HResult.InternalError; } From 7d44c61cb70c5295112ba436aebb719c98eb5c8e Mon Sep 17 00:00:00 2001 From: Erik Mavrinac Date: Sat, 7 Dec 2019 23:04:29 -0800 Subject: [PATCH 14/24] PR comments --- ProjectedFSLib.Managed.Test/Helpers.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ProjectedFSLib.Managed.Test/Helpers.cs b/ProjectedFSLib.Managed.Test/Helpers.cs index 08ad1af..58a8bcd 100644 --- a/ProjectedFSLib.Managed.Test/Helpers.cs +++ b/ProjectedFSLib.Managed.Test/Helpers.cs @@ -53,7 +53,7 @@ int waitTimeoutInMs public void StartTestProvider() { - StartTestProvider(out string sourceRoot, out string virtRoot); + StartTestProvider(out string sourceRoot, out string virtRoot); } public void StartTestProvider(out string sourceRoot, out string virtRoot) @@ -64,8 +64,8 @@ public void StartTestProvider(out string sourceRoot, out string virtRoot) var providerExe = TestContext.Parameters.Get("ProviderExe"); // Create an event for the provider to signal once it is up and running. - EventWaitHandle waitHandle = new EventWaitHandle(false, EventResetMode.AutoReset, "ProviderTestProceed"); - + EventWaitHandle waitHandle = new EventWaitHandle(false, EventResetMode.AutoReset, "ProviderTestProceed"); + // Set up the provider process and start it. ProviderProcess = new Process(); ProviderProcess.StartInfo.FileName = providerExe; @@ -131,7 +131,7 @@ public string CreateVirtualFile(string fileName, string fileContent) GetRootNamesForTest(out string sourceRoot, out string virtRoot); string sourceFileName = Path.Combine(sourceRoot, fileName); - FileInfo sourceFile = new FileInfo(sourceFileName); + FileInfo sourceFile = new FileInfo(sourceFileName); if (!sourceFile.Exists) { From 7a11a5927c5400e5e2dbbd65de27ed5851ae2f2e Mon Sep 17 00:00:00 2001 From: Erik Mavrinac Date: Sat, 7 Dec 2019 23:19:07 -0800 Subject: [PATCH 15/24] Begin removing anycpu sln targeting --- ProjectedFSLib.Managed.sln | 2 -- 1 file changed, 2 deletions(-) diff --git a/ProjectedFSLib.Managed.sln b/ProjectedFSLib.Managed.sln index 34e2e74..b988d82 100644 --- a/ProjectedFSLib.Managed.sln +++ b/ProjectedFSLib.Managed.sln @@ -28,9 +28,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProjectedFSLib.Package", "N EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU Debug|x64 = Debug|x64 - Release|Any CPU = Release|Any CPU Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution From 28c4cc5f43dcdbfa48988f34a0551137633c8a72 Mon Sep 17 00:00:00 2001 From: Erik Mavrinac Date: Sat, 7 Dec 2019 23:20:13 -0800 Subject: [PATCH 16/24] Removing anycpu sln targeting part 2 --- ProjectedFSLib.Managed.sln | 2 -- 1 file changed, 2 deletions(-) diff --git a/ProjectedFSLib.Managed.sln b/ProjectedFSLib.Managed.sln index b988d82..47f34cd 100644 --- a/ProjectedFSLib.Managed.sln +++ b/ProjectedFSLib.Managed.sln @@ -32,10 +32,8 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA}.Debug|Any CPU.ActiveCfg = Debug|x64 {4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA}.Debug|x64.ActiveCfg = Debug|x64 {4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA}.Debug|x64.Build.0 = Debug|x64 - {4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA}.Release|Any CPU.ActiveCfg = Release|x64 {4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA}.Release|x64.ActiveCfg = Release|x64 {4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA}.Release|x64.Build.0 = Release|x64 {D29E5723-25E6-41C7-AEB9-099CDE30538A}.Debug|Any CPU.ActiveCfg = Debug|x64 From 7b31fe4b2fa09954d4beb6e01a57b0983ffede49 Mon Sep 17 00:00:00 2001 From: Erik Mavrinac Date: Sat, 7 Dec 2019 23:20:48 -0800 Subject: [PATCH 17/24] Removing anycpu sln targeting part 3 --- ProjectedFSLib.Managed.sln | 2 -- 1 file changed, 2 deletions(-) diff --git a/ProjectedFSLib.Managed.sln b/ProjectedFSLib.Managed.sln index 47f34cd..8c776b3 100644 --- a/ProjectedFSLib.Managed.sln +++ b/ProjectedFSLib.Managed.sln @@ -36,10 +36,8 @@ Global {4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA}.Debug|x64.Build.0 = Debug|x64 {4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA}.Release|x64.ActiveCfg = Release|x64 {4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA}.Release|x64.Build.0 = Release|x64 - {D29E5723-25E6-41C7-AEB9-099CDE30538A}.Debug|Any CPU.ActiveCfg = Debug|x64 {D29E5723-25E6-41C7-AEB9-099CDE30538A}.Debug|x64.ActiveCfg = Debug|x64 {D29E5723-25E6-41C7-AEB9-099CDE30538A}.Debug|x64.Build.0 = Debug|x64 - {D29E5723-25E6-41C7-AEB9-099CDE30538A}.Release|Any CPU.ActiveCfg = Release|x64 {D29E5723-25E6-41C7-AEB9-099CDE30538A}.Release|x64.ActiveCfg = Release|x64 {D29E5723-25E6-41C7-AEB9-099CDE30538A}.Release|x64.Build.0 = Release|x64 {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU From cc19913701d82e43d033f0f782df6d90d9494458 Mon Sep 17 00:00:00 2001 From: Erik Mavrinac Date: Sat, 7 Dec 2019 23:24:24 -0800 Subject: [PATCH 18/24] Removing anycpu sln targeting part 4 --- ProjectedFSLib.Managed.sln | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/ProjectedFSLib.Managed.sln b/ProjectedFSLib.Managed.sln index 8c776b3..782be10 100644 --- a/ProjectedFSLib.Managed.sln +++ b/ProjectedFSLib.Managed.sln @@ -40,28 +40,16 @@ Global {D29E5723-25E6-41C7-AEB9-099CDE30538A}.Debug|x64.Build.0 = Debug|x64 {D29E5723-25E6-41C7-AEB9-099CDE30538A}.Release|x64.ActiveCfg = Release|x64 {D29E5723-25E6-41C7-AEB9-099CDE30538A}.Release|x64.Build.0 = Release|x64 - {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Debug|Any CPU.Build.0 = Debug|Any CPU {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Debug|x64.ActiveCfg = Debug|Any CPU {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Debug|x64.Build.0 = Debug|Any CPU - {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Release|Any CPU.Build.0 = Release|Any CPU {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Release|x64.ActiveCfg = Release|Any CPU {B4018C7F-BF11-47BC-8770-72B05C9437EE}.Release|x64.Build.0 = Release|Any CPU - {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Debug|Any CPU.Build.0 = Debug|Any CPU {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Debug|x64.ActiveCfg = Debug|Any CPU {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Debug|x64.Build.0 = Debug|Any CPU - {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Release|Any CPU.Build.0 = Release|Any CPU {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Release|x64.ActiveCfg = Release|Any CPU {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Release|x64.Build.0 = Release|Any CPU - {01FCBE2D-7018-42C1-B617-EF02032A889C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {01FCBE2D-7018-42C1-B617-EF02032A889C}.Debug|Any CPU.Build.0 = Debug|Any CPU {01FCBE2D-7018-42C1-B617-EF02032A889C}.Debug|x64.ActiveCfg = Debug|Any CPU {01FCBE2D-7018-42C1-B617-EF02032A889C}.Debug|x64.Build.0 = Debug|Any CPU - {01FCBE2D-7018-42C1-B617-EF02032A889C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {01FCBE2D-7018-42C1-B617-EF02032A889C}.Release|Any CPU.Build.0 = Release|Any CPU {01FCBE2D-7018-42C1-B617-EF02032A889C}.Release|x64.ActiveCfg = Release|Any CPU {01FCBE2D-7018-42C1-B617-EF02032A889C}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection From d546de8cc1e2a78c834432d368c4518ca50f0d9a Mon Sep 17 00:00:00 2001 From: Erik Mavrinac Date: Sat, 7 Dec 2019 23:35:31 -0800 Subject: [PATCH 19/24] PR comments --- scripts/BuildProjFS-Managed.bat | 2 +- simpleProviderManaged/SimpleProvider.cs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/BuildProjFS-Managed.bat b/scripts/BuildProjFS-Managed.bat index 3d8da5f..07ed760 100644 --- a/scripts/BuildProjFS-Managed.bat +++ b/scripts/BuildProjFS-Managed.bat @@ -4,7 +4,7 @@ SETLOCAL ENABLEDELAYEDEXPANSION CALL %~dp0\InitializeEnvironment.bat || EXIT /b 10 IF "%1"=="" (SET "Configuration=Debug") ELSE (SET "Configuration=%1") -IF "%2"=="" (SET "ProjFSManagedVersion=0.32.173.2") ELSE (SET "ProjFSManagedVersion=%2") +IF "%2"=="" (SET "ProjFSManagedVersion=0.2.173.2") ELSE (SET "ProjFSManagedVersion=%2") SET SolutionConfiguration=%Configuration% diff --git a/simpleProviderManaged/SimpleProvider.cs b/simpleProviderManaged/SimpleProvider.cs index fd87341..f65ee81 100644 --- a/simpleProviderManaged/SimpleProvider.cs +++ b/simpleProviderManaged/SimpleProvider.cs @@ -47,7 +47,7 @@ public SimpleProvider(ProviderOptions options) if (this.Options.EnableNotifications) { string rootName = string.Empty; - notificationMappings = new List + notificationMappings = new List() { new NotificationMapping( NotificationType.FileOpened @@ -80,7 +80,7 @@ public SimpleProvider(ProviderOptions options) enableNegativePathCache: false, notificationMappings: notificationMappings); } - catch (Exception ex) + catch(Exception ex) { Log.Fatal(ex, "Failed to create VirtualizationInstance."); throw; @@ -445,7 +445,7 @@ internal HResult GetPlaceholderInfoCallback( Log.Information("----> GetPlaceholderInfoCallback [{Path}]", relativePath); Log.Information(" Placeholder creation triggered by [{ProcName} {PID}]", triggeringProcessImageFileName, triggeringProcessId); - HResult hr; + HResult hr = HResult.Ok; ProjectedFileInfo fileInfo = this.GetFileInfoInLayer(relativePath); if (fileInfo == null) { @@ -484,7 +484,7 @@ internal HResult GetFileDataCallback( Log.Information("----> GetFileDataCallback relativePath [{Path}]", relativePath); Log.Information(" triggered by [{ProcName} {PID}]", triggeringProcessImageFileName, triggeringProcessId); - HResult hr; + HResult hr = HResult.Ok; if (!this.FileExistsInLayer(relativePath)) { hr = HResult.FileNotFound; @@ -560,7 +560,7 @@ private HResult QueryFileNameCallback( { Log.Information("----> QueryFileNameCallback relativePath [{Path}]", relativePath); - HResult hr; + HResult hr = HResult.Ok; string parentDirectory = Path.GetDirectoryName(relativePath); string childName = Path.GetFileName(relativePath); if (this.GetChildItemsInLayer(parentDirectory).Any(child => Utils.IsFileNameMatch(child.Name, childName))) From 106f9fae4f0c0510e3e53d5068bc90e0bc3a1389 Mon Sep 17 00:00:00 2001 From: Christian Allred Date: Mon, 9 Dec 2019 15:02:06 -0800 Subject: [PATCH 20/24] Debug output of build script to list all VS packages --- scripts/BuildProjFS-Managed.bat | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/BuildProjFS-Managed.bat b/scripts/BuildProjFS-Managed.bat index 07ed760..21daa65 100644 --- a/scripts/BuildProjFS-Managed.bat +++ b/scripts/BuildProjFS-Managed.bat @@ -23,11 +23,14 @@ SET vswherever=2.8.4 %nuget% install vswhere -Version %vswherever% || exit /b 1 SET vswhere=%PROJFS_PACKAGESDIR%\vswhere.%vswherever%\tools\vswhere.exe set WINSDK_BUILD=18362 +echo Checking for VS installation: +echo %vswhere% -all -prerelease -latest -version "[16.4,17.0)" -products * -requires Microsoft.Component.MSBuild Microsoft.VisualStudio.Workload.ManagedDesktop Microsoft.VisualStudio.Workload.NativeDesktop Microsoft.VisualStudio.Workload.NetCoreTools Microsoft.VisualStudio.Component.Windows10SDK.%WINSDK_BUILD% Microsoft.VisualStudio.Component.VC.CLI.Support -property installationPath for /f "usebackq tokens=*" %%i in (`%vswhere% -all -prerelease -latest -version "[16.4,17.0)" -products * -requires Microsoft.Component.MSBuild Microsoft.VisualStudio.Workload.ManagedDesktop Microsoft.VisualStudio.Workload.NativeDesktop Microsoft.VisualStudio.Workload.NetCoreTools Microsoft.VisualStudio.Component.Windows10SDK.%WINSDK_BUILD% Microsoft.VisualStudio.Component.VC.CLI.Support -property installationPath`) do ( set VsDir=%%i ) IF NOT DEFINED VsDir ( + %vswhere% -all -prerelease -latest -version "[16.4,17.0)" -products * -format json -include packages echo ERROR: Could not locate a Visual Studio installation with required components. echo Refer to Readme.md for a list of the required Visual Studio components. exit /b 10 From 546b92bfb1267ba2549996a4bd994de130018dfa Mon Sep 17 00:00:00 2001 From: Christian Allred Date: Mon, 9 Dec 2019 15:18:18 -0800 Subject: [PATCH 21/24] List all installed VS instances for debugging --- scripts/BuildProjFS-Managed.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/BuildProjFS-Managed.bat b/scripts/BuildProjFS-Managed.bat index 21daa65..27dc77d 100644 --- a/scripts/BuildProjFS-Managed.bat +++ b/scripts/BuildProjFS-Managed.bat @@ -30,7 +30,7 @@ for /f "usebackq tokens=*" %%i in (`%vswhere% -all -prerelease -latest -version ) IF NOT DEFINED VsDir ( - %vswhere% -all -prerelease -latest -version "[16.4,17.0)" -products * -format json -include packages + %vswhere% -all -prerelease -latest -products * -format json -include packages echo ERROR: Could not locate a Visual Studio installation with required components. echo Refer to Readme.md for a list of the required Visual Studio components. exit /b 10 From ba2d870249244568f4cefbbc44fa8db4fd2a1238 Mon Sep 17 00:00:00 2001 From: Christian Allred Date: Mon, 9 Dec 2019 15:28:32 -0800 Subject: [PATCH 22/24] A bit more debug output in build script --- scripts/BuildProjFS-Managed.bat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/BuildProjFS-Managed.bat b/scripts/BuildProjFS-Managed.bat index 27dc77d..4e04177 100644 --- a/scripts/BuildProjFS-Managed.bat +++ b/scripts/BuildProjFS-Managed.bat @@ -30,7 +30,8 @@ for /f "usebackq tokens=*" %%i in (`%vswhere% -all -prerelease -latest -version ) IF NOT DEFINED VsDir ( - %vswhere% -all -prerelease -latest -products * -format json -include packages + echo All installed Visual Studio instances: + %vswhere% -all -prerelease -products * -format json echo ERROR: Could not locate a Visual Studio installation with required components. echo Refer to Readme.md for a list of the required Visual Studio components. exit /b 10 From 982e6323827b577df67bc44d61f0711d87a3a04a Mon Sep 17 00:00:00 2001 From: Erik Mavrinac Date: Fri, 13 Dec 2019 15:26:35 -0800 Subject: [PATCH 23/24] Remove packaging project in favor of separate pipeline --- NugetPackage/Microsoft.Windows.ProjFS.nuspec | 20 ------- NugetPackage/ProjectedFSLib.Package.csproj | 61 -------------------- ProjectedFSLib.Managed.sln | 6 -- 3 files changed, 87 deletions(-) delete mode 100644 NugetPackage/Microsoft.Windows.ProjFS.nuspec delete mode 100644 NugetPackage/ProjectedFSLib.Package.csproj diff --git a/NugetPackage/Microsoft.Windows.ProjFS.nuspec b/NugetPackage/Microsoft.Windows.ProjFS.nuspec deleted file mode 100644 index 3dbf07d..0000000 --- a/NugetPackage/Microsoft.Windows.ProjFS.nuspec +++ /dev/null @@ -1,20 +0,0 @@ - - - - Microsoft.Windows.ProjFS - 1.2.0.0 - Microsoft - Microsoft - true - MIT - https://licenses.nuget.org/MIT - https://github.com/Microsoft/ProjFS-Managed-API - A managed-code API for the Windows Projected File System. - © Microsoft Corporation. All rights reserved. - - - - - - - diff --git a/NugetPackage/ProjectedFSLib.Package.csproj b/NugetPackage/ProjectedFSLib.Package.csproj deleted file mode 100644 index 4c79c6b..0000000 --- a/NugetPackage/ProjectedFSLib.Package.csproj +++ /dev/null @@ -1,61 +0,0 @@ - - - - - netcoreapp3.1 - x64 - false - - - - - - - - - - - - - - - - - - - - - - $(OutputPath)\pkg\ - - - - - - - - - - - - - - diff --git a/ProjectedFSLib.Managed.sln b/ProjectedFSLib.Managed.sln index 782be10..91213d5 100644 --- a/ProjectedFSLib.Managed.sln +++ b/ProjectedFSLib.Managed.sln @@ -24,8 +24,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scripts", "Scripts", "{80F7 scripts\RunTests.bat = scripts\RunTests.bat EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProjectedFSLib.Package", "NugetPackage\ProjectedFSLib.Package.csproj", "{01FCBE2D-7018-42C1-B617-EF02032A889C}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -48,10 +46,6 @@ Global {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Debug|x64.Build.0 = Debug|Any CPU {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Release|x64.ActiveCfg = Release|Any CPU {5697F978-E1ED-4C2E-8218-4110F5EA559D}.Release|x64.Build.0 = Release|Any CPU - {01FCBE2D-7018-42C1-B617-EF02032A889C}.Debug|x64.ActiveCfg = Debug|Any CPU - {01FCBE2D-7018-42C1-B617-EF02032A889C}.Debug|x64.Build.0 = Debug|Any CPU - {01FCBE2D-7018-42C1-B617-EF02032A889C}.Release|x64.ActiveCfg = Release|Any CPU - {01FCBE2D-7018-42C1-B617-EF02032A889C}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From 05539d5f33a14bc32f89ca9c811cbf983ccda4e5 Mon Sep 17 00:00:00 2001 From: Erik Mavrinac Date: Tue, 17 Dec 2019 12:03:14 -0800 Subject: [PATCH 24/24] Downgrade net472->net461 to match previous package --- .../NetFramework/ProjectedFSLib.Managed.vcxproj | 2 +- .../ProjectedFSLib.Managed.Test.csproj | 4 ++-- README.md | 2 +- scripts/RunTests.bat | 4 ++-- simpleProviderManaged/SimpleProviderManaged.csproj | 4 ++-- simpleProviderManaged/app.config | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ProjectedFSLib.Managed.API/NetFramework/ProjectedFSLib.Managed.vcxproj b/ProjectedFSLib.Managed.API/NetFramework/ProjectedFSLib.Managed.vcxproj index 428d57a..0ed7a6c 100644 --- a/ProjectedFSLib.Managed.API/NetFramework/ProjectedFSLib.Managed.vcxproj +++ b/ProjectedFSLib.Managed.API/NetFramework/ProjectedFSLib.Managed.vcxproj @@ -2,7 +2,7 @@ {4E5F40B3-B56F-4B62-92CB-68E7E0E36AFA} - v4.7.2 + v4.6.1 true diff --git a/ProjectedFSLib.Managed.Test/ProjectedFSLib.Managed.Test.csproj b/ProjectedFSLib.Managed.Test/ProjectedFSLib.Managed.Test.csproj index 04f8473..1a63eea 100644 --- a/ProjectedFSLib.Managed.Test/ProjectedFSLib.Managed.Test.csproj +++ b/ProjectedFSLib.Managed.Test/ProjectedFSLib.Managed.Test.csproj @@ -2,7 +2,7 @@ - net472;netcoreapp3.1 + net461;netcoreapp3.1 false false x64 @@ -15,7 +15,7 @@ - + diff --git a/README.md b/README.md index a7244ae..e4077d1 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ coverage of the managed wrapper API surface. * **.NET Core cross-platform development** * **Desktop development with C++** * Include the following individual components: - * **.NET Framework 4.7.2 SDK** + * **.NET Framework 4.6.1 SDK** * **C++/CLI support** * **Windows 10 SDK (10.0.18362.0)** * Create a folder to clone into, e.g. `C:\Repos\ProjFS-Managed` diff --git a/scripts/RunTests.bat b/scripts/RunTests.bat index ea86ff3..e78a663 100644 --- a/scripts/RunTests.bat +++ b/scripts/RunTests.bat @@ -4,9 +4,9 @@ CALL %~dp0\InitializeEnvironment.bat || EXIT /b 10 IF "%1"=="" (SET "Configuration=Debug") ELSE (SET "Configuration=%1") set RESULT_FRAMEWORK=0 -set TESTDIR=%PROJFS_OUTPUTDIR%\ProjectedFSLib.Managed.Test\bin\AnyCPU\%Configuration%\net472 +set TESTDIR=%PROJFS_OUTPUTDIR%\ProjectedFSLib.Managed.Test\bin\AnyCPU\%Configuration%\net461 pushd %TESTDIR% -%TESTDIR%\ProjectedFSLib.Managed.Test.exe --params ProviderExe=%PROJFS_OUTPUTDIR%\SimpleProviderManaged\bin\AnyCPU\%Configuration%\net472\SimpleProviderManaged.exe || set RESULT_FRAMEWORK=1 +%TESTDIR%\ProjectedFSLib.Managed.Test.exe --params ProviderExe=%PROJFS_OUTPUTDIR%\SimpleProviderManaged\bin\AnyCPU\%Configuration%\net461\SimpleProviderManaged.exe || set RESULT_FRAMEWORK=1 popd set RESULT_CORE=0 diff --git a/simpleProviderManaged/SimpleProviderManaged.csproj b/simpleProviderManaged/SimpleProviderManaged.csproj index 8bf43fd..0044352 100644 --- a/simpleProviderManaged/SimpleProviderManaged.csproj +++ b/simpleProviderManaged/SimpleProviderManaged.csproj @@ -3,7 +3,7 @@ - net472;netcoreapp3.1 + net461;netcoreapp3.1 Exe x64 MinimumRecommendedRules.ruleset @@ -17,7 +17,7 @@ - + diff --git a/simpleProviderManaged/app.config b/simpleProviderManaged/app.config index 312bb3f..3dbff35 100644 --- a/simpleProviderManaged/app.config +++ b/simpleProviderManaged/app.config @@ -1,3 +1,3 @@ - +