1
Vote

Prject load error because windows path is not C:\windows

description

I have Win XP64 and i installed it to C:\WinXP64
 
When i use solgen i get this error
 
A problem occurred running SolGen and the generation did not complete.
Exception: The imported project "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file
exists on disk. D:\My Documents\Visual Studio 2008\Projects.........
 
at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, XmlNode xmlNode, String resourceName, Object[] args)
at Microsoft.Build.BuildEngine.Project.LoadImportedProject(Import import)
at Microsoft.Build.BuildEngine.Project.ProcessImportElement(XmlElement importElement, Boolean importedProject)
at Microsoft.Build.BuildEngine.Project.ProcessProjectChildren(XmlElement projectElement, Boolean importedProject)
at Microsoft.Build.BuildEngine.Project.ProcessMainProjectElement()
at Microsoft.Build.BuildEngine.Project.InternalLoadFromXmlDocument(XmlDocument projectXml)
at Microsoft.Build.BuildEngine.Project.Load(String projectFileName)
at SolGen.SolutionGenerator.ProcessProject(String folder, String file)
at SolGen.SolutionGenerator.FindAllProjects(String folder)
at SolGen.SolutionGenerator.FindAllProjects(String folder)
at SolGen.SolutionGenerator.Start(String[] args)
at SolGen.SolGenMain.Main(String[] args)
 
In the project file the refernce is
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
 
It would appear the project class is not resolving the $(MSBuildBinPath) correctly when it load the project
 
Project project = new Project(m_Engine);
project.Load(qualifiedFile);

comments