mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 17:20:49 +08:00 
			
		
		
		
	- 修复 根据代码注释,迁移到数据库备注,当实体类属于 .exe 程序集时的 bug;
This commit is contained in:
		@@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
	<PropertyGroup>
 | 
			
		||||
		<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
 | 
			
		||||
		<Version>0.7.1</Version>
 | 
			
		||||
		<Version>0.7.2</Version>
 | 
			
		||||
		<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
 | 
			
		||||
		<Authors>YeXiangQin</Authors>
 | 
			
		||||
		<Description>FreeSql is the most convenient ORM in dotnet. It supports Mysql, Postgresql, SqlServer, Oracle and Sqlite.</Description>
 | 
			
		||||
 
 | 
			
		||||
@@ -282,7 +282,7 @@ namespace FreeSql.Internal
 | 
			
		||||
        /// <returns>Dict:key=属性名,value=注释</returns>
 | 
			
		||||
        public static Dictionary<string, string> GetProperyCommentBySummary(Type type)
 | 
			
		||||
        {
 | 
			
		||||
            var xmlPath = type.Assembly.Location.Replace(".dll", ".xml");
 | 
			
		||||
            var xmlPath = type.Assembly.Location.Replace(".dll", ".xml").Replace(".exe", ".xml");
 | 
			
		||||
            if (File.Exists(xmlPath) == false) return null;
 | 
			
		||||
 | 
			
		||||
            var dic = new Dictionary<string, string>();
 | 
			
		||||
@@ -290,7 +290,15 @@ namespace FreeSql.Internal
 | 
			
		||||
            var sReader = new StringReader(File.ReadAllText(xmlPath));
 | 
			
		||||
            using (var xmlReader = XmlReader.Create(sReader))
 | 
			
		||||
            {
 | 
			
		||||
                var xpath = new XPathDocument(xmlReader);
 | 
			
		||||
                XPathDocument xpath = null;
 | 
			
		||||
                try
 | 
			
		||||
                {
 | 
			
		||||
                    xpath = new XPathDocument(xmlReader);
 | 
			
		||||
                }
 | 
			
		||||
                catch
 | 
			
		||||
                {
 | 
			
		||||
                    return null;
 | 
			
		||||
                }
 | 
			
		||||
                var xmlNav = xpath.CreateNavigator();
 | 
			
		||||
 | 
			
		||||
                var props = type.GetProperties();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user