Skip to content

Commit

Permalink
Merge pull request #62 from marisks/cmd-fix
Browse files Browse the repository at this point in the history
Fixed issue reading config when running from Command line.
  • Loading branch information
haacked committed Oct 17, 2013
2 parents 560ab3e + b3e2436 commit 48431a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 1 addition & 3 deletions SeeGitApp/Models/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ public class Settings
private readonly Configuration _config;
public Settings()
{
var fileMap = new ExeConfigurationFileMap();
fileMap.ExeConfigFilename = @"SeeGit.exe.config";
_config = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None);
_config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);

if (!_config.HasFile)
throw new ConfigurationErrorsException("Config file not found.");
Expand Down
File renamed without changes.
5 changes: 4 additions & 1 deletion UnitTests/UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,15 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="SeeGit.exe.config">
<None Include="App.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down

0 comments on commit 48431a6

Please sign in to comment.