Skip to content

Commit

Permalink
Fix target name and JSON parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
captainsafia committed Dec 14, 2020
1 parent adc15c9 commit 291f8f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</ItemGroup>
</Target>

<Target Name="CopyAditionalFiles" AfterTargets="Build;_ResolveMvcTestProjectReferences" Condition="'$(TargetFramework)'!=''">
<Target Name="_MvcCopyDependencyFiles" AfterTargets="Build;_ResolveMvcTestProjectReferences" Condition="'$(TargetFramework)'!=''">
<ItemGroup>
<DepsFilePaths
Condition="'%(_ContentRootProjectReferences.Identity)' != ''"
Expand Down
6 changes: 1 addition & 5 deletions src/Mvc/Mvc.Testing/src/WebApplicationFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,7 @@ private void SetContentRoot(IWebHostBuilder builder)

private string GetContentRootFromFile(string file)
{
var serializer = new DataContractJsonSerializer(typeof(Dictionary<string, string>), new DataContractJsonSerializerSettings
{
UseSimpleDictionaryFormat = true
});
var data = (Dictionary<string, string>)serializer.ReadObject(File.Open(file, FileMode.Open));
var data = JsonSerializer.Deserialize<IDictionary<string, string>>(File.Open(file, FileMode.Open));
var key = typeof(TEntryPoint).Assembly.GetName().FullName;
return data[key];
}
Expand Down

0 comments on commit 291f8f7

Please sign in to comment.