Unable to Build Solution MSB4014
Followed by 4 people
Answered
I've recently been unable to build a solution after making changes to Visual Studio.
Rider Version: 2020.3.3
Operating System: Windows 10
Changes made:
- Updated Visual Studio Professional 2019 to version 16.9.1
- Uninstalled Visual Studio Professional 2017
- Uninstalled Visual Studio Build Tools 2017
My machine had Visual Studio 2017 install along side 2019.
After making the changes I now get this error when trying to build in Rider (from Solution Builder logs):
Build started 16/3/2021 10:45:32 AM.
Logging verbosity is set to: Normal. 0>D:\redacted\redacted\src\redacted.sln : error MSB4014: The build stopped unexpectedly because of an internal failure.
D:\redacted\redacted\src\redacted.sln : error MSB4014: System.NotSupportedException: The given path's format is not supported.
D:\redacted\redacted\src\redacted.sln : error MSB4014: at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
D:\redacted\redacted\src\redacted.sln : error MSB4014: at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
D:\redacted\redacted\src\redacted.sln : error MSB4014: at Microsoft.Build.Construction.ProjectInSolution.get_AbsolutePath()
D:\redacted\redacted\src\redacted.sln : error MSB4014: at Microsoft.Build.Construction.SolutionProjectGenerator.AddPropertyGroupForSolutionConfiguration(ProjectRootElement msbuildProject, SolutionFile solutionFile, SolutionConfigurationInSolution solutionConfiguration)
D:\redacted\redacted\src\redacted.sln : error MSB4014: at Microsoft.Build.Construction.SolutionProjectGenerator.CreateTraversalInstance(String wrapperProjectToolsVersion, Boolean explicitToolsVersionSpecified, List`1 projectsInOrder)
D:\redacted\redacted\src\redacted.sln : error MSB4014: at Microsoft.Build.Construction.SolutionProjectGenerator.CreateSolutionProject(String wrapperProjectToolsVersion, Boolean explicitToolsVersionSpecified)
D:\redacted\redacted\src\redacted.sln : error MSB4014: at Microsoft.Build.Construction.SolutionProjectGenerator.Generate()
D:\redacted\redacted\src\redacted.sln : error MSB4014: at Microsoft.Build.Execution.ProjectInstance.GenerateSolutionWrapper(String projectFile, IDictionary`2 globalProperties, String toolsVersion, ILoggingService loggingService, BuildEventContext projectBuildEventContext, IReadOnlyCollection`1 targetNames, ISdkResolverService sdkResolverService, Int32 submissionId)
D:\redacted\redacted\src\redacted.sln : error MSB4014: at Microsoft.Build.Execution.ProjectInstance.LoadSolutionForBuild(String projectFile, PropertyDictionary`1 globalPropertiesInstances, String toolsVersion, BuildParameters buildParameters, ILoggingService loggingService, BuildEventContext projectBuildEventContext, Boolean isExplicitlyLoaded, IReadOnlyCollection`1 targetNames, ISdkResolverService sdkResolverService, Int32 submissionId)
D:\redacted\redacted\src\redacted.sln : error MSB4014: at Microsoft.Build.Execution.BuildManager.LoadSolutionIntoConfiguration(BuildRequestConfiguration config, BuildRequest request)
D:\redacted\redacted\src\redacted.sln : error MSB4014: at Microsoft.Build.Execution.BuildManager.HandleNewRequest(Int32 node, BuildRequestBlocker blocker)
D:\redacted\redacted\src\redacted.sln : error MSB4014: at Microsoft.Build.Execution.BuildManager.IssueBuildSubmissionToScheduler(BuildSubmission submission, Boolean allowMainThreadBuild)
Build FAILED.
D:\redacted\redacted\src\redacted.sln : error MSB4014: The build stopped unexpectedly because of an internal failure.
D:\redacted\redacted\src\redacted.sln : error MSB4014: System.NotSupportedException: The given path's format is not supported.
D:\redacted\redacted\src\redacted.sln : error MSB4014: at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
D:\redacted\redacted\src\redacted.sln : error MSB4014: at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
D:\redacted\redacted\src\redacted.sln : error MSB4014: at Microsoft.Build.Construction.ProjectInSolution.get_AbsolutePath()
D:\redacted\redacted\src\redacted.sln : error MSB4014: at Microsoft.Build.Construction.SolutionProjectGenerator.AddPropertyGroupForSolutionConfiguration(ProjectRootElement msbuildProject, SolutionFile solutionFile, SolutionConfigurationInSolution solutionConfiguration)
D:\redacted\redacted\src\redacted.sln : error MSB4014: at Microsoft.Build.Construction.SolutionProjectGenerator.CreateTraversalInstance(String wrapperProjectToolsVersion, Boolean explicitToolsVersionSpecified, List`1 projectsInOrder)
D:\redacted\redacted\src\redacted.sln : error MSB4014: at Microsoft.Build.Construction.SolutionProjectGenerator.CreateSolutionProject(String wrapperProjectToolsVersion, Boolean explicitToolsVersionSpecified)
D:\redacted\redacted\src\redacted.sln : error MSB4014: at Microsoft.Build.Construction.SolutionProjectGenerator.Generate()
D:\redacted\redacted\src\redacted.sln : error MSB4014: at Microsoft.Build.Execution.ProjectInstance.GenerateSolutionWrapper(String projectFile, IDictionary`2 globalProperties, String toolsVersion, ILoggingService loggingService, BuildEventContext projectBuildEventContext, IReadOnlyCollection`1 targetNames, ISdkResolverService sdkResolverService, Int32 submissionId)
D:\redacted\redacted\src\redacted.sln : error MSB4014: at Microsoft.Build.Execution.ProjectInstance.LoadSolutionForBuild(String projectFile, PropertyDictionary`1 globalPropertiesInstances, String toolsVersion, BuildParameters buildParameters, ILoggingService loggingService, BuildEventContext projectBuildEventContext, Boolean isExplicitlyLoaded, IReadOnlyCollection`1 targetNames, ISdkResolverService sdkResolverService, Int32 submissionId)
D:\redacted\redacted\src\redacted.sln : error MSB4014: at Microsoft.Build.Execution.BuildManager.LoadSolutionIntoConfiguration(BuildRequestConfiguration config, BuildRequest request)
D:\redacted\redacted\src\redacted.sln : error MSB4014: at Microsoft.Build.Execution.BuildManager.HandleNewRequest(Int32 node, BuildRequestBlocker blocker)
D:\redacted\redacted\src\redacted.sln : error MSB4014: at Microsoft.Build.Execution.BuildManager.IssueBuildSubmissionToScheduler(BuildSubmission submission, Boolean allowMainThreadBuild)
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.11
Things have tried:
- Re-installing Visual Studio Professional 2017
- Re-installing Visual Studio Build Tools 2017
- Re-Installing Visual Studio 2019
- Re-installing Rider 2020.3.3 without previous settings
There are two solutions that I work on and only one of them causes this error, the other is fine. The one the errors is an ASP.NET Web Application and the other is ASP.NET Web API. Visual Studio Professional 2019 builds the solution.
Because I updated 2019 and uninstalled 2017 before initiating a build I am unable to determine which cause the issue.
Please sign in to leave a comment.
I have the same issue with both Rider 2020.3.4 and Rider 2021.1-EAP8.
The issue also started after installing/updating Visual Studio 2019. (I did and do not have any 2017 versions)
I also tried to reinstall all both VS and Rider, but the error still happens when using the MSBuild from VS
I solved the problem by explicitly downgrading VS 2019 to version 16.8.*.
I'm not completely sure, but think my issue was related to this bug in MSBuild https://github.com/dotnet/msbuild/issues/6236
Hello Bjarke,
When you face issues with build in Rider, the first step to make is to try building solution via Terminal in Rider to isolate the issue and narrow down possible reasons for it. I am glad to hear that this time the reason for the issue was found, it indeed looks like related to MSBuild bug.
Thanks Bjarke, I downgraded Visual Studio to version 16.8.7 and it works.
The fix for the issue is in Visual Studio 2019 v16.9.3, https://github.com/dotnet/msbuild/issues/6236#issuecomment-810557730