diff --git a/Prebuild/src/Core/Kernel.cs b/Prebuild/src/Core/Kernel.cs index 638f9509f1..52087c002d 100755 --- a/Prebuild/src/Core/Kernel.cs +++ b/Prebuild/src/Core/Kernel.cs @@ -82,8 +82,8 @@ namespace Prebuild.Core private CommandLineCollection m_CommandLine; private Log m_Log; private CurrentDirectory m_CurrentWorkingDirectory; - [Obsolete] - private XmlSchemaCollection m_Schemas; + //[Obsolete] + //private XmlSchemaCollection m_Schemas; private readonly Dictionary m_Targets = new Dictionary(); private readonly Dictionary m_Nodes = new Dictionary(); @@ -257,7 +257,7 @@ namespace Prebuild.Core // RemoveDirectoryMatches(dir,dirPattern); // } // } - + /* private void LoadSchema() { Assembly assembly = GetType().Assembly; @@ -276,6 +276,7 @@ namespace Prebuild.Core m_Schemas = new XmlSchemaCollection(); m_Schemas.Add(m_SchemaURI, schema); } + */ private void CacheVersion() { @@ -684,7 +685,7 @@ namespace Prebuild.Core } m_PauseAfterFinish = m_CommandLine.WasPassed("pause"); - LoadSchema(); + //LoadSchema(); } /// diff --git a/Prebuild/src/Core/Targets/VSGenericTarget.cs b/Prebuild/src/Core/Targets/VSGenericTarget.cs index a381c8c995..a1843138e7 100755 --- a/Prebuild/src/Core/Targets/VSGenericTarget.cs +++ b/Prebuild/src/Core/Targets/VSGenericTarget.cs @@ -753,8 +753,9 @@ namespace Prebuild.Core.Targets WriteProjectReferencesDotNet(solution, project, ps); ps.WriteLine(""); + #endregion + } - #endregion } private void WriteProjectReferencesDotNet(SolutionNode solution, ProjectNode project, StreamWriter ps) @@ -807,7 +808,28 @@ namespace Prebuild.Core.Targets ps.WriteLine(" {0}", Helper.MakeFilePath(refr.Path, refr.Name, "dll")); } } - + else + { + // this may be wrong + // Use absolute path to assembly (for determining assembly type) + string absolutePath = Path.Combine(project.FullPath, MakeRefPath(project)); + if (File.Exists(Helper.MakeFilePath(absolutePath, refr.Name, "exe"))) + { + // Assembly is an executable (exe) + ps.WriteLine(" {0}", Helper.MakeFilePath(absolutePath, refr.Name, "exe")); + } + else if (File.Exists(Helper.MakeFilePath(absolutePath, refr.Name, "dll"))) + { + // Assembly is an library (dll) + ps.WriteLine(" {0}", Helper.MakeFilePath(absolutePath, refr.Name, "dll")); + } + else + { + // string referencePath = Helper.MakeFilePath(refr.Path, refr.Name, "dll"); + // kernel.Log.Write(LogType.Warning, "Reference \"{0}\": The specified file doesn't exist.", referencePath); + // ps.WriteLine(" {0}", Helper.MakeFilePath(absolutePath, refr.Name, "dll")); + } + } ps.WriteLine(" {0}", refr.LocalCopy); ps.WriteLine(" "); } diff --git a/Prebuild/src/Properties/AssemblyInfo.cs b/Prebuild/src/Properties/AssemblyInfo.cs index 079d6a540f..e18c2e95cb 100644 --- a/Prebuild/src/Properties/AssemblyInfo.cs +++ b/Prebuild/src/Properties/AssemblyInfo.cs @@ -48,7 +48,6 @@ using System.Resources; // FxCop recommended attributes [assembly: ComVisible(false)] -[assembly: FileIOPermission(SecurityAction.RequestMinimum, Unrestricted=true)] [assembly: CLSCompliant(true)] //