瀏覽代碼

xls:调整json类库到11.0.0

xulisong 5 年之前
父節點
當前提交
84d2857ea4

+ 2 - 2
Executer/DataCheck/ServiceDataCheck.csproj

@@ -38,8 +38,8 @@
     <Reference Include="ICSharpCode.SharpZipLib, Version=1.0.0.999, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
       <HintPath>..\..\packages\SharpZipLib.1.0.0\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
     </Reference>
-    <Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\Newtonsoft.Json.10.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
+    <Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <HintPath>..\..\packages\Newtonsoft.Json.11.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
     </Reference>
     <Reference Include="NPOI, Version=2.3.0.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
       <HintPath>..\..\packages\NPOI.2.3.0\lib\net40\NPOI.dll</HintPath>

+ 4 - 0
Executer/DataCheck/app.config

@@ -14,6 +14,10 @@
         <assemblyIdentity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral" />
         <bindingRedirect oldVersion="0.0.0.0-1.0.0.999" newVersion="1.0.0.999" />
       </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
+      </dependentAssembly>
     </assemblyBinding>
   </runtime>
 </configuration>

+ 1 - 1
Executer/DataCheck/packages.config

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="Newtonsoft.Json" version="10.0.1" targetFramework="net461" />
+  <package id="Newtonsoft.Json" version="11.0.1" targetFramework="net461" />
   <package id="NPOI" version="2.3.0" targetFramework="net461" />
   <package id="SharpZipLib" version="1.0.0" targetFramework="net461" />
 </packages>

+ 3 - 2
Executer/DataExport/RevitToJBim/RevitToJBim.csproj

@@ -31,8 +31,8 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
-      <HintPath>..\..\..\packages\Newtonsoft.Json.10.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
+    <Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <HintPath>..\..\..\packages\Newtonsoft.Json.11.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
     </Reference>
     <Reference Include="RevitAPI">
       <HintPath>..\Dlls\RevitAPI.dll</HintPath>
@@ -120,6 +120,7 @@
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
+    <None Include="app.config" />
     <None Include="packages.config" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 11 - 0
Executer/DataExport/RevitToJBim/app.config

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <runtime>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+  </runtime>
+</configuration>

+ 1 - 1
Executer/DataExport/RevitToJBim/packages.config

@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="Newtonsoft.Json" version="10.0.1" targetFramework="net461" />
+  <package id="Newtonsoft.Json" version="11.0.1" targetFramework="net461" />
 </packages>

+ 1 - 1
Starter/ExportStart.csproj

@@ -18,7 +18,7 @@
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
-    <OutputPath>..\..\OutputDll\</OutputPath>
+    <OutputPath>..\OutputDll\</OutputPath>
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>

+ 18 - 5
Starter/Program.cs

@@ -23,11 +23,24 @@ namespace ExportStart
         [STAThread]
         static void Main(string[] args)
         {
-            string command = args[0];
-            string path = args[1];
-
-            //string command = "DataExport";
-            //string path = @"E:\导出测试\test.rvt";
+            string command = null;
+            string path = null;
+            if (args.Length > 0)
+            {
+                command = args[0];
+            }
+            if (args.Length > 1)
+            {
+                path = args[1];
+            }
+#if DEBUG
+            command = "DataExport";
+            path = @"E:\导出测试\test.rvt";
+#endif
+            if (string.IsNullOrEmpty(command))
+            {
+                Console.WriteLine("命令参数错误");
+            }
             if (File.Exists(path)&&Enum.TryParse(command, out CommandType commandType))
             {
                 var app = RevitCoreContext.Instance.Application;