Tag: visual studio 2010

如何连接到远程Oracle数据库

我必须连接到远程Oracle DBMS到我的.NET C#Web服务 请求客户端Oracle安装? 为什么? 当你必须使用ODP.NET时 谢谢

VS 2010和MBUnit如何只运行一次测试

我安装了Gallio / MbUnit,并且正在使用VS 2010 RC,我希望能够在TestFixture内运行单个unit testing或仅运行所有unit testing,而不是每次调试时都运行整个项目中的所有测试。 你如何在VS 2010中做到这一点?

当我尝试构建它时,Visual Studio会执行某些操作。 我如何找到留在这背后的代码?

在标题中,我从github下载了一个程序,但是当我尝试构建它时,它说: 命令“”E:\ LoLNotes \ LoLNotes \ Properties \ GitExport.exe“”E:\ LoLNotes \“”E:\ LoLNotes \ LoLNotes \“”退出代码2。 GitExport.exe不起作用,因为我没有安装git。 但我想知道,我如何在程序源中找到一个位置,该代码正在执行? 简单的ctrl-f和搜索解决方案不起作用,所以我认为它隐藏在配置文件中的某个地方可能? 有谁知道它可能在哪里?

Inno Setup循环浏览文件并注册每个.NET dll

我正在使用Inno Setup创建一个安装文件,我需要使用regasm.exe文件注册未知数量的.net dll。 我知道我可以使用以下代码注册.net DLL。 [Run] Filename: “{dotnet20}\RegAsm.exe”; Parameters: /codebase MyDLL.dll; WorkingDir: {app}; StatusMsg: “Registering Controls.”; Flags: runminimized 我的问题是,文件夹中有多个dll,我不知道要注册的每个dll的名称。 有没有办法我可以遍历文件夹中的文件并注册其中的每个文件而不知道文件的数量和名称? 请帮忙,谢谢

IOException未处理 – 无法找到资源app.xaml

在我的一个WPF项目中,当我打开解决方案并在调试时启动它时出现此错误。 如果我重新构建解决方案并再次启动它,则错误消失。 我已经使用以下方法删除了App.xaml中的StartUpUri,为应用程序实现了命令行支持: WPF命令行 我如何摆脱这个恼人的错误? 使用VS 2010 .net 4.0 System.IO.IOException was unhandled Message=Cannot locate resource ‘app.xaml’. Source=PresentationFramework StackTrace: at MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode mode, FileAccess access) at System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access) at System.IO.Packaging.PackagePart.GetStream() at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) at ESPS3.ServerSchemaUtility.App.InitializeComponent() in e:\ESP3.0\InternalTools\ServerSchemaUtility\ServerSchemaUtility\App.xaml:line 1 at ESPS3.ServerSchemaUtility.App.Main() in E:\ESP3.0\InternalTools\ServerSchemaUtility\ServerSchemaUtility\obj\x86\Debug\App.g.cs:line 0 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, […]

如何在C#WCF中返回SqlDataReader?

在我的C#WCF服务中,我有一个SqlDataReader ,它包含我想要返回给客户端的数据行。 如何返回SqlDataReader所有内容? 现在我有 if (sqlReader != null) { if (sqlReader.HasRows) { while (sqlReader.Read()) { return sqlReader[0].ToString(); } sqlConn.Close(); } else { return null; } } 这只会返回第一个结果。 该类的返回类型目前是字符串。 我在想数组中的数组,但我不确定如何? 编辑: 感谢您的回复。 我有兴趣返回服务“创建”的整个SQL数据。 不在线第一列([0]) – 这仅用于测试。 但我不知道如何从服务回到客户端。 如何退货? 例如。 在Powershell中我会创建一个集合并向该集合添加对象,如果我必须在客户端之间传递它。 我在C#和WCF中寻找类似的东西。 非常感谢到目前为止:) 编辑#2: 得到它了! 🙂 创建了一个新类(例如): public class ObjectNotification { public string AlertDescription; public string Servername; […]

Visual Studio 2010中的IntelliSense RC冻结

每次我尝试写东西时,IntelliSense都会冻结Visual Studio,我必须等待2分钟才能显示代码完成列表。 我可以使用的唯一方法是完全关闭它。 **` 我已经安装了微软的最后一个IntelliSense补丁,但问题似乎没有变得更好。 任何人都有同样的问题或知道可能是什么问题? 我正在使用C#。 我有一个新安装的Visual Studio 2010 RC版本,没有ReSharper,在干净的格式化计算机上。 谢谢

如何从浏览器调用WCF服务OperationContract?

我创建了一个WCF 4 Web服务并将其托管在我的IIS 7 ,我提供了以下Service URL:在WCF项目的发布Web部分: http://localhost:8084/service1.svc 。 然后我将我发布的web site绑定在端口: 4567并在IIS键入: http 。 To checked it i clicked on `web site` at `IIS` and click on the browse. It open a following page at my browser: 这意味着Web服务已成功托管在IIS 。 现在我想调用我的实例方法并在浏览器中返回输出。 让我粘贴Iservice.cs和service.svc.cs的示例代码 #Iservice.cs: namespace some.decryption { [ServiceContract] public interface Iservice { [OperationContract, WebInvoke(Method = “GET”, UriTemplate = […]

未检测到Web服务?

我试图托管这个服务,下面运行正常但是当我在一个不同的Visual Studio运行时打开一个新项目并试图添加一个它找不到任何东西的Web服务? 不是在指定的地址或本地机器上的任何东西? 以下代码似乎只在我在同一个解决方案中运行时才有效? namespace Students { class Program { static void Main(string[] args) { // Create the address for the service Uri address = new Uri(“http://localhost:8001”); // Create the binding for the service WSHttpBinding binding = new WSHttpBinding(); // Create the service object StudentService service = new StudentService(); // Create the host for the […]

使用DotNetOpenAuth获取FetchData?

我已经实现了这里描述的这个简单代码 (vs 2010,webforms) protected void Page_Load(object sender, EventArgs e) { var openid = new OpenIdRelyingParty(); var response = openid.GetResponse(); if (response != null && response.Status == AuthenticationStatus.Authenticated) { FormsAuthentication.RedirectFromLoginPage(response.ClaimedIdentifier, false); } } Clickfunction: protected void btnGoogle_Click(object sender, ImageClickEventArgs e) { using (OpenIdRelyingParty openid = new OpenIdRelyingParty()) { var request = openid.CreateRequest(“https://www.google.com/accounts/o8/id”); request.RedirectToProvider(); } } 问题#1 […]