骑马与砍杀中文站论坛

 找回密码
 注册(Register!)

QQ登录

只需一步,快速开始

搜索
购买CDKEY 小黑盒加速器
查看: 3981|回复: 0

[霸主] 关于在VSCode配置骑砍2 Mod环境

[复制链接]

6

主题

28

回帖

15

积分

随仆

Rank: 1

UID
3176920
第纳尔
122
精华
0
互助
1
荣誉
0
贡献
0
魅力
0
注册时间
2020-4-26
鲜花(1) 鸡蛋(0)
发表于 2020-6-27 01:58:26 | 显示全部楼层 |阅读模式
本帖最后由 渐远这尼玛也抢 于 2020-6-27 02:03 编辑

官方教程是按照 Visual Studio 走的,但这个软件太大了,用不习惯。
之前VSCode一直用得很香,所以想试试能不能VSCode配置好。

本人C#萌新,对环境配置不是很熟悉,按照官方要求配置,

https://docs.bannerlordmodding.com/_intro/getting-started.html#modding-with-c

到了需要添加官方 References libs 的步骤了,但是不知道具体怎么写。官方指导是这么说的:
Reference the TaleWorlds.* DLLs in the bin\Win64_Shipping_Client directory of your game files (not your module directory). Also reference the TaleWorlds.* DLLs for each official module in Modules\ModuleName\bin\Win64_Shipping_Client

也就是给VScode下C#添加第三方dll库。
无论是百度还是Bing上搜索居然C# VScode的资料少得可怜。竟然找不到详细说明如何配置第三方库的教程。

在Stackoverflow找到了一些说法是在 .csproj 文件里面添加类似如下的指令:

https://stackoverflow.com/questions/31888274/how-to-reference-assemblies-using-visual-studio-code

  1.   <ItemGroup>
  2.     <Reference Include="TaleWorlds.xxx.dll">
  3.       <HintPath>H:\Games\steamapps\common\Mount & Blade II Bannerlord\bin\Win64_Shipping_Client\TaleWorlds.xx.dll</HintPath>
  4.     </Reference>
  5.   </ItemGroup>
复制代码


但是编译会报错,不知道有没有大佬在VScode上配置环境成功过?感激不尽。





6

主题

28

回帖

15

积分

随仆

Rank: 1

UID
3176920
第纳尔
122
精华
0
互助
1
荣誉
0
贡献
0
魅力
0
注册时间
2020-4-26
鲜花(1) 鸡蛋(0)
 楼主| 发表于 2020-6-27 01:59:06 | 显示全部楼层
编译报错如下:

> Executing task: C:\Program Files\dotnet\dotnet.exe build H:\Games\steamapps\common\Mount & Blade II Bannerlord\Modules\SciAge/SciAge.csproj /property:GenerateFullPaths=true onsoleloggerparameters:NoSummary -o H:\Games\steamapps\common\Mount & Blade II Bannerlord\Modules\SciAge/bin/Win64_Shipping_Client <

用于 .NET Core 的 Microsoft (R) 生成引擎版本 16.6.0+5ff7b0c9e
版权所有(C) Microsoft Corporation。保留所有权利。

H:\Games\steamapps\common\Mount & Blade II Bannerlord\Modules\SciAge\SciAge.csproj(10,50): error MSB4025: 未能加载项目文件。An error occurred while parsing EntityName. Line 10
position 50.
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.

6

主题

28

回帖

15

积分

随仆

Rank: 1

UID
3176920
第纳尔
122
精华
0
互助
1
荣誉
0
贡献
0
魅力
0
注册时间
2020-4-26
鲜花(1) 鸡蛋(0)
 楼主| 发表于 2020-6-27 02:02:19 | 显示全部楼层
睡了,先不肝了
您需要登录后才可以回帖 登录 | 注册(Register!)

本版积分规则

Archiver|手机版|小黑屋|骑马与砍杀中文站

GMT+8, 2024-3-29 03:47 , Processed in 0.107780 second(s), 18 queries , Gzip On, MemCached On.

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表