Browse Source

Fix assemblies not being resolved when a MSBuild project defines a reference search path via a PropertyGroup/ReferencePath which defines the path using $(SolutionDir).

pull/21/merge
Matt Ward 14 years ago
parent
commit
082f532a69
  1. 8
      src/Main/Base/Project/Src/Project/Solution/Solution.cs

8
src/Main/Base/Project/Src/Project/Solution/Solution.cs

@ -317,6 +317,7 @@ namespace ICSharpCode.SharpDevelop.Project @@ -317,6 +317,7 @@ namespace ICSharpCode.SharpDevelop.Project
changeWatcher.Disable();
changeWatcher.Rename(fileName);
this.fileName = fileName;
UpdateMSBuildProperties();
string outputDirectory = Path.GetDirectoryName(fileName);
if (!System.IO.Directory.Exists(outputDirectory)) {
System.IO.Directory.CreateDirectory(outputDirectory);
@ -1178,6 +1179,7 @@ namespace ICSharpCode.SharpDevelop.Project @@ -1178,6 +1179,7 @@ namespace ICSharpCode.SharpDevelop.Project
string extension = Path.GetExtension(fileName).ToUpperInvariant();
newSolution.fileName = fileName;
newSolution.UpdateMSBuildProperties();
newSolution.isLoading = true;
try {
if (!SetupSolution(newSolution)) {
@ -1190,6 +1192,12 @@ namespace ICSharpCode.SharpDevelop.Project @@ -1190,6 +1192,12 @@ namespace ICSharpCode.SharpDevelop.Project
solutionBeingLoaded = null;
return newSolution;
}
void UpdateMSBuildProperties()
{
MSBuildProjectCollection.SetGlobalProperty("SolutionDir", Directory);
}
#endregion
#region System.IDisposable interface implementation

Loading…
Cancel
Save