小编Tac*_*000的帖子

在模块中包含的函数中添加类型

我不确定为什么会失败,但如果我从函数添加类型,那么当我需要使用 *.dll api 时,无论出于何种原因,我的代码都会失败。

function Add-References
{
    Add-Type -Path "C:\myDllPath.dll"
    Add-Type -Path "C:\myDllPath2.dll"
}
Run Code Online (Sandbox Code Playgroud)

我尝试过使函数成为全局函数,即点运算符...请记住,该函数包含在模块中并由脚本调用。我的目标是仅使用该函数来声明我的引用,而不是将这些路径复制粘贴到我的所有脚本中。

dll powershell scope function

5
推荐指数
1
解决办法
2806
查看次数

用于扩展其他产品的C#名称空间

我目前正在创建一个Visual Studio扩展,我的问题是找出命名空间.我知道约定是(<Company>.<Product>).<Feature>,我的问题是我创建了一个明确针对Visual Studio的实用程序库.如何命名此命名空间?

using MyCoolCompany.VisualStudio.Utility;
Run Code Online (Sandbox Code Playgroud)

要么

using MyCoolCompany.VisualStudioUtility;
Run Code Online (Sandbox Code Playgroud)

.net c# namespaces naming-conventions visual-studio

0
推荐指数
1
解决办法
31
查看次数