Skip to content

Commit 291f8f7

Browse files
committed
Fix target name and JSON parsing
1 parent adc15c9 commit 291f8f7

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/Mvc/Mvc.Testing/src/Microsoft.AspNetCore.Mvc.Testing.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
</ItemGroup>
4747
</Target>
4848

49-
<Target Name="CopyAditionalFiles" AfterTargets="Build;_ResolveMvcTestProjectReferences" Condition="'$(TargetFramework)'!=''">
49+
<Target Name="_MvcCopyDependencyFiles" AfterTargets="Build;_ResolveMvcTestProjectReferences" Condition="'$(TargetFramework)'!=''">
5050
<ItemGroup>
5151
<DepsFilePaths
5252
Condition="'%(_ContentRootProjectReferences.Identity)' != ''"

src/Mvc/Mvc.Testing/src/WebApplicationFactory.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,7 @@ private void SetContentRoot(IWebHostBuilder builder)
188188

189189
private string GetContentRootFromFile(string file)
190190
{
191-
var serializer = new DataContractJsonSerializer(typeof(Dictionary<string, string>), new DataContractJsonSerializerSettings
192-
{
193-
UseSimpleDictionaryFormat = true
194-
});
195-
var data = (Dictionary<string, string>)serializer.ReadObject(File.Open(file, FileMode.Open));
191+
var data = JsonSerializer.Deserialize<IDictionary<string, string>>(File.Open(file, FileMode.Open));
196192
var key = typeof(TEntryPoint).Assembly.GetName().FullName;
197193
return data[key];
198194
}

0 commit comments

Comments
 (0)