6
6
using System ;
7
7
using System . Collections . Generic ;
8
8
using System . Diagnostics . CodeAnalysis ;
9
+ using System . IO ;
9
10
using System . Threading . Tasks ;
10
11
using Microsoft . AspNetCore . Razor . Language ;
11
12
using Microsoft . AspNetCore . Razor . LanguageServer . ProjectSystem ;
@@ -108,7 +109,9 @@ public void TryCreateAsync_WithProjectContext_Resolves()
108
109
var documentResolver = new TestDocumentResolver ( documentSnapshot ) ;
109
110
var factory = new DefaultDocumentContextFactory ( _projectSnapshotManagerAccessor , documentResolver , _documentVersionCache , LoggerFactory ) ;
110
111
111
- var hostProject = new HostProject ( @"C:\goo" , @"C:\goo\obj" , RazorConfiguration . Default , rootNamespace : null ) ;
112
+ var projectFilePath = Path . Combine ( "C:" , "goo" ) ;
113
+ var intermediateOutputPath = Path . Combine ( projectFilePath , "obj" ) ;
114
+ var hostProject = new HostProject ( projectFilePath , intermediateOutputPath , RazorConfiguration . Default , rootNamespace : null ) ;
112
115
_projectSnapshotManagerBase . ProjectAdded ( hostProject ) ;
113
116
var hostDocument = new HostDocument ( uri . GetAbsoluteOrUNCPath ( ) , "file.cshtml" ) ;
114
117
_projectSnapshotManagerBase . DocumentAdded ( hostProject . Key , hostDocument , new EmptyTextLoader ( uri . GetAbsoluteOrUNCPath ( ) ) ) ;
@@ -132,7 +135,9 @@ public void TryCreateAsync_WithProjectContext_DoesntUseSnapshotResolver()
132
135
var documentResolverMock = new Mock < ISnapshotResolver > ( MockBehavior . Strict ) ;
133
136
var factory = new DefaultDocumentContextFactory ( _projectSnapshotManagerAccessor , documentResolverMock . Object , _documentVersionCache , LoggerFactory ) ;
134
137
135
- var hostProject = new HostProject ( @"C:\goo" , @"C:\goo\obj" , RazorConfiguration . Default , rootNamespace : null ) ;
138
+ var projectFilePath = Path . Combine ( "C:" , "goo" ) ;
139
+ var intermediateOutputPath = Path . Combine ( projectFilePath , "obj" ) ;
140
+ var hostProject = new HostProject ( projectFilePath , intermediateOutputPath , RazorConfiguration . Default , rootNamespace : null ) ;
136
141
_projectSnapshotManagerBase . ProjectAdded ( hostProject ) ;
137
142
var hostDocument = new HostDocument ( uri . GetAbsoluteOrUNCPath ( ) , "file.cshtml" ) ;
138
143
_projectSnapshotManagerBase . DocumentAdded ( hostProject . Key , hostDocument , new EmptyTextLoader ( uri . GetAbsoluteOrUNCPath ( ) ) ) ;
0 commit comments