Closed amitron72 closed 8 years ago
You're probably hitting a known issue. If you can rollback your csproj to ToolsVersion
<14 (I think, e.g. 12), it'll work.
(newer msbuild target files can't be loaded with the old MS build engine we're using)
Hopefully #57 will land and fix this, but it hasn't been thoroughly tested (yet), feel free to give it a try though if you can afford building the PR.
Thx !
I'm getting this exception:
16:57:34.499 [DEBUG] [org.gradle.api.Project] Msbuild plugin detected. Will add defaults from it. 16:57:34.500 [INFO] [org.gradle.api.Task] Parsing file my_lib.sln ... 16:57:35.031 [ERROR] [org.gradle.api.Task] Error during project file parsing: System.InvalidCastException: Unable to cast object of type 'System.Xml.XmlComment' to type 'System.Xml.XmlElement'. 16:57:35.031 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.ProcessProjectChildren(XmlElement projectElement, String projectDirectoryLocation, Boolean importedProject) 16:57:35.031 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.ProcessImportElement(XmlElement importElement, String projectDirectoryLocation, Boolean importedProject) 16:57:35.032 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.ProcessProjectChildren(XmlElement projectElement, String projectDirectoryLocation, Boolean importedProject) 16:57:35.032 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.ProcessMainProjectElement() 16:57:35.032 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.InternalLoadFromXmlDocument(XmlDocument projectXml, ProjectLoadSettings projectLoadSettings) 16:57:35.032 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.Load(String projectFileName, BuildEventContext buildEventContext, ProjectLoadSettings projectLoadSettings) 16:57:35.032 [ERROR] [org.gradle.api.Task] at ProjectFileParser.PlatformProjectHelper.Load(Project project, String file) 16:57:35.032 [ERROR] [org.gradle.api.Task] at ProjectFileParser.platform_helpers.MsbuildPlatform.Load(Project project, String file) 16:57:35.033 [ERROR] [org.gradle.api.Task] at ProjectFileParser.Program.Parse(String file) 16:57:35.033 [ERROR] [org.gradle.api.Task] at ProjectFileParser.Program.Main(String[] args) 16:57:35.033 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.ProcessProjectChildren(XmlElement projectElement, String projectDirectoryLocation, Boolean importedProject) 16:57:35.033 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.ProcessImportElement(XmlElement importElement, String projectDirectoryLocation, Boolean importedProject) 16:57:35.033 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.ProcessProjectChildren(XmlElement projectElement, String projectDirectoryLocation, Boolean importedProject) 16:57:35.034 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.ProcessMainProjectElement() 16:57:35.034 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.InternalLoadFromXmlDocument(XmlDocument projectXml, ProjectLoadSettings projectLoadSettings) 16:57:35.034 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.Load(String projectFileName, BuildEventContext buildEventContext, ProjectLoadSettings projectLoadSettings) 16:57:35.034 [ERROR] [org.gradle.api.Task] at ProjectFileParser.PlatformProjectHelper.Load(Project project, String file) 16:57:35.034 [ERROR] [org.gradle.api.Task] at ProjectFileParser.platform_helpers.MsbuildPlatform.Load(Project project, String file) 16:57:35.034 [ERROR] [org.gradle.api.Task] at ProjectFileParser.Program.Parse(String file) 16:57:35.035 [ERROR] [org.gradle.api.Task] at ProjectFileParser.Program.Main(String[] args) 16:57:35.037 [ERROR] [org.gradle.BuildExceptionReporter] 16:57:35.037 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception. 16:57:35.037 [ERROR] [org.gradle.BuildExceptionReporter] 16:57:35.037 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong: 16:57:35.038 [ERROR] [org.gradle.BuildExceptionReporter] A problem occurred configuring root project 'my_lib'. 16:57:35.038 [ERROR] [org.gradle.BuildExceptionReporter] > Project file parsing failed
This is my gradle plugin setup:
plugins { id "com.ullink.nuget" version "2.13" id "com.ullink.msbuild" version "2.11" id 'at.bxm.svntools' version "1.3" id 'nu.studer.credentials' version "1.0.1" }
the C# solution is visual studio 2015 update 1