Skip to content

Commit

Permalink
修复使用串口库时,必须将串口需要的Nuget库,在启动Exe中直接引用
Browse files Browse the repository at this point in the history
  • Loading branch information
cdy816 committed Feb 14, 2022
1 parent 36fb7c1 commit 90d918a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Common/Cdy.Spider.Common/Channel/ChannelBase2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public bool Open()
}
catch(Exception ex)
{
LoggerService.Service.Info("Channel", "Open channel " + this.Name+" failed."+ex.Message);
LoggerService.Service.Warn("Channel", "Open channel " + this.Name+" failed."+ex.Message);
return false;
}
}
Expand Down
3 changes: 2 additions & 1 deletion Develop/InSpiderDevelopWindow/InSpiderDevelopWindow.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)\Output&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)$(TargetName).exe&quot; copy &quot;$(TargetDir)$(TargetName).exe&quot; &quot;$(SolutionDir)\Output&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)$(TargetName).XML&quot; copy &quot;$(TargetDir)$(TargetName).XML&quot; &quot;$(SolutionDir)\Output\Xml&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)$(TargetName).pdb&quot; copy &quot;$(TargetDir)$(TargetName).pdb&quot; &quot;$(SolutionDir)\Output&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)zh-CN&quot; copy &quot;$(TargetDir)zh-CN\*.dll&quot; &quot;$(SolutionDir)\Output\zh-CN&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)Config&quot; copy &quot;$(TargetDir)Config\*.cfg&quot; &quot;$(SolutionDir)\Output\Config&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)$(TargetName).runtimeconfig.json&quot; copy &quot;$(TargetDir)$(TargetName).runtimeconfig.json&quot; &quot;$(SolutionDir)\Output&quot; /y" />
<Exec Command="copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)\Output&quot; /y&#xD;&#xA;&#xD;&#xA;if exist &quot;$(TargetDir)$(TargetName).runtimeconfig.json&quot; copy &quot;$(TargetDir)$(TargetName).runtimeconfig.json&quot; &quot;$(SolutionDir)\Output&quot; /y&#xD;&#xA;copy &quot;$(TargetDir)$(TargetName).deps.json&quot; &quot;$(SolutionDir)\Output&quot; /y&#xD;&#xA;&#xD;&#xA;if exist &quot;$(TargetDir)$(TargetName).exe&quot; copy &quot;$(TargetDir)$(TargetName).exe&quot; &quot;$(SolutionDir)\Output&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)$(TargetName).XML&quot; copy &quot;$(TargetDir)$(TargetName).XML&quot; &quot;$(SolutionDir)\Output\Xml&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)$(TargetName).pdb&quot; copy &quot;$(TargetDir)$(TargetName).pdb&quot; &quot;$(SolutionDir)\Output&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)zh-CN&quot; copy &quot;$(TargetDir)zh-CN\*.dll&quot; &quot;$(SolutionDir)\Output\zh-CN&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)Config&quot; copy &quot;$(TargetDir)Config\*.cfg&quot; &quot;$(SolutionDir)\Output\Config&quot; /y&#xD;&#xA;" />
</Target>

<ItemGroup>
Expand Down Expand Up @@ -43,6 +43,7 @@

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="System.IO.Ports" Version="5.0.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"profiles": {
"InSpiderDevelopWindow": {
"commandName": "Executable",
"executablePath": "C:\\Users\\cdy81\\source\\repos\\cdy816\\Spider\\Output\\InSpiderStudio.exe"
"executablePath": "C:\\Users\\chongdaoyang.JIUSIYI\\source\\repos\\cdy816\\Spider\\Output\\InSpiderStudio.exe"
}
}
}
7 changes: 6 additions & 1 deletion Run/InSpiderRun/InSpiderRun.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<ApplicationIcon>Image\spider.ico</ApplicationIcon>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.IO.Ports" Version="5.0.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Common\Cdy.Spider.Common\Cdy.Spider.Common.csproj" />
<ProjectReference Include="..\..\SpiderRuntime\SpiderRuntime.csproj" />
Expand Down Expand Up @@ -58,7 +63,7 @@
</ItemGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)\Output&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)$(TargetName).XML&quot; copy &quot;$(TargetDir)$(TargetName).XML&quot; &quot;$(SolutionDir)\Output\Xml&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)$(TargetName).pdb&quot; copy &quot;$(TargetDir)$(TargetName).pdb&quot; &quot;$(SolutionDir)\Output&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)zh-CN&quot; copy &quot;$(TargetDir)zh-CN\*.dll&quot; &quot;$(SolutionDir)\Output\zh-CN&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)$(TargetName).exe&quot; copy &quot;$(TargetDir)$(TargetName).exe&quot; &quot;$(SolutionDir)\Output&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)$(TargetName).runtimeconfig.json&quot; copy &quot;$(TargetDir)$(TargetName).exe&quot; &quot;$(SolutionDir)\Output&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)Config&quot; copy &quot;$(TargetDir)Config\*.cfg&quot; &quot;$(SolutionDir)\Output\Config&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)$(TargetName).runtimeconfig.json&quot; copy &quot;$(TargetDir)$(TargetName).runtimeconfig.json&quot; &quot;$(SolutionDir)\Output&quot; /y" />
<Exec Command="copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)\Output&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)$(TargetName).deps.json&quot; copy &quot;$(TargetDir)$(TargetName).deps.json&quot; &quot;$(SolutionDir)\Output&quot; /y&#xD;&#xA;&#xD;&#xA;if exist &quot;$(TargetDir)$(TargetName).XML&quot; copy &quot;$(TargetDir)$(TargetName).XML&quot; &quot;$(SolutionDir)\Output\Xml&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)$(TargetName).pdb&quot; copy &quot;$(TargetDir)$(TargetName).pdb&quot; &quot;$(SolutionDir)\Output&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)zh-CN&quot; copy &quot;$(TargetDir)zh-CN\*.dll&quot; &quot;$(SolutionDir)\Output\zh-CN&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)$(TargetName).exe&quot; copy &quot;$(TargetDir)$(TargetName).exe&quot; &quot;$(SolutionDir)\Output&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)$(TargetName).runtimeconfig.json&quot; copy &quot;$(TargetDir)$(TargetName).exe&quot; &quot;$(SolutionDir)\Output&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)Config&quot; copy &quot;$(TargetDir)Config\*.cfg&quot; &quot;$(SolutionDir)\Output\Config&quot; /y&#xD;&#xA;if exist &quot;$(TargetDir)$(TargetName).runtimeconfig.json&quot; copy &quot;$(TargetDir)$(TargetName).runtimeconfig.json&quot; &quot;$(SolutionDir)\Output&quot; /y&#xD;&#xA;" />
</Target>

</Project>
3 changes: 1 addition & 2 deletions Run/InSpiderRun/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
"profiles": {
"InSpiderRun": {
"commandName": "Executable",
"executablePath": "C:\\Users\\cdy81\\source\\repos\\cdy816\\Spider\\Output\\InSpiderRun.exe",
"commandLineArgs": "start client"
"executablePath": "C:\\Users\\chongdaoyang.JIUSIYI\\source\\repos\\cdy816\\Spider\\Output\\InSpiderRun.exe"
},
"WSL 2": {
"commandName": "WSL2",
Expand Down

0 comments on commit 90d918a

Please sign in to comment.