diff --git a/examples/project/aggregated/A/A.csproj b/examples/project/aggregated/A/A.csproj index 294df78..38ecf55 100644 --- a/examples/project/aggregated/A/A.csproj +++ b/examples/project/aggregated/A/A.csproj @@ -1,7 +1,7 @@ - net6.0;net7.0 + net6.0 diff --git a/examples/project/aggregated/B/B.csproj b/examples/project/aggregated/B/B.csproj index 294df78..38ecf55 100644 --- a/examples/project/aggregated/B/B.csproj +++ b/examples/project/aggregated/B/B.csproj @@ -1,7 +1,7 @@ - net6.0;net7.0 + net6.0 diff --git a/examples/project/aggregated/Combined/Combined.csproj b/examples/project/aggregated/Combined/Combined.csproj index 0cbffda..1f34cd7 100644 --- a/examples/project/aggregated/Combined/Combined.csproj +++ b/examples/project/aggregated/Combined/Combined.csproj @@ -1,7 +1,7 @@ - net6.0;net7.0 + net6.0 diff --git a/examples/project/embedded/embedded.csproj b/examples/project/embedded/embedded.csproj index 86f39c0..1ef5315 100644 --- a/examples/project/embedded/embedded.csproj +++ b/examples/project/embedded/embedded.csproj @@ -1,7 +1,7 @@ - net6.0;net7.0 + net6.0 diff --git a/examples/project/implicitusings/implicitusings.csproj b/examples/project/implicitusings/implicitusings.csproj index 4cbec2f..d215c71 100644 --- a/examples/project/implicitusings/implicitusings.csproj +++ b/examples/project/implicitusings/implicitusings.csproj @@ -1,7 +1,7 @@ - net6.0;net7.0 + net6.0 enable diff --git a/examples/project/packagereference/packagereference.csproj b/examples/project/packagereference/packagereference.csproj index 98500d8..a7bc646 100644 --- a/examples/project/packagereference/packagereference.csproj +++ b/examples/project/packagereference/packagereference.csproj @@ -1,7 +1,7 @@ - net6.0;net7.0 + net6.0 diff --git a/examples/project/referencetoembedded/referencetoembedded.csproj b/examples/project/referencetoembedded/referencetoembedded.csproj index e1738c7..4060fb4 100644 --- a/examples/project/referencetoembedded/referencetoembedded.csproj +++ b/examples/project/referencetoembedded/referencetoembedded.csproj @@ -1,7 +1,7 @@ - net6.0;net7.0 + net6.0 diff --git a/examples/project/single/single.csproj b/examples/project/single/single.csproj index 294df78..38ecf55 100644 --- a/examples/project/single/single.csproj +++ b/examples/project/single/single.csproj @@ -1,7 +1,7 @@ - net6.0;net7.0 + net6.0 diff --git a/src/LeanCode.ContractsGenerator/Compilation/MSBuild/MSBuildHelper.cs b/src/LeanCode.ContractsGenerator/Compilation/MSBuild/MSBuildHelper.cs index 768391b..42bf894 100644 --- a/src/LeanCode.ContractsGenerator/Compilation/MSBuild/MSBuildHelper.cs +++ b/src/LeanCode.ContractsGenerator/Compilation/MSBuild/MSBuildHelper.cs @@ -14,14 +14,6 @@ namespace LeanCode.ContractsGenerator.Compilation.MSBuild; public static class MSBuildHelper { - private const string FrameworkMoniker = -#if NET6_0 - "net6.0"; -#elif NET7_0 - "net7.0"; -#else -#error TargetFramework property mismatch between project and code. -#endif private static readonly string[] RestoreTarget = new string[] { "Restore" }; private static readonly ImmutableDictionary GlobalProperties = ImmutableDictionary.CreateRange(new Dictionary @@ -33,9 +25,6 @@ public static class MSBuildHelper // Use the preview language version to force the full set of available analyzers to run on the project. ["LangVersion"] = "preview", - - ["TargetFrameworks"] = FrameworkMoniker, - ["TargetFramework"] = FrameworkMoniker, }); static MSBuildHelper() @@ -100,7 +89,6 @@ public static int RestoreProjects( if (!projectInstance.Targets.ContainsKey("_IsProjectRestoreSupported")) { - System.Console.WriteLine("No _IsProjectRestoreSupported"); continue; }