Quellcode durchsuchen

彻底解决了vs中不能添加cs文件的bug

tanghai vor 8 Jahren
Ursprung
Commit
df62d16eb8

+ 1 - 1
Build.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
 dotnet msbuild ./Server/Server.sln
-cd netcoreapp2.0
+cd Bin
 cmake ../
 make

+ 1 - 1
Run.sh

@@ -8,7 +8,7 @@ then
 fi
 
 dotnet msbuild ./Server/Server.sln
-cd netcoreapp2.0
+cd Bin
 cmake ..
 make
 

+ 1 - 1
Server/App/Properties/launchSettings.json

@@ -2,7 +2,7 @@
   "profiles": {
     "Server.App": {
       "commandName": "Project",
-      "workingDirectory": "../../netcoreapp2.0"
+      "workingDirectory": "../../Bin"
     }
   }
 }

+ 6 - 2
Server/App/Server.App.csproj

@@ -7,14 +7,18 @@
     <RootNamespace>App</RootNamespace>
   </PropertyGroup>
 
+  <PropertyGroup>
+    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
+  </PropertyGroup>
+
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
     <DefineConstants>TRACE;DEBUG;NETCOREAPP2_0;SERVER</DefineConstants>
-    <OutputPath>bin\Debug\..\..\..\..\</OutputPath>
+    <OutputPath>bin\Debug\..\..\..\..\Bin\</OutputPath>
   </PropertyGroup>
 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
     <DefineConstants>TRACE;RELEASE;NETCOREAPP2_0;SERVER</DefineConstants>
-    <OutputPath>bin\Release\..\..\..\..\</OutputPath>
+    <OutputPath>bin\Release\..\..\..\..\Bin\</OutputPath>
   </PropertyGroup>
 
   <ItemGroup>

+ 6 - 9
Server/Base/Server.Base.csproj

@@ -6,14 +6,18 @@
     <RootNamespace>Model</RootNamespace>
   </PropertyGroup>
 
+  <PropertyGroup>
+    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
+  </PropertyGroup>
+
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
     <DefineConstants>TRACE;DEBUG;NETCOREAPP2_0;SERVER</DefineConstants>
-    <OutputPath>bin\Debug\..\..\..\..\</OutputPath>
+    <OutputPath>bin\Debug\..\..\..\..\Bin\</OutputPath>
   </PropertyGroup>
 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
     <DefineConstants>TRACE;RELEASE;NETCOREAPP2_0;SERVER</DefineConstants>
-    <OutputPath>bin\Release\..\..\..\..\</OutputPath>
+    <OutputPath>bin\Release\..\..\..\..\Bin\</OutputPath>
   </PropertyGroup>
 
   <ItemGroup>
@@ -57,13 +61,6 @@
     <Compile Include="..\..\Unity\Assets\Scripts\Base\TryLocker.cs" Link="TryLocker.cs" />
   </ItemGroup>
 
-  <ItemGroup>
-    <Folder Include="Helper\" />
-    <Folder Include="Network\TNet\" />
-    <Folder Include="Network\UNet\" />
-    <Folder Include="Network\KNet\" />
-  </ItemGroup>
-
   <ItemGroup>
     <PackageReference Include="NLog" Version="5.0.0-beta11" />
     <PackageReference Include="protobuf-net" Version="2.3.2" />

+ 6 - 2
Server/Hotfix/Server.Hotfix.csproj

@@ -5,15 +5,19 @@
     <AssemblyName>Hotfix</AssemblyName>
     <RootNamespace>Hotfix</RootNamespace>
   </PropertyGroup>
+	
+  <PropertyGroup>
+    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
+  </PropertyGroup>
 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
     <DefineConstants>TRACE;DEBUG;NETCOREAPP2_0;SERVER</DefineConstants>
-    <OutputPath>bin\Debug\..\..\..\..\</OutputPath>
+    <OutputPath>bin\Debug\..\..\..\..\Bin\</OutputPath>
   </PropertyGroup>
 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
     <DefineConstants>TRACE;RELEASE;NETCOREAPP2_0;SERVER</DefineConstants>
-    <OutputPath>bin\Release\..\..\..\..\</OutputPath>
+    <OutputPath>bin\Release\..\..\..\..\Bin\</OutputPath>
   </PropertyGroup>
 
   <ItemGroup>

+ 6 - 6
Server/Model/Server.Model.csproj

@@ -6,14 +6,18 @@
     <RootNamespace>Model</RootNamespace>
   </PropertyGroup>
 
+  <PropertyGroup>
+    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
+  </PropertyGroup>
+
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
     <DefineConstants>TRACE;DEBUG;NETCOREAPP2_0;SERVER</DefineConstants>
-    <OutputPath>bin\Debug\..\..\..\..\</OutputPath>
+    <OutputPath>bin\Debug\..\..\..\..\Bin\</OutputPath>
   </PropertyGroup>
 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
     <DefineConstants>TRACE;RELEASE;NETCOREAPP2_0;SERVER</DefineConstants>
