我试图从dll实例化一个对象而不引用它.我可以使用VB.NET中的Reflection来实现它,但无法弄清楚如何在C#中实现它.
在VB.NET中:
Public Class Form1
Dim bytes() As Byte = System.IO.File.ReadAllBytes("\\path\directory\file.dll")
Dim assmb As System.Reflection.Assembly = System.Reflection.Assembly.Load(bytes)
Dim myDllClass As Object = assmb.CreateInstance("myNamespace.myClass")
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim conStr As String = myDllClass.publicConString
Dim dt As DataTable = myDllClass.MethodReturnsDatatable("select * from Part", conStr)
DataGridView1.DataSource = dt
End Sub
Run Code Online (Sandbox Code Playgroud)
在C#中:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
static byte[] bytes = System.IO.File.ReadAllBytes(@"\\path\directory\file.dll");
static System.Reflection.Assembly assmb = System.Reflection.Assembly.Load(bytes);
object myDllClass = …Run Code Online (Sandbox Code Playgroud) 我有一台新笔记本电脑,因为旧的笔记本电脑崩溃了.在旧的笔记本电脑上,我有一个连接到Team Foundation Server的Visual Studio解决方案,在我办理登机手续之前已经进行了很多更改.
幸运的是,我对包含我的更改的完整文件夹结构进行了备份.
现在,在我的新笔记本电脑上,我安装了VS2013并将解决方案复制到我的硬盘(E:磁盘).当我打开解决方案时,所有项目都正确加载,但没有与TFS的连接.
当我查看"更改源代码管理"时,所有项目都处于无效状态.我试图正确设置工作区但到目前为止没有任何工作.
如何在Visual Studio TFS中下载项目的内容?我点击了周围,我没有找到一个简单或直观的方法来做到这一点.在我重新安装最新版本的Visual Studio之前,我认为这是一个古老的项目.

我目前正在一个Windows Server 2012上运行TFS 2013,在另一个框上运行TFS Build 2012 Update 4.我的问题是,如果我升级我的TFS Build Server框以使用TFS Build 2015,我是否还需要升级我的TFS 2013 Server?
那么,相反呢?我是否可以将我的TFS 2013服务器升级到TFS 2015并仍然使用我现有的TFS Build 2012服务器,该服务器使用Web部署来构建和发布到我们网络上的各种其他服务器?
我正在寻找将VS与Sonar集成的扩展,以避免等待Sonar运行以获得对我的代码的反馈.除了通过Sonar UI提供共享反馈(提供共享规则集,历史记录,趋势,分析......)之外,实时反馈非常有价值.
我在去年看过Eclipse和IntelliJ的插件,它们运行Sonar分析(基于共享规则集),同时利用增量分析......
最近,我发现vssonarextension似乎对Visual Studio中的C#项目做了几乎相同的事情(增量和预览分析).但我也找到了官方的SonarLint(最近从SonarQube更名为C#),我无法理解它是如何工作的.它似乎与SonarQube服务器断开连接并重新实现已在服务器上实现的规则(通过C#插件),我错了吗?你能澄清一下吗?
我正在尝试创建一个简单的TFS vNext任务,使用Powershell执行Powershell脚本.
我可以加载任务,但在我使用任务触发发布后,我得到了
##[error]System.Management.Automation.ParameterBindingException: A parameter cannot be found that matches parameter name 'PoolName'.
Run Code Online (Sandbox Code Playgroud)
我的task.json如下.
{
"id": "7fe28fb2-c323-4494-beb6-b5c5939b09e7",
"name": "ManageIIS",
"friendlyName": "ManageIIS",
"description": "ManageIIS",
"helpMarkDown": "ManageIIS",
"category": "Utility",
"visibility": [
"Build"
],
"author": "Baskar Lingam",
"version": {
"Major": 1,
"Minor": 0,
"Patch": 3
},
"demands": [],
"minimumAgentVersion": "1.83.0",
"groups": [
{
"name": "advanced",
"displayName": "Advanced",
"isExpanded": false
}
],
"instanceNameFormat": "ManageIIS",
"inputs": [
{
"name": "PoolName",
"type": "string",
"label": "Application Pool Name",
"required": true,
"defaultValue": "AppPoolName"
},
{
"name": "AppPoolAction", …Run Code Online (Sandbox Code Playgroud) powershell tfs tfsbuild azure-pipelines-build-task azure-pipelines
我需要对自定义TFS构建任务进行更改。我想将任务的新版本捆绑在扩展程序中(也保留当前版本),并能够在编辑构建/发布定义时选择版本。
我查看了有关在一个扩展程序中捆绑多个版本的构建任务的 Microsoft文档,但是我没有看到扩展程序清单中需要包含的内容的详细信息。
我还查看了github上的VSTS任务,但没有看到如何完成此任务。
有没有人举过一个例子,说明如何在一个扩展中捆绑一个任务的多个版本?
我正在尝试在托管Linux池上运行针对Visual Studio Team Services的赛普拉斯测试.不幸的是,托管代理没有安装赛普拉斯的所有依赖项.
运行文档apt-get不起作用:
2018-05-18T21:03:14.7423331Z ##[section]Starting: Install cypress dependencies
2018-05-18T21:03:14.7474742Z ==============================================================================
2018-05-18T21:03:14.7488281Z Task : Bash
2018-05-18T21:03:14.7501148Z Description : This is an early preview. Run a Bash script on macOS, Linux, or Windows
2018-05-18T21:03:14.7513088Z Version : 3.127.0
2018-05-18T21:03:14.7524823Z Author : Microsoft Corporation
2018-05-18T21:03:14.7537179Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=613738)
2018-05-18T21:03:14.7549730Z ==============================================================================
2018-05-18T21:03:15.0174503Z Generating script.
2018-05-18T21:03:15.0535056Z Script contents:
2018-05-18T21:03:15.0547355Z apt-get install xvfb libgtk2.0-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2
2018-05-18T21:03:15.0656822Z [command]/bin/bash --noprofile --norc /opt/vsts/work/_temp/cac4d3f9-42e7-49f3-94f6-7d0444827d83.sh
2018-05-18T21:03:15.6040707Z Reading package lists...
2018-05-18T21:03:15.6085335Z Building dependency tree... …Run Code Online (Sandbox Code Playgroud) azure-devops azure-pipelines azure-pipelines-release-pipeline cypress
我正在从一个内部部署的TFS实例迁移到VSTS.我有很多迁移到VSTS的构建管道(vNext构建定义),但现在我必须更新它们才能使用特定的代理.
UI和命令行客户端中没有可用选项.
我错过了一个可用的选项,所以我可以立即更新它们吗?
tfs ×5
azure-devops ×4
tfsbuild ×3
c# ×2
.net ×1
alm ×1
azure-pipelines-release-pipeline ×1
azure-repos ×1
cypress ×1
dll ×1
git ×1
migration ×1
powershell ×1
sonarlint ×1
tfs-2015 ×1
tfs2012 ×1
tfvc ×1
vb.net ×1