diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 3c62187..a19c68a 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -8,11 +8,8 @@ updates:
- package-ecosystem: "nuget" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
- interval: "weekly"
+ interval: "daily"
groups:
- mstest:
- patterns:
- - "MSTest.*"
skyline-cicd:
patterns:
- "Skyline.DataMiner.CICD.*"
diff --git a/Parsers.Automation/Parsers.Automation.csproj b/Parsers.Automation/Parsers.Automation.csproj
index 886500f..f2c7e0f 100644
--- a/Parsers.Automation/Parsers.Automation.csproj
+++ b/Parsers.Automation/Parsers.Automation.csproj
@@ -1,6 +1,5 @@
-
-
+
netstandard2.0
Skyline.DataMiner.CICD.Parsers.Automation
Skyline.DataMiner.CICD.Parsers.Automation
@@ -14,28 +13,18 @@
https://skyline.be/
Skyline;DataMiner;CICD
Library providing methods to parse DataMiner AutomationScript XML files.
- README.md
- https://github.com/SkylineCommunications/Skyline.DataMiner.CICD.Parsers
- git
+ README.md
+ https://github.com/SkylineCommunications/Skyline.DataMiner.CICD.Parsers
+ git
-
- True
- \
-
-
- True
- \
-
-
- True
- \
-
+
+
+
-
diff --git a/Parsers.AutomationTests/Parsers.AutomationTests.csproj b/Parsers.AutomationTests/Parsers.AutomationTests.csproj
index 0119a9c..6c121ba 100644
--- a/Parsers.AutomationTests/Parsers.AutomationTests.csproj
+++ b/Parsers.AutomationTests/Parsers.AutomationTests.csproj
@@ -1,15 +1,13 @@
- net472;net6.0
- false
+ net48;net6.0;net8.0
+ false
-
-
-
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Parsers.Common/Parsers.Common.csproj b/Parsers.Common/Parsers.Common.csproj
index 12257f1..d7e6230 100644
--- a/Parsers.Common/Parsers.Common.csproj
+++ b/Parsers.Common/Parsers.Common.csproj
@@ -1,56 +1,48 @@
-
- netstandard2.0
- Skyline.DataMiner.CICD.Parsers.Common
- Skyline.DataMiner.CICD.Parsers.Common
- True
- True
- SkylineCommunications
- Skyline Communications
- LICENSE.txt
- True
- icon.png
- https://skyline.be/
- Skyline;DataMiner;CICD
- Library providing Common methods to parse DataMiner XML files.
- README.md
- https://github.com/SkylineCommunications/Skyline.DataMiner.CICD.Parsers
- git
-
+
+ netstandard2.0
+ Skyline.DataMiner.CICD.Parsers.Common
+ Skyline.DataMiner.CICD.Parsers.Common
+ True
+ True
+ SkylineCommunications
+ Skyline Communications
+ LICENSE.txt
+ True
+ icon.png
+ https://skyline.be/
+ Skyline;DataMiner;CICD
+ Library providing Common methods to parse DataMiner XML files.
+ README.md
+ https://github.com/SkylineCommunications/Skyline.DataMiner.CICD.Parsers
+ git
+
-
-
- True
- \
-
-
- True
- \
-
-
- True
- \
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
- Xml/**, XmlEdit/**
-
-
+
+
+ Xml/**, XmlEdit/**
+
+
-
-
-
-
-
+
+
+
+
+
+
diff --git a/Parsers.Common/VisualStudio/Projects/LegacyStyleParser.cs b/Parsers.Common/VisualStudio/Projects/LegacyStyleParser.cs
index 14de3df..1ff267c 100644
--- a/Parsers.Common/VisualStudio/Projects/LegacyStyleParser.cs
+++ b/Parsers.Common/VisualStudio/Projects/LegacyStyleParser.cs
@@ -2,6 +2,7 @@
{
using System;
using System.Collections.Generic;
+ using System.IO;
using System.Linq;
using System.Text;
using System.Xml.Linq;
@@ -194,7 +195,7 @@ public IEnumerable GetCompileFiles()
if (!FileSystem.File.Exists(absolutePath))
{
- continue;
+ throw new FileNotFoundException($"File '{relativePath}' was not found. Please add the file or remove it from the project.");
}
yield return new ProjectFile(relativePath, FileSystem.File.ReadAllText(FileSystem.Path.GetFullPath(absolutePath), Encoding.UTF8));
diff --git a/Parsers.Common/VisualStudio/Projects/SdkStyleParser.cs b/Parsers.Common/VisualStudio/Projects/SdkStyleParser.cs
index 10b6267..47cd710 100644
--- a/Parsers.Common/VisualStudio/Projects/SdkStyleParser.cs
+++ b/Parsers.Common/VisualStudio/Projects/SdkStyleParser.cs
@@ -168,7 +168,7 @@ public string GetTargetFrameworkMoniker()
foreach (XElement propertyGroup in propertyGroups)
{
- var targetFrameworkElement = propertyGroup.Element("TargetFramework");
+ var targetFrameworkElement = propertyGroup.Element("TargetFramework") ?? propertyGroup.Element("TargetFrameworks");
if (targetFrameworkElement == null)
{
diff --git a/Parsers.CommonTests/Parsers.CommonTests.csproj b/Parsers.CommonTests/Parsers.CommonTests.csproj
index b146c9d..215d37a 100644
--- a/Parsers.CommonTests/Parsers.CommonTests.csproj
+++ b/Parsers.CommonTests/Parsers.CommonTests.csproj
@@ -1,7 +1,7 @@
- net472;net6.0
+ net48;net6.0;net8.0
false
@@ -16,11 +16,9 @@
-
-
-
-
-
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Parsers.CommonTests/VisualStudio/Projects/LegacyStyleParserTests.cs b/Parsers.CommonTests/VisualStudio/Projects/LegacyStyleParserTests.cs
new file mode 100644
index 0000000..43960e0
--- /dev/null
+++ b/Parsers.CommonTests/VisualStudio/Projects/LegacyStyleParserTests.cs
@@ -0,0 +1,35 @@
+namespace Parsers.CommonTests.VisualStudio.Projects
+{
+ using System;
+ using System.IO;
+ using System.Linq;
+ using System.Text;
+ using System.Xml.Linq;
+
+ using FluentAssertions;
+
+ using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+ using Skyline.DataMiner.CICD.Parsers.Common.VisualStudio.Projects;
+
+ [TestClass]
+ public class LegacyStyleParserTests
+ {
+ [TestMethod]
+ public void GetCompileFilesTest()
+ {
+ // Arrange
+ string path = Path.GetFullPath(@".\VisualStudio\TestFiles\ProjectsForTesting\Files\Files_UnknownFile.csproj");
+ string projectDir = Path.GetDirectoryName(path);
+ var xmlContent = File.ReadAllText(path, Encoding.UTF8);
+ var document = XDocument.Parse(xmlContent);
+ LegacyStyleParser legacyStyleParser = new LegacyStyleParser(document, projectDir);
+
+ // Act
+ Action action = () => _ = legacyStyleParser.GetCompileFiles().ToList();
+
+ // Assert
+ action.Should().Throw();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Parsers.CommonTests/VisualStudio/Projects/ProjectTests.cs b/Parsers.CommonTests/VisualStudio/Projects/ProjectTests.cs
index 2d2af61..d4795d1 100644
--- a/Parsers.CommonTests/VisualStudio/Projects/ProjectTests.cs
+++ b/Parsers.CommonTests/VisualStudio/Projects/ProjectTests.cs
@@ -60,7 +60,6 @@ public void Load_TargetFrameWorkMoniker(string fileName, string expectedResult)
[TestMethod]
[DataRow("Files_Valid.csproj", 2)]
[DataRow("Files_NoFiles.csproj", 0)]
- [DataRow("Files_UnknownFile.csproj", 0)]
[DataRow("SharedProject.projitems", 2)]
[DataRow("SharedProject.shproj", 2)]
[DataRow("Files_ValidSharedProject.csproj", 4)]
diff --git a/Parsers.CommonTests/VisualStudio/TestFiles/ProjectsForTesting/SpecialChar/SpecialChar.csproj b/Parsers.CommonTests/VisualStudio/TestFiles/ProjectsForTesting/SpecialChar/SpecialChar.csproj
index b729452..8cc0fb4 100644
--- a/Parsers.CommonTests/VisualStudio/TestFiles/ProjectsForTesting/SpecialChar/SpecialChar.csproj
+++ b/Parsers.CommonTests/VisualStudio/TestFiles/ProjectsForTesting/SpecialChar/SpecialChar.csproj
@@ -56,7 +56,6 @@
-
diff --git a/Parsers.Protocol/Parsers.Protocol.csproj b/Parsers.Protocol/Parsers.Protocol.csproj
index 8edd2ca..603839a 100644
--- a/Parsers.Protocol/Parsers.Protocol.csproj
+++ b/Parsers.Protocol/Parsers.Protocol.csproj
@@ -1,47 +1,38 @@
-
- netstandard2.0
- Skyline.DataMiner.CICD.Parsers.Protocol
- Skyline.DataMiner.CICD.Parsers.Protocol
- True
- True
- SkylineCommunications
- Skyline Communications
- LICENSE.txt
- True
- icon.png
- https://skyline.be/
- Skyline;DataMiner;CICD
- Library providing methods to parse DataMiner Protocol XML files.
- README.md
- https://github.com/SkylineCommunications/Skyline.DataMiner.CICD.Parsers
- git
-
+
+ netstandard2.0
+ Skyline.DataMiner.CICD.Parsers.Protocol
+ Skyline.DataMiner.CICD.Parsers.Protocol
+ True
+ True
+ SkylineCommunications
+ Skyline Communications
+ LICENSE.txt
+ True
+ icon.png
+ https://skyline.be/
+ Skyline;DataMiner;CICD
+ Library providing methods to parse DataMiner Protocol XML files.
+ README.md
+ https://github.com/SkylineCommunications/Skyline.DataMiner.CICD.Parsers
+ git
+
-
-
- True
- \
-
-
- True
- \
-
-
- True
- \
-
-
+
+
+
+
+
-
-
-
+
+
+
-
-
- Xml/**
-
-
+
+
+ Xml/**
+
+
\ No newline at end of file
diff --git a/Parsers.ProtocolTests/Parsers.ProtocolTests.csproj b/Parsers.ProtocolTests/Parsers.ProtocolTests.csproj
index 9493498..2068f1f 100644
--- a/Parsers.ProtocolTests/Parsers.ProtocolTests.csproj
+++ b/Parsers.ProtocolTests/Parsers.ProtocolTests.csproj
@@ -1,7 +1,7 @@
- net472;net6.0
+ net48;net6.0;net8.0
disable
disable
@@ -9,15 +9,13 @@
-
-
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
@@ -29,5 +27,5 @@
Always
-
+