 b2b3947c68
			
		
	
	
	
	
	b2b3947c68On Windows, the Razor server correctly creates the pid file with `FileAccess.Write` and `FileOptions.DeleteOnClose`. This requires a share mode of `FileShare.Write | FileShare.Delete` to open. However, the `dotnet build-server shutdown` command was opening the file with `FileShare.Read`. As a result, an `IOException` was being thrown and was not handled. This change first opens the file with the appropriate share access and also properly handles a failure to access or read the contents of the pid file. Additionally, an integration test was added to test that Razor server shutdown works as expected. Fixes #9158.
		
			
				
	
	
		
			11 lines
		
	
	
	
		
			410 B
			
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
	
		
			410 B
			
		
	
	
	
		
			XML
		
	
	
	
	
	
| <Project Sdk="Microsoft.NET.Sdk.Razor">
 | |
|   <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), testAsset.props))\testAsset.props" />
 | |
| 
 | |
|   <PropertyGroup>
 | |
|     <TargetFramework>netstandard2.0</TargetFramework>
 | |
|   </PropertyGroup>
 | |
| 
 | |
|   <ItemGroup>
 | |
|     <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(MicrosoftAspNetCoreAllPackageVersion)" />
 | |
|   </ItemGroup>
 | |
| </Project>
 |