Skip to content

Commit

Permalink
Updated Resource location to output directory
Browse files Browse the repository at this point in the history
  • Loading branch information
pmahend1 committed Feb 27, 2020
1 parent ffba3c5 commit 5f50768
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .Net Core/MSRewards/MSRewards.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
<StartupObject>MSRewards.Program</StartupObject>
</PropertyGroup>

<ItemGroup>
<Content Include="Resources.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Selenium.Firefox.WebDriver" Version="0.26.0" />
<PackageReference Include="Selenium.Support" Version="3.141.0" />
Expand Down
4 changes: 2 additions & 2 deletions .Net Core/MSRewards/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,15 @@ async Task RunProcess()
async Task EdgeSearch(int current, int target)
{

using StreamReader r = new StreamReader(@"../../../Resources.json");
using StreamReader r = new StreamReader("Resources.json");

string json = r.ReadToEnd();
var jsonObject = JObject.Parse(json);

r.Close();
if (jsonObject != null)
{
var edgeBrowser= JsonConvert.DeserializeObject<EdgeBrowser>(jsonObject["Edge"].ToString());
var edgeBrowser = JsonConvert.DeserializeObject<EdgeBrowser>(jsonObject["Edge"].ToString());


var service = EdgeDriverService.CreateDefaultService(edgeBrowser.DriverLocation, edgeBrowser.DriverExecutableName);
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -459,3 +459,4 @@ MigrationBackup/
.ionide/


Properties/

0 comments on commit 5f50768

Please sign in to comment.