public void AssInfoFrom_HappyCase() { ProjInfo result = OldStyleCsProj.ProjInfoFrom("OldStyleCsProjSample.xml"); result.AssName.Should().Be("AssembliesByRepo"); result.AssType.Should().Be(ProjInfo.AssTypes.Exe); result.CsProjPath.Should().Be("OldStyleCsProjSample.xml"); }
public static ProjInfo GetAssInfoFrom(string csProjPath) { try { return(OldStyleCsProj.ProjInfoFrom(csProjPath)); } catch (Exception) { } try { return(SdkStyleCsProj.ProjInfoFrom(csProjPath)); } catch (Exception) { } throw new Exception("Uknown csproj file format or failed to parse csproj file."); }