-    <OutputPath>bin\Release\..\..\..\..\</OutputPath>
+    <OutputPath>bin\Release\..\..\..\..\Bin\</OutputPath>
   </PropertyGroup>
 
   <ItemGroup>
@@ -49,10 +53,6 @@
     <Compile Include="..\..\Unity\Assets\Scripts\Helper\MongoHelper.cs" Link="Helper\MongoHelper.cs" />
   </ItemGroup>
 
-  <ItemGroup>
-    <Folder Include="Helper\" />
-  </ItemGroup>
-
   <ItemGroup>
     <PackageReference Include="CommandLineParser" Version="2.1.1-beta" />
     <PackageReference Include="Newtonsoft.Json" Version="10.0.3" />

+ 1 - 1
Server/Server.sln

@@ -1,7 +1,7 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 15
-VisualStudioVersion = 15.0.27004.2009
+VisualStudioVersion = 15.0.27130.0
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server.App", "App\Server.App.csproj", "{11464C2C-E0B6-476E-ABB1-87445E736B76}"
 EndProject

+ 6 - 2
Server/ThirdParty/MongodbDriver/DotNetCoreDriver/MongoDB.Bson/MongoDB.Bson.csproj

@@ -4,12 +4,16 @@
     <TargetFramework>netstandard2.0</TargetFramework>
   </PropertyGroup>
 
+  <PropertyGroup>
+    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
+  </PropertyGroup>
+
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
-    <OutputPath>bin\Debug\..\..\..\..\..\..\..\netcoreapp2.0\</OutputPath>
+    <OutputPath>bin\Debug\..\..\..\..\..\..\..\Bin\</OutputPath>
   </PropertyGroup>
 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
-    <OutputPath>bin\Release\..\..\..\..\..\..\..\netcoreapp2.0\</OutputPath>
+    <OutputPath>bin\Release\..\..\..\..\..\..\..\Bin\</OutputPath>
   </PropertyGroup>
 
   <ItemGroup>

+ 6 - 2
Server/ThirdParty/MongodbDriver/DotNetCoreDriver/MongoDB.Driver.Core/MongoDB.Driver.Core.csproj

@@ -4,12 +4,16 @@
     <TargetFramework>netstandard2.0</TargetFramework>
   </PropertyGroup>
 
+  <PropertyGroup>
+    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
+  </PropertyGroup>
+	
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
-    <OutputPath>bin\Debug\..\..\..\..\..\..\..\netcoreapp2.0\</OutputPath>
+    <OutputPath>bin\Debug\..\..\..\..\..\..\..\Bin\</OutputPath>
   </PropertyGroup>
 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
-    <OutputPath>bin\Release\..\..\..\..\..\..\..\netcoreapp2.0\</OutputPath>
+    <OutputPath>bin\Release\..\..\..\..\..\..\..\Bin\</OutputPath>
   </PropertyGroup>
 
   <ItemGroup>

+ 6 - 2
Server/ThirdParty/MongodbDriver/DotNetCoreDriver/MongoDB.Driver/MongoDB.Driver.csproj

@@ -4,12 +4,16 @@
     <TargetFramework>netstandard2.0</TargetFramework>
   </PropertyGroup>
 
+  <PropertyGroup>
+    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
+  </PropertyGroup>
+
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
-    <OutputPath>bin\Debug\..\..\..\..\..\..\..\netcoreapp2.0\</OutputPath>
+    <OutputPath>bin\Debug\..\..\..\..\..\..\..\Bin\</OutputPath>
   </PropertyGroup>
 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
-    <OutputPath>bin\Release\..\..\..\..\..\..\..\netcoreapp2.0\</OutputPath>
+    <OutputPath>bin\Release\..\..\..\..\..\..\..\Bin\</OutputPath>
   </PropertyGroup>
   
   <ItemGroup>

+ 1 - 1
Start.sh

@@ -7,6 +7,6 @@ then
     exit 9
 fi
 
-cd netcoreapp2.0
+cd Bin
 ps -ef | grep App.exe | awk '{print $2}' | xargs kill -9
 dotnet App.dll --appId=1 --appType=Manager --config=../$1

+ 1 - 1
Unity/Assets/Editor/ServerCommandLineEditor/ServerCommandLineEditor.cs

@@ -354,7 +354,7 @@ namespace MyEditor
 
 				string arguments = $"App.dll --appId={startConfig.AppId} --appType={startConfig.AppType} --config=../Config/StartConfig/{this.fileName}";
 
-				ProcessStartInfo info = new ProcessStartInfo("dotnet", arguments) { UseShellExecute = true, WorkingDirectory = @"../netcoreapp2.0/" };
+				ProcessStartInfo info = new ProcessStartInfo("dotnet", arguments) { UseShellExecute = true, WorkingDirectory = @"../Bin/" };
 				Process.Start(info);
 			}
 			GUILayout.EndHorizontal();